svn commit: r270436 - head/sys/amd64/vmm

Neel Natu neel at FreeBSD.org
Sat Aug 23 22:44:32 UTC 2014


Author: neel
Date: Sat Aug 23 22:44:31 2014
New Revision: 270436
URL: http://svnweb.freebsd.org/changeset/base/270436

Log:
  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 at tidalscale.com)

Modified:
  head/sys/amd64/vmm/x86.c

Modified: head/sys/amd64/vmm/x86.c
==============================================================================
--- head/sys/amd64/vmm/x86.c	Sat Aug 23 22:03:15 2014	(r270435)
+++ head/sys/amd64/vmm/x86.c	Sat Aug 23 22:44:31 2014	(r270436)
@@ -215,7 +215,7 @@ x86_emulate_cpuid(struct vm *vm, int vcp
 			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 vcp
 			 * Therefore 0 for both indicates 1 core per
 			 * package and no cache sharing.
 			 */
-			regs[0] &= 0xffff8000;
+			regs[0] &= 0x3ff;
 			break;
 
 		case CPUID_0000_0007:


More information about the svn-src-head mailing list