]> xenbits.xensource.com Git - xen.git/commitdiff
x86/cpuid: Tie SMAP to NX, for the shadow pagetable code
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 18 Oct 2018 10:30:27 +0000 (11:30 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 12 Nov 2018 18:10:13 +0000 (18:10 +0000)
NX support in the host is required for the shadow pagetable code to handle
SMAP correctly for guests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/tools/gen-cpuid.py

index 3fecae86d4aa3a788f662cf0c7e80ff351c6a185..31fdee951e0a06a677e87c56323fcb9a66816ea1 100755 (executable)
@@ -239,6 +239,11 @@ def crunch_numbers(state):
         # absence of any enabled xstate.
         AVX: [FMA, FMA4, F16C, AVX2, XOP],
 
+        # This dependency exists solely for the shadow pagetable code.  If the
+        # host doesn't have NX support, the shadow pagetable code can't handle
+        # SMAP correctly for guests.
+        NX: [SMAP],
+
         # CX16 is only encodable in Long Mode.  LAHF_LM indicates that the
         # SAHF/LAHF instructions are reintroduced in Long Mode.  1GB
         # superpages, PCID and PKU are only available in 4 level paging.