Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 May 2008 20:53:12 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Rui Paulo <rpaulo@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, Andriy Gapon <avg@icyb.net.ua>
Subject:   Re: rdmsr from userspace
Message-ID:  <20080517175312.GM18958@deviant.kiev.zoral.com.ua>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--jva9z9iU4vGix/sz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, May 17, 2008 at 06:26:01PM +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=20
> >>>privilege level and thus is not permitted from userland. Maybe we=20
> >>>should provide something like Linux /dev/cpu/msr?
> >>>I don't like interface of that device, I think that ioctl approach=20
> >>>would be preferable in this case.
> >>>Something like create /dev/cpuN and allow some ioctls on it:=20
> >>>ioctl(cpu_fd, CPU_RDMSR, arg).
> >>>What do you think?
> >>>
> >>
> >>While I think this (devcpu) is good for testing and development, I=20
> >>prefer having a device driver to handle that specific MSR than a=20
> >>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?
>=20
> They are, but, IMHO, we should no longer continue to create this type of=
=20
> interfaces.

Why ? Are developers some kind of the second-class users ?

I would have no opinion on providing /dev/cpu by the loadable module, not
compiled into GENERIC. But the interface itself is useful at least for
three things:
- CPU identification (see x86info or whatever it is called);
- CPU tweaking for bugs workaround without patching the kernel;
- updating the CPU microcode.
None of these is limited to the developers only.

I am interested why Stanislav still did not submitted it for inclusion into
the base still. Maybe, some other reasons exist.

--jva9z9iU4vGix/sz
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkgvG4gACgkQC3+MBN1Mb4iodgCcCKViPJjwM7qHV/sFSDZOK/zS
OQkAoN6vNYhb9CltjRgoBAU3fkNyP4Rt
=1Z2a
-----END PGP SIGNATURE-----

--jva9z9iU4vGix/sz--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080517175312.GM18958>