From d228db1143f3302af27cae477473a6489b19c565 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 16 Nov 2014 23:12:42 -0800 Subject: [PATCH] x86: Fix the CPUID Long Mode Address Size function. The value in EAX has an 8 bit field for the linear address size and one for the physical address size when calling that function. A recent change implemented it but returned 0xff for both of those fields. That implies that linear and physical addresses are 255 bits wide which is wrong. When using the KVM CPU model this causes an error, presumably because some of those bits are actually reserved, or the CPU or kernel realizes 255 bits is a bad value. This change makes those values 48. --- src/arch/x86/cpuid.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/x86/cpuid.cc b/src/arch/x86/cpuid.cc index 2656cd94e..f3f9a82d7 100644 --- a/src/arch/x86/cpuid.cc +++ b/src/arch/x86/cpuid.cc @@ -131,7 +131,7 @@ namespace X86ISA { 0x69746e65, 0x444d4163); break; case LongModeAddressSize: - result = CpuidResult(0x0000ffff, 0x00000000, + result = CpuidResult(0x00003030, 0x00000000, 0x00000000, 0x00000000); break; /* case SVMInfo: -- 2.30.2