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)
This commit is contained in:
neel 2014-08-23 22:44:31 +00:00
parent ea3ac18997
commit 33474e62d3

View File

@ -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: