[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [BUG] Migrate failes between boards with different PMC coun
[Qemu-devel] [BUG] Migrate failes between boards with different PMC counts
Mon, 24 Apr 2017 06:26:27 +0000
Recently, I found migration failed when enable vPMU.
migrate vPMU state was introduced in linux-3.10 + qemu-1.7.
As long as enable vPMU, qemu will save / load the
vmstate_msr_architectural_pmu(msr_global_ctrl) register during the migration.
But global_ctrl generated based on cpuid(0xA), the number of general-purpose
monitoring counters(PMC) can vary according to Intel SDN. The number of PMC
to vm, does not support configuration currently, it depend on host cpuid, and
enable all pmc
defaultly at KVM. It cause migration to fail between boards with different PMC
The return value of cpuid (0xA) is different dur to cpu, according to Intel
SDN，18-10 Vol. 3B:
Note: The number of general-purpose performance monitoring counters (i.e. N in
can vary across processor generations within a processor family, across
processor families, or
could be different depending on the configuration chosen at boot time in the
Intel Hyper Threading Technology, (e.g. N=2 for 45 nm Intel Atom processors; N
=4 for processors
based on the Nehalem microarchitecture; for processors based on the Sandy Bridge
microarchitecture, N = 4 if Intel Hyper Threading Technology is active and N=8
if not active).
Also I found, N=8 if HT is not active based on the broadwell，,
such as CPU E7-8890 v4 @ 2.20GHz
# ./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -smp 4 -m 4096 -hda
/data/zyy/test_qemu.img.sles12sp1 -vnc :99 -cpu kvm64,pmu=true -incoming
Completed 100 %
qemu-system-x86_64: error: failed to set MSR 0x38f to 0x7000000ff
Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
So make number of pmc configurable to vm ? Any better idea ?
- [Qemu-devel] [BUG] Migrate failes between boards with different PMC counts,