mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ANDROID: KVM: arm64: Don't remove shadow table entry twice on teardown
__pkvm_teardown_shadow() already removes the shadow table entry for
the VM being torn down while the shadow_lock is held, so drop the
additional removal and avoid corrupting 'num_shadow_entries' in the
process.
Fixes: 6f93dc7bb9 ("ANDROID: KVM: arm64: Refcount shadow structs on vcpu_{load/put}()")
Signed-off-by: Fuad Tabba <tabba@google.com>
Bug: 209580772
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: Ie09ecde8c9b6f14ea1ee9d27fba62b713c21e484
This commit is contained in:
@@ -655,7 +655,6 @@ int __pkvm_teardown_shadow(struct kvm *kvm)
|
||||
/* Reclaim guest pages, and page-table pages */
|
||||
mc = &vm->host_kvm->arch.pkvm.teardown_mc;
|
||||
reclaim_guest_pages(vm, mc);
|
||||
remove_shadow_table(shadow_handle);
|
||||
unpin_host_vcpus(vm);
|
||||
|
||||
/* Push the metadata pages to the teardown memcache */
|
||||
|
||||
Reference in New Issue
Block a user