Re: [PATCH] KVM: SVM: use vmsave/vmload for saving/restoring additional host state

From: Sean Christopherson
Date: Thu Dec 10 2020 - 20:29:44 EST


Michael, please reply to all so that everyone can read along and so that the
conversation gets recorded in the various mailing list archives.

If you are replying all, then I think something funky is going on with AMD's
mail servers, as I'm not getting your responses (I double checked SPAM), nor are
they showing up on lore.

On Thu, Dec 10, 2020, Andy Lutomirski wrote:
> > On Dec 10, 2020, at 4:48 PM, Michael Roth <michael.roth@xxxxxxx> wrote:
> >
>
> >> I think there are two reasonable ways to do this:
> >>
> >> 1. VMLOAD before STGI. This is obviously correct, and it's quite simple.
> >
> > For the testing I ended up putting it immediately after __svm_vcpu_run()
> > since that's where we restored GS base previously. Does that seem okay or did
> > you have another place in mind?
>
> Looks okay. If we get an NMI or MCE with the wrong MSR_GS_BASE, then
> we are toast, at least on Zen 2 and earlier. But that spot has GI ==
> 0, so this won't happen.