Re: [PATCH 3/3] KVM: SVM: Sync GPRs to the GHCB only after VMGEXIT

2021-01-22 Thread Sean Christopherson
On Fri, Jan 22, 2021, Tom Lendacky wrote: > On 1/22/21 5:50 PM, Sean Christopherson wrote: > > Sync GPRs to the GHCB on VMRUN only if a sync is needed, i.e. if the > > previous exit was a VMGEXIT and the guest is expecting some data back. > > > > The start of sev_es_sync_to_ghcb() checks if the

Re: [PATCH 3/3] KVM: SVM: Sync GPRs to the GHCB only after VMGEXIT

2021-01-22 Thread Tom Lendacky
On 1/22/21 5:50 PM, Sean Christopherson wrote: Sync GPRs to the GHCB on VMRUN only if a sync is needed, i.e. if the previous exit was a VMGEXIT and the guest is expecting some data back. The start of sev_es_sync_to_ghcb() checks if the GHCB has been mapped, which only occurs on VMGEXIT, and

[PATCH 3/3] KVM: SVM: Sync GPRs to the GHCB only after VMGEXIT

2021-01-22 Thread Sean Christopherson
Sync GPRs to the GHCB on VMRUN only if a sync is needed, i.e. if the previous exit was a VMGEXIT and the guest is expecting some data back. Cc: Brijesh Singh Cc: Tom Lendacky Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm/sev.c | 15 ++- arch/x86/kvm/svm/svm.h | 1 + 2