[PATCH 0/3] arm64:msr: Add MSR driver
Ard Biesheuvel
ardb at kernel.org
Tue Dec 1 10:26:07 EST 2020
On Tue, 1 Dec 2020 at 16:17, Rongwei Wang
<rongwei.wang at linux.alibaba.com> wrote:
>
>
>
> > 2020年12月1日 下午10:54,Borislav Petkov <bp at alien8.de> 写道:
> >
> > On Tue, Dec 01, 2020 at 10:33:42PM +0800, wangrongwei wrote:
> >> Yes, and x86 also provides two instructions with the same name in the
> >> instruction set, but not in ARM.
> >
> > Sorry, I can't parse what you're trying to say here.
> In the ARM architecture, there are no rdmsr and wrmsr instructions.
> In ARM, the system registers can only be accessed through msr and mrs, so the problem created by MSR driver (depend on rdmsr and wrmsr) in x86 is not necessarily present in ARM, which is very different from x86.
> In addition, we want cross-platform compatabilities, and fill these gaps in the ARM.
Apologies for being blunt, but this looks like another occurrence of
the 'compatibility' disease, where everything has to work in the exact
same way as it does on x86, even if it was a terrible idea to begin
with.
One of the nice things of having a [relatively] new architecture is
that we are not being held back by backward compatibility
requirements, given that we cannot break existing use cases that
predate the existence of the architecture.
In other words, there are things that the x86 maintainers would gladly
remove (such as MSR access from userland, and I'm sure there are many
examples), but they simply cannot because it is already being relied
upon in the field. But that does not mean other architectures are
required to provide a similar interface, and especially not ones that
allow you to poke at undocumented, non-architected CPU registers.
More information about the linux-arm-kernel
mailing list