Re: [PATCH 1/3] KVM: x86: use native MSR ops for SPEC_CTRL

From: Jim Mattson
Date: Wed Feb 21 2018 - 18:50:09 EST


On Wed, Feb 21, 2018 at 1:41 PM, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
> Having a paravirt indirect call in the IBRS restore path is not a
> good idea, since we are trying to protect from speculative execution
> of bogus indirect branch targets. It is also slower, so use
> native_wrmsrl on the vmentry path too.
>
> Fixes: d28b387fb74da95d69d2615732f50cceb38e9a4d
> Cc: x86@xxxxxxxxxx
> Cc: Radim KrÄmÃÅ <rkrcmar@xxxxxxxxxx>
> Cc: KarimAllah Ahmed <karahmed@xxxxxxxxx>
> Cc: David Woodhouse <dwmw@xxxxxxxxxxxx>
> Cc: Jim Mattson <jmattson@xxxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>

Seems like there ought to be a native_rdmsrl, but otherwise this looks fine.

Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>