Messages in this thread | | | From | Paolo Bonzini <> | Subject | Re: [PATCH v2 2/2] KVM: SVM: Use a separate vmcb for the nested L2 guest | Date | Fri, 13 Nov 2020 18:36:02 +0100 |
| |
On 13/10/20 03:33, Sean Christopherson wrote: >> + svm->vmcb = svm->vmcb01; >> + svm->vmcb_pa = svm->vmcb01_pa; > I very highly recommend adding a helper to switch VMCB. Odds are very good > there will be more than just these two lines of boilerplate code for changing > the active VMCB.
Yes, probably we can make svm->vmcb01 and svm->vmcb02 something like VMX's struct loaded_vmcs:
struct kvm_vmcb { void *vmcb; unsigned long pa; }
I don't expect a lot more to happen due to SVM having no need for caching, so for now I think it's okay.
I have other comments for which I'll reply to the patch itself.
Paolo
| |