提交 e244584f 编写于 作者: I Izik Eidus 提交者: Avi Kivity

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: stable@kernel.org
Signed-off-by: NIzik Eidus <ieidus@redhat.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 4075ea8c
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册