[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3268301-6cbd-904e-949c-7ccc4a2e5d36@redhat.com>
Date: Fri, 13 Nov 2020 18:36:02 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <sean.j.christopherson@...el.com>,
Cathy Avery <cavery@...hat.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
vkuznets@...hat.com, wei.huang2@....com, mlevitsk@...hat.com
Subject: Re: [PATCH v2 2/2] KVM: SVM: Use a separate vmcb for the nested L2
guest
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
Powered by blists - more mailing lists