]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Move asid to vcpu_svm
authorCathy Avery <cavery@redhat.com>
Sun, 11 Oct 2020 18:48:17 +0000 (14:48 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Nov 2020 18:14:21 +0000 (13:14 -0500)
commit8c562362bf08cc93144a7076728da04410b99d95
treecd2da8ab0aa969b58987be9af6e2a9874a4108f3
parent5f92e8432809e4a6f064c4c7a566ac5a42813102
KVM: SVM: Move asid to vcpu_svm

KVM does not have separate ASIDs for L1 and L2; either the nested
hypervisor and nested guests share a single ASID, or on older processor
the ASID is used only to implement TLB flushing.

Either way, ASIDs are handled at the VM level.  In preparation
for having different VMCBs passed to VMLOAD/VMRUN/VMSAVE for L1 and
L2, store the current ASID to struct vcpu_svm and only move it to
the VMCB in svm_vcpu_run.  This way, TLB flushes can be applied
no matter which VMCB will be active during the next svm_vcpu_run.

Signed-off-by: Cathy Avery <cavery@redhat.com>
Message-Id: <20201011184818.3609-2-cavery@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h