live migration support for initial write protect of VM
Subsystems (2)
PATCH 2/5 live migration support for initial write protect of VM
Add support for initial write protection of guest VM, to later manage dirty pages. Reduced TLB flushing to one flush after memory region is write protected. This is based on Erics patch, which applied cleanly. The only patch I found in the archives was the memory region delete, but still in arm.c.
Signed-off-by Mario Smarduch <[email protected]>
--- arch/arm/include/asm/kvm_host.h | 1 + arch/arm/kvm/arm.c | 4 ++ arch/arm/kvm/mmu.c | 125 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+)
arch/arm/include/asm/kvm_host.h +1 -0
@@ -229,5 +229,6 @@ u64 kvm_arm_timer_get_reg(struct kvm_vcpu *, u64 regid);int kvm_arm_timer_set_reg (struct kvm_vcpu *,u64 regid,u64 value);void kvm_tlb_flush_vm (struct kvm *kvm); +void kvm_mmu_slot_remove_write_access (struct kvm *kvm,int slot);#endif /* __ARM_KVM_HOST_H__ */
arch/arm/kvm/arm.c +4 -0
@@ -249,6 +249,10 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,unmap_stage2_range (kvm, gpa, size);spin_unlock (&kvm->mmu_lock); } + +/* Request has been issued to migrate the guest, 1st write protect VM */ +if ((change !=KVM_MR_DELETE ) && (mem->flags &KVM_MEM_LOG_DIRTY_PAGES )) +kvm_mmu_slot_remove_write_access (kvm, mem->slot); }void kvm_arch_flush_shadow_all (struct kvm *kvm)
arch/arm/kvm/mmu.c +125 -0
131 lines not on this page · raw message
Signature · 1 line
1.7.9.5