summaryrefslogtreecommitdiffstats
path: root/sys/amd64/vmm
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2014-08-23 22:44:31 +0000
committerneel <neel@FreeBSD.org>2014-08-23 22:44:31 +0000
commit33474e62d390df5950ef68ffdb5a20736c8da51c (patch)
treec0bca92b9f99a9e6a5e8f0b8e0ab763b723cc935 /sys/amd64/vmm
parentea3ac18997cf632446fbd631d3623d0d8cbbc725 (diff)
downloadFreeBSD-src-33474e62d390df5950ef68ffdb5a20736c8da51c.zip
FreeBSD-src-33474e62d390df5950ef68ffdb5a20736c8da51c.tar.gz
Fix a bug in the emulation of CPUID leaf 0x4 where bhyve was claiming that
the vcpu had no caches at all. This causes problems when executing applications in the guest compiled with the Intel compiler. Submitted by: Mark Hill (mark.hill@tidalscale.com)
Diffstat (limited to 'sys/amd64/vmm')
-rw-r--r--sys/amd64/vmm/x86.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c
index ef1557f..071c727 100644
--- a/sys/amd64/vmm/x86.c
+++ b/sys/amd64/vmm/x86.c
@@ -215,7 +215,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id,
break;
case CPUID_0000_0004:
- do_cpuid(4, regs);
+ cpuid_count(*eax, *ecx, regs);
/*
* Do not expose topology.
@@ -230,7 +230,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id,
* Therefore 0 for both indicates 1 core per
* package and no cache sharing.
*/
- regs[0] &= 0xffff8000;
+ regs[0] &= 0x3ff;
break;
case CPUID_0000_0007:
OpenPOWER on IntegriCloud