diff options
author | 2025-02-24 15:55:39 -0800 | |
---|---|---|
committer | 2025-02-26 13:17:23 -0500 | |
commit | ed09b50b5411a6dcbf350ac7ea6270d786baa282 (patch) | |
tree | ebcd2c0391dce46434f42ca9899bd75e9428937f | |
parent | KVM: nVMX: Process events on nested VM-Exit if injectable IRQ or NMI is pending (diff) | |
download | wireguard-linux-ed09b50b5411a6dcbf350ac7ea6270d786baa282.tar.xz wireguard-linux-ed09b50b5411a6dcbf350ac7ea6270d786baa282.zip |
KVM: x86: Don't load/put vCPU when unloading its MMU during teardown
Don't load (and then put) a vCPU when unloading its MMU during VM
destruction, as nothing in kvm_mmu_unload() accesses vCPU state beyond the
root page/address of each MMU, i.e. can't possible need to run with the
vCPU loaded.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20250224235542.2562848-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | arch/x86/kvm/x86.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 6fc4ddc606bd..15de6e92af7d 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -12754,13 +12754,6 @@ out: return ret; } -static void kvm_unload_vcpu_mmu(struct kvm_vcpu *vcpu) -{ - vcpu_load(vcpu); - kvm_mmu_unload(vcpu); - vcpu_put(vcpu); -} - static void kvm_unload_vcpu_mmus(struct kvm *kvm) { unsigned long i; @@ -12768,7 +12761,7 @@ static void kvm_unload_vcpu_mmus(struct kvm *kvm) kvm_for_each_vcpu(i, vcpu, kvm) { kvm_clear_async_pf_completion_queue(vcpu); - kvm_unload_vcpu_mmu(vcpu); + kvm_mmu_unload(vcpu); } } |