The vmx test code calls cpuid(0x80000008) without checking xlevel first. Change it to use cpuid_maxphyaddr() instead. Signed-off-by: Eduardo Habkost <ehabkost@xxxxxxxxxx> --- x86/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x86/vmx.c b/x86/vmx.c index ef9caca..132e5f0 100644 --- a/x86/vmx.c +++ b/x86/vmx.c @@ -161,7 +161,7 @@ void print_vmexit_info() static void test_vmclear(void) { struct vmcs *tmp_root; - int width = cpuid(0x80000008).a & 0xff; + int width = cpuid_maxphyaddr(); /* * Note- The tests below do not necessarily have a @@ -652,7 +652,7 @@ static int test_vmxon(void) { int ret, ret1; u64 *tmp_region = vmxon_region; - int width = cpuid(0x80000008).a & 0xff; + int width = cpuid_maxphyaddr(); /* Unaligned page access */ vmxon_region = (u64 *)((intptr_t)vmxon_region + 1); @@ -694,7 +694,7 @@ out: static void test_vmptrld(void) { struct vmcs *vmcs, *tmp_root; - int width = cpuid(0x80000008).a & 0xff; + int width = cpuid_maxphyaddr(); vmcs = alloc_page(); vmcs->revision_id = basic.revision; -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html