From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 28 13:44:37 2014 Return-Path: Delivered-To: freebsd-hackers@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 0C68625A for ; Fri, 28 Mar 2014 13:44:37 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E96AE1A for ; Fri, 28 Mar 2014 13:44:36 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.8/8.14.8) with ESMTP id s2SDiWuU075325; Fri, 28 Mar 2014 15:44:32 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s2SDiWuU075325 Received: (from kostik@localhost) by tom.home (8.14.8/8.14.8/Submit) id s2SDiVM9075324; Fri, 28 Mar 2014 15:44:31 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 28 Mar 2014 15:44:31 +0200 From: Konstantin Belousov To: Jia-Shiun Li Subject: Re: Add CPUID subleaf capability to cpuctl/cpucontrol Message-ID: <20140328134431.GW21331@kib.kiev.ua> References: <20140326155429.GK21331@kib.kiev.ua> <20140327123859.GP21331@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SuGb6p5JEpzYJdwO" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2014 13:44:37 -0000 --SuGb6p5JEpzYJdwO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 28, 2014 at 09:09:40PM +0800, Jia-Shiun Li wrote: > On Thu, Mar 27, 2014 at 8:38 PM, Konstantin Belousov > wrote: > > > > From what I remember, in the multi-socket configuration Intel allows > > CPUs to only differ by stepping. Due to this, I see only one possible > > uses of executing CPUID on specific core, to get the stepping of the > > package, to either test for the presence of the specific CPU bug, or to > > select the proper microcode update. > > > > That said, I am curious why do you want this feature. >=20 > I'd like to do some CPU monitoring w/ MSR, thus need to identify CPU > topology & CPU id on specific logical ones. I am sure there are some > info from kernel, sysctl, etc. Even utilities readily available. But I > am just curious on how it works anyway. With topology and MSR access > via cpuctl, it should be able to do some monitoring from user space. For the topology, my note about multi-socket configuration holds. The advanced topology enumeration leafs must be identical on all populated sockets for given machine. --SuGb6p5JEpzYJdwO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTNXy/AAoJEJDCuSvBvK1B9aEQAIQ/4eGGvSx5B2rZNEquxxhb 3vFinBq6Z8HU5IDpafz4iLgS2Rna+9/QBZAVKefkrZHhvdldIxbELmaxj/Porp/q I4DujP8mxotcFN3w+SbbuKgdIu1LBmFsHms2MhHeLy1EHlQxCnwMgOLCzOeT9JCe fXXjjLKAphV6BWdsCxZmqjw05oQ/RabpufQ6X0a7eVRAee5coirp5Ay6KlNXhyIK CF1MJF94eoo48T/4de/U3OJ6fL37zj34oNNpZiOW2N+9O5awA8voOjfg5nsm8gZE HxSwPGXrIuHClhbWG8dcTlNXvM+6eWA985EDp0aXrecxyAR8LdFoqaLpOOh/U8+g 4bCaL/Y3iwPeHf1BIk6WuyeTw69tArY0bOkTOW5XRWQhJKlcL4LhwwO9T6JXqNIP 7ZgtUQj328HYuuFl7XUVAwfe2Ifnn00glYloImvqRJxIxMtJvxlWiBh3hCqki8Ic d3J/gXdorOG5C9WYYHfRASqUowSEWnqVheBqAxP5kZ+acDv+rwMJ350+gKVIuRYX ZHjav/Vv85YfMfTt3fEZIyUdWNprSiEUG6mFBfKtq8/atuWrSm+dcd5XsXOr3SBS 60x33saIhCyckSzoEwBGNdzfGcsSCj1LvNx95LRzlRoVxB1xng1JzKElwmx+Ec8b 1n0sA6JfzK21VlDXAcC1 =mVd8 -----END PGP SIGNATURE----- --SuGb6p5JEpzYJdwO--