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

2021-02-02 Thread Paolo Bonzini
On 05/01/21 18:20, Sean Christopherson wrote: This VMLOAD needs the "handle fault on reboot" goo. Seeing the code, I think I'd prefer to handle this in C code, especially if Paolo takes the svm_ops.h patch[*]. Actually, I think with that patch it'd make sense to move the existing VMSAVE+VMLOAD

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

2021-01-07 Thread Michael Roth
On Tue, Jan 05, 2021 at 09:20:03AM -0800, Sean Christopherson wrote: > On Tue, Jan 05, 2021, Michael Roth wrote: > > @@ -3703,16 +3688,9 @@ static noinstr void svm_vcpu_enter_exit(struct > > kvm_vcpu *vcpu, > > if (sev_es_guest(svm->vcpu.kvm)) { > >

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

2021-01-07 Thread Tom Lendacky
On 1/7/21 9:32 AM, Tom Lendacky wrote: On 1/5/21 11:20 AM, Sean Christopherson wrote: On Tue, Jan 05, 2021, Michael Roth wrote: @@ -3703,16 +3688,9 @@ static noinstr void svm_vcpu_enter_exit(struct kvm_vcpu *vcpu,   if (sev_es_guest(svm->vcpu.kvm)) {  

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

2021-01-07 Thread Tom Lendacky
On 1/5/21 8:37 AM, Michael Roth wrote: Using a guest workload which simply issues 'hlt' in a tight loop to generate VMEXITs, it was observed (on a recent EPYC processor) that a significant amount of the VMEXIT overhead measured on the host was the result of MSR reads/writes in

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

2021-01-07 Thread Tom Lendacky
On 1/5/21 11:20 AM, Sean Christopherson wrote: On Tue, Jan 05, 2021, Michael Roth wrote: @@ -3703,16 +3688,9 @@ static noinstr void svm_vcpu_enter_exit(struct kvm_vcpu *vcpu, if (sev_es_guest(svm->vcpu.kvm)) { __svm_sev_es_vcpu_run(svm->vmcb_pa); } else { -

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

2021-01-05 Thread Sean Christopherson
On Tue, Jan 05, 2021, Michael Roth wrote: > @@ -3703,16 +3688,9 @@ static noinstr void svm_vcpu_enter_exit(struct > kvm_vcpu *vcpu, > if (sev_es_guest(svm->vcpu.kvm)) { > __svm_sev_es_vcpu_run(svm->vmcb_pa); > } else { > - __svm_vcpu_run(svm->vmcb_pa,

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

2021-01-05 Thread Michael Roth
Using a guest workload which simply issues 'hlt' in a tight loop to generate VMEXITs, it was observed (on a recent EPYC processor) that a significant amount of the VMEXIT overhead measured on the host was the result of MSR reads/writes in svm_vcpu_load/svm_vcpu_put according to perf: