[PATCH kvm-unit-tests 2/2] access: treat NX as reserved if EFER.NXE=0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cull more tests if EFER.NXE=0.

Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
 x86/access.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/x86/access.c b/x86/access.c
index 6285c8c..4725bbd 100644
--- a/x86/access.c
+++ b/x86/access.c
@@ -324,6 +324,8 @@ static _Bool ac_test_legal(ac_test_t *at)
      */
     reserved = (AC_PDE_BIT51_MASK | AC_PDE_BIT36_MASK | AC_PDE_BIT13_MASK |
 	        AC_PTE_BIT51_MASK | AC_PTE_BIT36_MASK);
+    if (!F(AC_CPU_EFER_NX))
+        reserved |= AC_PDE_NX_MASK | AC_PTE_NX_MASK;
 
     /* Only test one reserved bit at a time.  */
     reserved &= flags;
-- 
2.27.0




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux