fix kvm_pv_eoi with kvmclock

When both kvmclock and kvm_pv_eoi are configured (either disabled or
enabled) libvirt will generate invalid CPU specification due to the
fact that even though kvmclock causes the CPU to be specified, it
doesn't set have_cpu flag to true (and the new kvm_pv_eoi as well).
This patch fixes the issue and adds a test exactly for that to show
that it is fixed correctly (and also to keep it that way in the future
of course).
This commit is contained in:
Martin Kletzander
2012-10-08 20:13:55 +02:00
parent 53d5ad94c0
commit 5d692cc714
4 changed files with 34 additions and 0 deletions
+2
View File
@@ -4210,6 +4210,7 @@ qemuBuildCpuArgStr(const struct qemud_driver *driver,
virBufferAsprintf(&buf, "%s,%ckvmclock",
have_cpu ? "" : default_model,
sign);
have_cpu = true;
break;
}
}
@@ -4224,6 +4225,7 @@ qemuBuildCpuArgStr(const struct qemud_driver *driver,
virBufferAsprintf(&buf, "%s,%ckvm_pv_eoi",
have_cpu ? "" : default_model,
sign);
have_cpu = true;
}
if (virBufferError(&buf))