This patch is based on the smap patchset
Feng Wu (1):
Rename variable smep to cr4_smep
arch/x86/kvm/mmu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message
SMAP is disabled if CPU is in non-paging mode in hardware.
However KVM always uses paging mode to emulate guest non-paging
mode with TDP. To emulate this behavior, SMAP needs to be
manually disabled when guest switches to non-paging mode.
Signed-off-by: Feng Wu
---
arch/x86/kvm/vmx.c | 11
This patch removes SMAP bit from CR4_RESERVED_BITS.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index fdf83af..4eeb049 100644
--- a/arch/x86
This patch adds SMAP handling logic when setting CR4 for guests
Thanks a lot to Paolo Bonzini for his suggestion to use the branchless
way to detect SMAP violation.
Signed-off-by: Feng Wu
---
arch/x86/kvm/cpuid.h | 8
arch/x86/kvm/mmu.c | 34
This patch exposes SMAP feature to guest
Signed-off-by: Feng Wu
---
arch/x86/kvm/cpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index c697625..deb5f9b 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -303,7
ess way suggested by Paolo Bonzini to detect SMAP
violation in permission_fault().
Version 4:
* Changes to some comments and code style.
Feng Wu (4):
KVM: Remove SMAP bit from CR4_RESERVED_BITS.
KVM: Add SMAP support when setting CR4
KVM: Disable SMAP for guests in EPT realmode and
This patch exposes SMAP feature to guest
Signed-off-by: Feng Wu
---
arch/x86/kvm/cpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index c697625..deb5f9b 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -303,7
This patch adds SMAP handling logic when setting CR4 for guests
Thanks a lot to Paolo Bonzini for his suggestion to use the branchless
way to detect SMAP violation.
Signed-off-by: Feng Wu
---
arch/x86/kvm/cpuid.h | 8
arch/x86/kvm/mmu.c | 35
SMAP is disabled if CPU is in non-paging mode in hardware.
However KVM always uses paging mode to emulate guest non-paging
mode with TDP. To emulate this behavior, SMAP needs to be
manually disabled when guest switches to non-paging mode.
Signed-off-by: Feng Wu
---
arch/x86/kvm/vmx.c | 11
ess way suggested by Paolo Bonzini to detect SMAP
violation in permission_fault().
Feng Wu (4):
KVM: Remove SMAP bit from CR4_RESERVED_BITS.
KVM: Add SMAP support when setting CR4
KVM: Disable SMAP for guests in EPT realmode and EPT unpaging mode
KVM: expose SMAP feature to guest
arch/
This patch removes SMAP bit from CR4_RESERVED_BITS.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index fdf83af..4eeb049 100644
--- a/arch/x86
This patch exposes SMAP feature to guest
Signed-off-by: Feng Wu
---
arch/x86/kvm/cpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index c697625..deb5f9b 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -303,7
This patch adds SMAP handling logic when setting CR4 for guests
Signed-off-by: Feng Wu
---
arch/x86/kvm/cpuid.h | 8
arch/x86/kvm/mmu.c | 24 +---
arch/x86/kvm/mmu.h | 26 +++---
arch/x86/kvm/paging_tmpl.h | 2 +-
arch/x86
SMAP is disabled if CPU is in non-paging mode in hardware.
However KVM always uses paging mode to emulate guest non-paging
mode with TDP. To emulate this behavior, SMAP needs to be
manually disabled when guest switches to non-paging mode.
Signed-off-by: Feng Wu
---
arch/x86/kvm/vmx.c | 11
This patch removes SMAP bit from CR4_RESERVED_BITS.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index fdf83af..4eeb049 100644
--- a/arch/x86
in EPT realmode and EPT unpaging mode
* Expose SMAP feature to guest
Version 1:
* Change the logic of updatinng mmu permission bitmap for SMAP violation
* Expose SMAP feature to guest in the last patch of this series.
Feng Wu (4):
KVM: Remove SMAP bit from CR4_RESERVED_BITS.
KVM: Add S
ode
data accesses (these are implicit supervisor accesses) regardless of the
value of EFLAGS.AC.
This patchset pass-through SMAP feature to guests, and let guests
benefit from it.
Feng Wu (4):
KVM: expose SMAP feature to guest
KVM: Remove SMAP bit from CR4_RESERVED_BITS.
KVM: Add SMAP supp
This patch exposes SMAP feature to guest
Signed-off-by: Feng Wu
---
arch/x86/kvm/cpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index c697625..deb5f9b 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -303,7
SMAP is disabled if CPU is in non-paging mode in hardware.
However KVM always uses paging mode to emulate guest non-paging
mode with TDP. To emulate this behavior, SMAP needs to be
manually disabled when guest switches to non-paging mode.
Signed-off-by: Feng Wu
---
arch/x86/kvm/vmx.c | 10
This patch adds SMAP handling logic when setting CR4 for guests
Signed-off-by: Feng Wu
---
arch/x86/kvm/cpuid.h | 8
arch/x86/kvm/mmu.c | 22 +++---
arch/x86/kvm/mmu.h | 2 ++
arch/x86/kvm/x86.c | 6 ++
4 files changed, 35 insertions(+), 3 deletions
This patch removes SMAP bit from CR4_RESERVED_BITS.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index ae5d783..b673925 100644
--- a/arch/x86
201 - 221 of 221 matches
Mail list logo