From owner-freebsd-hackers@FreeBSD.ORG Sat May 17 17:32:03 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 4163E106564A for ; Sat, 17 May 2008 17:32:03 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (five.mired.org [66.92.153.75]) by mx1.freebsd.org (Postfix) with ESMTP id BEBEF8FC12 for ; Sat, 17 May 2008 17:32:02 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 47893 invoked by uid 1001); 17 May 2008 13:32:29 -0400 Received: from bhuda.mired.org (bhuda [192.168.195.1]) by bhuda (tmda-ofmipd) with ESMTP; Sat, 17 May 2008 13:32:29 -0400 Date: Sat, 17 May 2008 13:32:28 -0400 To: Rui Paulo Message-ID: <20080517133228.02c9ea5c@bhuda.mired.org> In-Reply-To: <482F1529.5080409@FreeBSD.org> References: <482E93C0.4070802@icyb.net.ua> <482EFBA0.30107@FreeBSD.org> <482F1191.70709@icyb.net.ua> <482F1529.5080409@FreeBSD.org> Organization: Meyer Consulting X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.9; amd64-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Mike Meyer Cc: freebsd-hackers@FreeBSD.org, Andriy Gapon 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 17:32:03 -0000 On Sat, 17 May 2008 18:26:01 +0100 Rui Paulo wrote: > Andriy Gapon wrote: > > on 17/05/2008 18:37 Rui Paulo said the following: > >> 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? > >>> > >> > >> While I think this (devcpu) is good for testing and development, I > >> prefer having a device driver to handle that specific MSR than a > >> generic /dev/cpuN where you can issue MSRs. > >> Both for security and reliability reasons. > > > > What about /dev/pci, /dev/io? Aren't they a precedent? > > They are, but, IMHO, we should no longer continue to create this type of > interfaces. Ok, in relation to the question I asked about sysctl's vs. /dev/* - why not? http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org