lkml.org 
[lkml]   [2020]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] KVM: SVM: use vmsave/vmload for saving/restoring additional host state
On Mon, Dec 14, 2020 at 11:38 AM Sean Christopherson <seanjc@google.com> wrote:
>
> +Andy, who provided a lot of feedback on v1.
>
> >
> > static unsigned long svm_get_rflags(struct kvm_vcpu *vcpu)
> > @@ -3507,14 +3503,8 @@ static noinstr void svm_vcpu_enter_exit(struct kvm_vcpu *vcpu,
> >
> > __svm_vcpu_run(svm->vmcb_pa, (unsigned long *)&svm->vcpu.arch.regs);
>
> Tying in with avoiding svm->host_save_area, what about passing in the PA of the
> save area and doing the vmload in __svm_vcpu_run()? One less instance of inline
> assembly to stare at...

One potential side benefit is that we wouldn't execute any C code with
the wrong MSR_GS_BASE, which avoids any concerns about
instrumentation, stack protector, or some *SAN feature exploding due
to a percpu memory not working.

--Andy

\
 
 \ /
  Last update: 2020-12-14 21:11    [W:0.090 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site