Re: [PATCH] x86/entry/64: Disallow RDPID in paranoid entry if KVM is enabled

From: Paolo Bonzini
Date: Fri Aug 21 2020 - 05:37:21 EST


On 21/08/20 11:28, Thomas Gleixner wrote:
> We all know that MSRs are slow, but as a general rule I have to make it
> entirely clear that the kernel has precedence over KVM.

I totally agree. I just don't think that it matters _in this case_,
because the kernel hardly has any reason to use TSC_AUX while in ring0.

Paolo

> If the kernel wants to use an MSR for it's own purposes then KVM has to
> deal with that and not the other way round. Preventing the kernel from
> using a facility freely is not an option ever.
>
> The insanities of KVM performance optimizations have bitten us more than
> once.
>
> For this particular case at hand I don't care much and we should just
> rip the whole RDPID thing out unconditionally. We still have zero
> numbers about the performance difference vs. LSL.