3 ms·
My guess is that the CPU will fault if you try to directly write them from a user mode process. You could do that via the MSR kernel driver but it'd be the kern
by rbanffy 6y ago
My guess is that the CPU will fault if you try to directly write them from a user mode process. You could do that via the MSR kernel driver but it'd be the kernel doing it in kernel mode.
- ajross 6y agoIt will. RD/WRMSR are privileged instructions and will raise an illegal instruction exception if executed outside of ring 0. The kernel has always had a device-level interface to these instructions for the benefit of (properly authenticated) userspace processes. But as a design point, this is being rolled back. There are just so many MSRs in the modern world and so many are trivially system-breaking that it's just not possible to sanely administer an interface like that.