This patch fix kvm-unit-tests hanging and incorrect PT_ACCESSED_MASK
bit set in the case of SMEP fault.
Signed-off-by: Yang, Wei
---
arch/x86/kvm/paging_tmpl.h | 22 +-
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch
-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
Reviewed-by: Xiao Guangrong
---
x86/access.c | 112 ++-
x86/cstart64.S |1 +
2 files changed, 110 insertions(+), 3 deletions(-)
diff --git a/x86/access.c b/x86
This patch adds SMEP to all test cases and checks SMEP when cr0.wp=0.
changes since v2:
Recover U/S bit after turning off SMEP and correct the title
changes since v1:
Add SMEP to all test cases and verify it before setting cr4
Signed-off-by: Yang, Wei
Signed-off-by: Shan
> -Original Message-
> From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On
> Behalf Of Xiao Guangrong
> Sent: Friday, July 01, 2011 4:06 PM
> To: Yang, Wei Y
> Cc: a...@redhat.com; kvm@vger.kernel.org
> Subject: Re: [PATCH kvm-unit-tests v2]
This patch adds SMEP to all test cases and checks SMEP on prefetch
pte path when cr0.wp=0.
changes since v1:
Add SMEP to all test cases and verify it before setting cr4
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
x86/access.c | 108
>
> > +void set_cr4_smep(int smep)
> > +{
> > +unsigned long cr4 = read_cr4();
> > +
> > +cr4 &= ~CR4_SMEP_MASK;
> > +if (smep)
> > + cr4 |= CR4_SMEP_MASK;
> > +write_cr4(cr4);
> > +}
> > +
>
> It can work if the box does not support SMEP?
It will report unhandled exception 13
This patch checks SMEP on prefetch pte path when
cr0.wp=1 and cr0.wp=0.
Signed-off-by: Yang, Wei
Signed-off-by: Li, Xin
Signed-off-by: Shan, Haitao
---
x86/access.c | 92 ++--
x86/cstart64.S |1 +
2 files changed, 90 insertions
This patch exposes RDWRGSFS bit to KVM guests.
Signed-off-by: Yang, Wei
---
arch/x86/kvm/x86.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 59d25ce..357e63a 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
This patch adds RDWRGSFS support when setting CR4.
Signed-off-by: Yang, Wei
---
arch/x86/kvm/x86.c | 11 +++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index ff4623b..59d25ce 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86
This patch removes RDWRGSFS bit from CR4_RESERVED_BITS.
Signed-off-by: Yang, Wei
---
arch/x86/include/asm/kvm_host.h|2 +-
arch/x86/include/asm/processor-flags.h |1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86
This patch enalbes RDWRGSFS feature to KVM guests.
Write/read FS/GS base instructions enable user level code
to read/write FS & GS segment base registers for thread
local storage.
Signed-off-by: Yang, Wei
---
arch/x86/include/asm/kvm_host.h|2 +-
arch/x86/include/asm/proce
This patch exposes ERMS feature to KVM guests.
The REP MOVSB/STOSB instruction can enhance fast strings attempts to
move as much of the data with larger size load/stores as possible.
Signed-off-by: Yang, Wei
---
arch/x86/kvm/x86.c |2 +-
1 files changed, 1 insertions(+), 1 deletions
This patch exposes DRNG feature to KVM guests.
The RDRAND instruction can provide software with sequences of
random numbers generated from white noise.
Signed-off-by: Yang, Wei
---
arch/x86/kvm/x86.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86
This patch adds instruction fetch checking when walking guest page table.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/paging_tmpl.h |9 -
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/paging_tmpl.h
This patch adds SMEP handling when setting CR4.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/x86.c | 15 +--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 77c9d86
This patchset enables a new CPU feature SMEP (Supervisor Mode Execution
Protection) in KVM. SMEP prevents kernel from executing code in application.
Updated Intel SDM describes this CPU feature. The document will be published
soon.
This patchset is based on Fenghua's SMEP patch series, as referr
This patch masks CPUID leaf 7 ebx against host capability word9.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/x86.c | 20 +++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86
This patch removes SMEP bit from CR4_RESERVED_BITS.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/include/asm/kvm_host.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include
before. Get the right
value by query KVM kernel module, so that guest can get SMEP through CPUID.
Changes since v6: no changes.
Changes since v5: no changes.
Changes since v4: no changes.
Changes since v3: no changes.
Changes since v2: no changes.
Signed-off-by: Yang, Wei
Singed-off-by: Shan
This patch adds instruction fetch checking when walking guest page table.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/paging_tmpl.h |9 -
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/paging_tmpl.h
This patch masks CPUID leaf 7 ebx against host capability word9.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/x86.c | 21 -
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86
This patch adds SMEP handling when setting CR4.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/x86.c | 15 +--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 77c9d86
This patch removes SMEP bit from CR4_RESERVED_BITS.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/include/asm/kvm_host.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include
This patchset enables a new CPU feature SMEP (Supervisor Mode Execution
Protection) in KVM. SMEP prevents kernel from executing code in application.
Updated Intel SDM describes this CPU feature. The document will be published
soon.
This patchset is based on Fenghua's SMEP patch series, as referre
This patch removes SMEP bit from CR4_RESERVED_BITS.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/include/asm/kvm_host.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include
This patchset enables a new CPU feature SMEP (Supervisor Mode Execution
Protection) in KVM. SMEP prevents kernel from executing code in application.
Updated Intel SDM describes this CPU feature. The document will be
published soon.
This patchset is based on Fenghua's SMEP patch series, as referred
before. Get the right
value by query KVM kernel module, so that guest can get SMEP through CPUID.
Changes since v5: no changes.
Changes since v4: no changes.
Changes since v3: no changes.
Changes since v2: no changes.
Signed-off-by: Yang, Wei
Singed-off-by: Shan, Haitao
Singed-off-by: Li, Xin
This patch adds instruction fetch checking when walking guest page table.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/paging_tmpl.h |9 -
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/paging_tmpl.h
This patch masks CPUID leaf 7 ebx against host capability word9.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/x86.c | 15 ++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86
This patch adds SMEP handling when setting CR4.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/x86.c | 15 +--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 77c9d86
before. Get the
right value by query KVM kernel module, so that guest can get SMEP
through CPUID.
Changes since v4: no changes.
Changes since v3: no changes.
Changes since v2: no changes.
Signed-off-by: Yang, Wei
Singed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
target-i386/cpuid.c
This patch adds instruction fetch checking when walking guest page table.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/paging_tmpl.h |9 -
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/paging_tmpl.h
This patch masks CPUID leaf 7 ebx against host capability word9.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/x86.c |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
This patch adds SMEP handling when setting CR4.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/x86.c | 15 +--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index
This patch removes SMEP bit from CR4_RESERVED_BITS.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/include/asm/kvm_host.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include
This patchset enables a new CPU feature SMEP (Supervisor Mode Execution
Protection) in KVM. SMEP prevents kernel from executing code in application.
Updated Intel SDM describes this CPU feature. The document will be
published soon.
This patchset is based on Fenghua's SMEP patch series, as referr
before. Get the
right value by query KVM kernel module, so that guest can get SMEP
through CPUID.
Changes since v3: no changes.
Changes since v2: no changes.
Signed-off-by: Yang, Wei
Singed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
target-i386/cpuid.c |8
1 files changed, 8
This patch adds SMEP handling when setting CR4.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/x86.c | 15 +--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 77c9d86
This patch adds instruction fetch checking when walking guest page table.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/paging_tmpl.h |9 -
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/paging_tmpl.h
This patch masks CPUID leaf 7 ebx against host capability word9.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/kvm/x86.c |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index
This patch adds SMEP bit to CR4_RESERVED_BITS.
Signed-off-by: Yang, Wei
Signed-off-by: Shan, Haitao
Signed-off-by: Li, Xin
---
arch/x86/include/asm/kvm_host.h |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm
This patchset enables a new CPU feature SMEP (Supervisor Mode Execution
Protection) in KVM. SMEP prevents kernel from executing code in application.
Updated Intel SDM describes this CPU feature. The document will be
published soon.
This patchset is based on Fenghua's SMEP patch series, as referre
before. Get the
right value by query KVM kernel module, so that guest can get SMEP
through CPUID.
Changes since v2: no changes.
Signed-off-by: Yang, Wei
Singed-off-by: Shan, Haitao
---
target-i386/cpuid.c |8
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/target
s, as referred by:
https://lkml.org/lkml/2011/5/17/523
Changes since v2: enable SMEP for spt mode.
Signed-off-by: Yang Wei
Signed-off-by: Shan Haitao
---
arch/x86/include/asm/kvm_host.h |1 +
arch/x86/kvm/paging_tmpl.h | 15 +--
arch/x86/kvm/vmx.c |
> This patch matches with "[PATCH v2] Enable CPU SMEP feature support for
> QEMU-KVM", no changes since v1.
>
> Enable newly documented SMEP (Supervisor Mode Execution Protection) CPU
> feature in KVM module.
>
> Intel new CPU supports SMEP (Supervisor Mode Execution Protection). SMEP
> prevents
we don't enable this feature for guests with shadow page tables.
Signed-off-by: Yang Wei
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 5b4cdcb..7b88e76
100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2743,8 +2743,11 @@ static int vmx_vcpu_setup(struct vcpu_vmx *v
published soon.
SMEP is identified by CPUID leaf 7 EBX[7], which is 0 before.
Get the right value by query KVM kernel module, so that guest can get SMEP
through CPUID.
Signed off by: Yang, Wei
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index 091d812..cd20dbf 100644
--- a/target-i386
soon.
This patch is based on Fenghua's SMEP patch series, as referred by:
https://lkml.org/lkml/2011/5/17/523
This patch enables guests' usage of SMEP.
Currently, we don't enable this feature for guests with shadow page tables.
Signed-off-by: Yang Wei
diff --git a/arch/
soon.
SMEP is identified by CPUID leaf 7 EBX[7], which is 0 before.
Get the right value by query KVM kernel module, so that guest can get SMEP
through CPUID.
Signed-off-by: Yang Wei
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index 091d812..2fff88b 100644
--- a/target-i386
49 matches
Mail list logo