From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 28 13:10:11 2014 Return-Path: Delivered-To: freebsd-hackers@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 04F9A625 for ; Fri, 28 Mar 2014 13:10:11 +0000 (UTC) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3E68B04 for ; Fri, 28 Mar 2014 13:10:10 +0000 (UTC) Received: by mail-ob0-f178.google.com with SMTP id wp18so5997735obc.9 for ; Fri, 28 Mar 2014 06:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=hccR/GPfaGPwnY78AlZTGgr4uRp797Ivm0IzDwRPE2E=; b=mm2GoWR5061BFlj179LMHtRyRI2SvGBYyZzRdL+6jxGYpZTHkPHyZHWbCr3AHlMH88 4x5ECwZ9N3fRxmvlI6OLTQWA5IiSOW4d9H7MNsE+fWVVhV6mFZxZZjZ4RRgwRF9BL4Wg FhLiqjnHKyaILLLsBFJMJ3eP8pBWrqso81oCkchJP6fMMR01de7o1KD5eSRp8943tvXI F9v+taelH1lg7tvUv3wDdsaAHjBIn4mq5Rp+5BjrV2CXGmicLWhTAn+wDmbVie2mJWZy +FqqaJrVFi4/+r18Kn2bex7XxkjImVqESKL7BkaLVkv60tasGbLymh3zV/Qu5427uGUM azKQ== X-Received: by 10.182.16.33 with SMTP id c1mr6913094obd.4.1396012210150; Fri, 28 Mar 2014 06:10:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.80.194 with HTTP; Fri, 28 Mar 2014 06:09:40 -0700 (PDT) In-Reply-To: <20140327123859.GP21331@kib.kiev.ua> References: <20140326155429.GK21331@kib.kiev.ua> <20140327123859.GP21331@kib.kiev.ua> From: Jia-Shiun Li Date: Fri, 28 Mar 2014 21:09:40 +0800 Message-ID: Subject: Re: Add CPUID subleaf capability to cpuctl/cpucontrol To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 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:10:11 -0000 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. 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. After a quick scan, I think the most similar in ports should be i7z. Jia-Shiun.