Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Aug 2014 22:44:31 +0000 (UTC)
From:      Neel Natu <neel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r270436 - head/sys/amd64/vmm
Message-ID:  <201408232244.s7NMiVjL096252@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408232244.s7NMiVjL096252>