From owner-svn-src-all@FreeBSD.ORG Fri Apr 11 18:19:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00B521EC; Fri, 11 Apr 2014 18:19:21 +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 E24E21BAC; Fri, 11 Apr 2014 18:19:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3BIJLmc075895; Fri, 11 Apr 2014 18:19:21 GMT (envelope-from tychon@svn.freebsd.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3BIJLJ2075894; Fri, 11 Apr 2014 18:19:21 GMT (envelope-from tychon@svn.freebsd.org) Message-Id: <201404111819.s3BIJLJ2075894@svn.freebsd.org> From: Tycho Nightingale Date: Fri, 11 Apr 2014 18:19:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264347 - 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.17 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: Fri, 11 Apr 2014 18:19:22 -0000 Author: tychon Date: Fri Apr 11 18:19:21 2014 New Revision: 264347 URL: http://svnweb.freebsd.org/changeset/base/264347 Log: Account for the "plus 1" encoding of the CPUID Function 4 reported core per package and cache sharing values. Approved by: grehan (co-mentor) Modified: head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Fri Apr 11 16:55:25 2014 (r264346) +++ head/sys/amd64/vmm/x86.c Fri Apr 11 18:19:21 2014 (r264347) @@ -219,9 +219,18 @@ x86_emulate_cpuid(struct vm *vm, int vcp /* * Do not expose topology. + * + * The maximum number of processor cores in + * this physical processor package and the + * maximum number of threads sharing this + * cache are encoded with "plus 1" encoding. + * Adding one to the value in this register + * field to obtains the actual value. + * + * Therefore 0 for both indicates 1 core per + * package and no cache sharing. */ regs[0] &= 0xffff8000; - regs[0] |= 0x04008000; break; case CPUID_0000_0007: