]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: clear MMIO cache when unloading the MMU
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 14 Feb 2022 14:13:48 +0000 (09:13 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Feb 2022 13:20:19 +0000 (08:20 -0500)
commitbac8158176bc4e41070c907001b17f354d1c1438
treea1643221f31022220049b31855f0716f1c47a316
parent80365f1be7f9605a7bce3f98c3ed533f282ef497
KVM: x86/mmu: clear MMIO cache when unloading the MMU

For cleanliness, do not leave a stale GVA in the cache after all the roots are
cleared.  In practice, kvm_mmu_load will go through kvm_mmu_sync_roots if
paging is on, and will not use vcpu_match_mmio_gva at all if paging is off.
However, leaving data in the cache might cause bugs in the future.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c