[lkml]   [2020]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] KVM: SVM: Use a separate vmcb for the nested L2 guest
On 17/09/20 21:23, Cathy Avery wrote:
> 2) There is a workaround in nested_svm_vmexit() where
> if (svm->vmcb01->control.asid == 0)
> svm->vmcb01->control.asid = svm->nested.vmcb02->control.asid;
> This was done as a result of the kvm selftest 'state_test'. In that
> test svm_set_nested_state() is called before svm_vcpu_run().
> The asid is assigned by svm_vcpu_run -> pre_svm_run for the current
> vmcb which is now vmcb02 as we are in nested mode subsequently
> vmcb01.control.asid is never set as it should be.

I think the asid should be kept in svm->asid, and copied to
svm->vmcb->control.asid in svm_vcpu_run. It's slightly overkill for
non-nested but it simplifies the nested case a lot so it's worth it.

That would be a first patch in the series, placed before this one.


 \ /
  Last update: 2020-09-22 17:05    [W:0.401 / U:2.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site