From owner-svn-src-all@FreeBSD.ORG Sat Aug 23 22:44:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F106EEF5; Sat, 23 Aug 2014 22:44:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD4D73619; Sat, 23 Aug 2014 22:44:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7NMiV00096253; Sat, 23 Aug 2014 22:44:31 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7NMiVjL096252; Sat, 23 Aug 2014 22:44:31 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201408232244.s7NMiVjL096252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sat, 23 Aug 2014 22:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270436 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2014 22:44:32 -0000 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: