On Thu, Feb 1, 2018 at 1:59 PM, KarimAllah Ahmed <[email protected]> wrote: > [ Based on a patch from Ashok Raj <[email protected]> ] > > Add direct access to MSR_IA32_SPEC_CTRL for guests. This is needed for > guests that will only mitigate Spectre V2 through IBRS+IBPB and will not > be using a retpoline+IBPB based approach. > > To avoid the overhead of saving and restoring the MSR_IA32_SPEC_CTRL for > guests that do not actually use the MSR, only start saving and restoring > when a non-zero is written to it. > > No attempt is made to handle STIBP here, intentionally. Filtering STIBP > may be added in a future patch, which may require trapping all writes > if we don't want to pass it through directly to the guest. > > [dwmw2: Clean up CPUID bits, save/restore manually, handle reset] > > Cc: Asit Mallick <[email protected]> > Cc: Arjan Van De Ven <[email protected]> > Cc: Dave Hansen <[email protected]> > Cc: Andi Kleen <[email protected]> > Cc: Andrea Arcangeli <[email protected]> > Cc: Linus Torvalds <[email protected]> > Cc: Tim Chen <[email protected]> > Cc: Thomas Gleixner <[email protected]> > Cc: Dan Williams <[email protected]> > Cc: Jun Nakajima <[email protected]> > Cc: Paolo Bonzini <[email protected]> > Cc: David Woodhouse <[email protected]> > Cc: Greg KH <[email protected]> > Cc: Andy Lutomirski <[email protected]> > Cc: Ashok Raj <[email protected]> > Signed-off-by: KarimAllah Ahmed <[email protected]> > Signed-off-by: David Woodhouse <[email protected]>
Reviewed-by: Jim Mattson <[email protected]>

