From 27bd5ef5c8ac2791ee8bc8033ee8d994ec6a496f Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Thu, 18 Oct 2018 11:30:27 +0100 Subject: [PATCH] x86/cpuid: Tie SMAP to NX, for the shadow pagetable code NX support in the host is required for the shadow pagetable code to handle SMAP correctly for guests. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- xen/tools/gen-cpuid.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/tools/gen-cpuid.py b/xen/tools/gen-cpuid.py index 3fecae86d4..31fdee951e 100755 --- a/xen/tools/gen-cpuid.py +++ b/xen/tools/gen-cpuid.py @@ -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. -- 2.30.2