You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
KVM: MMU: nuke shadowed pgtable pages and ptes on memslot destruction
Flush the shadow mmu before removing regions to avoid stale entries. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
committed by
Avi Kivity
parent
d6e88aec07
commit
34d4cb8fca
@@ -405,6 +405,9 @@ int __kvm_set_memory_region(struct kvm *kvm,
|
||||
if (mem->slot >= kvm->nmemslots)
|
||||
kvm->nmemslots = mem->slot + 1;
|
||||
|
||||
if (!npages)
|
||||
kvm_arch_flush_shadow(kvm);
|
||||
|
||||
*memslot = new;
|
||||
|
||||
r = kvm_arch_set_memory_region(kvm, mem, old, user_alloc);
|
||||
|
||||
Reference in New Issue
Block a user