From owner-svn-src-all@FreeBSD.ORG Mon Jul 21 18:26:52 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 31DD015B; Mon, 21 Jul 2014 18:26:52 +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 1EE8624B4; Mon, 21 Jul 2014 18:26:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LIQpHL066773; Mon, 21 Jul 2014 18:26:51 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6LIQp8E066772; Mon, 21 Jul 2014 18:26:51 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201407211826.s6LIQp8E066772@svn.freebsd.org> From: John Baldwin Date: Mon, 21 Jul 2014 18:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r268952 - stable/10/sys/amd64/vmm X-SVN-Group: stable-10 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 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: Mon, 21 Jul 2014 18:26:52 -0000 Author: jhb Date: Mon Jul 21 18:26:51 2014 New Revision: 268952 URL: http://svnweb.freebsd.org/changeset/base/268952 Log: MFC 264347: Account for the "plus 1" encoding of the CPUID Function 4 reported core per package and cache sharing values. Modified: stable/10/sys/amd64/vmm/x86.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/x86.c ============================================================================== --- stable/10/sys/amd64/vmm/x86.c Mon Jul 21 18:23:48 2014 (r268951) +++ stable/10/sys/amd64/vmm/x86.c Mon Jul 21 18:26:51 2014 (r268952) @@ -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: