Honor cpuid.nx when enabling efer.nxe
PATCH 1/1 Honor cpuid.nx when enabling efer.nxe
Signed-off-by Avi Kivity <[email protected]>
--- x86/vmexit.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
x86/vmexit.c +2 -1
@@ -144,7 +144,8 @@ static void do_test(struct test *test)static void enable_nx (void *junk) { -wrmsr (MSR_EFER ,rdmsr (MSR_EFER ) |EFER_NX_MASK ); +if (cpuid (0x80000001 ).d & (1 <<20 )) +wrmsr (MSR_EFER ,rdmsr (MSR_EFER ) |EFER_NX_MASK ); }int main (void )
Signature · 1 line
1.7.1
Marcelo Tosatti
AppliedQuoted 4 lines · Avi Kivity
Signed-off-by Avi Kivity <[email protected]>--- x86/vmexit.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Applied, thanks.