From owner-freebsd-hackers@FreeBSD.ORG Sat May 17 10:14:54 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EFD61065674 for ; Sat, 17 May 2008 10:14:54 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from hosted.kievnet.com (hosted.kievnet.com [193.138.144.10]) by mx1.freebsd.org (Postfix) with ESMTP id EEBD98FC1F for ; Sat, 17 May 2008 10:14:53 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost ([127.0.0.1] helo=edge.pp.kiev.ua) by hosted.kievnet.com with esmtpa (Exim 4.62) (envelope-from ) id 1JxJRC-000H41-Af; Sat, 17 May 2008 13:14:50 +0300 Message-ID: <482EB019.3060503@icyb.net.ua> Date: Sat, 17 May 2008 13:14:49 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.12 (X11/20080320) MIME-Version: 1.0 To: Kostik Belousov References: <482E93C0.4070802@icyb.net.ua> <20080517101243.GH18958@deviant.kiev.zoral.com.ua> In-Reply-To: <20080517101243.GH18958@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: rdmsr from userspace X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2008 10:14:54 -0000 on 17/05/2008 13:12 Kostik Belousov said the following: > On Sat, May 17, 2008 at 11:13:52AM +0300, Andriy Gapon wrote: >> It seems that rdmsr instruction can be executed only at the highest >> privilege level and thus is not permitted from userland. Maybe we should >> provide something like Linux /dev/cpu/msr? >> I don't like interface of that device, I think that ioctl approach would >> be preferable in this case. >> Something like create /dev/cpuN and allow some ioctls on it: >> ioctl(cpu_fd, CPU_RDMSR, arg). >> What do you think? > > I believe ports/sysutils/devcpu is what you need. In fact, I think this > ought to be committed to the base. I do not know why Stas did not asked > for this, at least at public. Thanks a lot! This is exactly it. I agree, this would be quite useful in the OS. -- Andriy Gapon