summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2013-09-06 05:16:10 +0000
committergrehan <grehan@FreeBSD.org>2013-09-06 05:16:10 +0000
commit37b6e3223fc91b6bf44902ea090b984c9417f3c3 (patch)
treec99b02cfc7c62d1e0d6825975668729712dab774
parent4a6a9b0a75f877672e647ddd84591d0358848913 (diff)
downloadFreeBSD-src-37b6e3223fc91b6bf44902ea090b984c9417f3c3.zip
FreeBSD-src-37b6e3223fc91b6bf44902ea090b984c9417f3c3.tar.gz
Allow CPUID leaf 0xD to be read as zeroes.
Linux reads this even though extended features aren't exposed. Support for 0xD will be expanded once AVX[2] is exposed to the guest in upcoming work.
-rw-r--r--sys/amd64/vmm/x86.c1
-rw-r--r--sys/amd64/vmm/x86.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c
index 262efbd..4416c53 100644
--- a/sys/amd64/vmm/x86.c
+++ b/sys/amd64/vmm/x86.c
@@ -200,6 +200,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id,
case CPUID_0000_0006:
case CPUID_0000_0007:
case CPUID_0000_000A:
+ case CPUID_0000_000D:
/*
* Handle the access, but report 0 for
* all options
diff --git a/sys/amd64/vmm/x86.h b/sys/amd64/vmm/x86.h
index 368e967..8401c15 100644
--- a/sys/amd64/vmm/x86.h
+++ b/sys/amd64/vmm/x86.h
@@ -38,6 +38,7 @@
#define CPUID_0000_0007 (0x7)
#define CPUID_0000_000A (0xA)
#define CPUID_0000_000B (0xB)
+#define CPUID_0000_000D (0xD)
#define CPUID_8000_0000 (0x80000000)
#define CPUID_8000_0001 (0x80000001)
#define CPUID_8000_0002 (0x80000002)
OpenPOWER on IntegriCloud