Home > other >  How to make the virtual machine snapshot support vcpu of 2 or more
How to make the virtual machine snapshot support vcpu of 2 or more

Time:09-29

Based on qemu - KVM - 0.12.5 and KVM kmod - 2.6.32 do hot snapshot of the virtual machine, I use - SMP 2 parameters to create two vcpu virtual machine snapshot, rollback error, create 1 vcpu virtual machine snapshot rollback all have no problem, the preliminary reason: the reoccupy cpu_physical_memory_set_dirty_tracking (1) page in memory write protect calls when the mmu. In c kvm_gpa_set_protect function, the function is as follows:
Int kvm_gpa_set_protect (struct * KVM, KVM uint64_t gpa)
{
Int ret=0;
//TODO How about mutil - vcpu.
Struct kvm_vcpu * vcpu;
int i;
For (I=0; i Vcpu=KVM - & gt; Vcpus [I];
/*
* As the Guest is not running at this moment,
* we need to load the kvm_mmu actively.
*/
//kvm_mmu_load (vcpu);
If (vcpu) {
break;
}
The else
continue;
}
If (tdp_enabled) {
Ret=kvm_gpa_set_protect_tdp_spte (vcpu, gpa);
Printk (" * * * * * * * * * * % s, ret=% d \ n ", __func__, ret);
If (ret)
return ret;
} else {
Printk (" * * * * * * * * * * ept disabled! \n");
}
return ret;
}

This function only supports a vcpu,


I don't know which master can help to give some advice, how to modify that he supports multiple vcpu, my poor knowledge, I don't know where laid a hand on him,
  • Related