mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
KVM: Fix dirty bit tracking for slots with large pages
When slot is already allocated and being asked to be tracked we need to break the large pages. This code flush the mmu when someone ask a slot to start dirty bit tracking. Cc: [email protected] Signed-off-by: Izik Eidus <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
This commit is contained in:
parent
4075ea8c54
commit
e244584fe3
1 changed files with 2 additions and 0 deletions
|
|
@ -1194,6 +1194,8 @@ int __kvm_set_memory_region(struct kvm *kvm,
|
|||
if (!new.dirty_bitmap)
|
||||
goto out_free;
|
||||
memset(new.dirty_bitmap, 0, dirty_bytes);
|
||||
if (old.npages)
|
||||
kvm_arch_flush_shadow(kvm);
|
||||
}
|
||||
#endif /* not defined CONFIG_S390 */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue