On 11/11/13 10:23, Guido Günther wrote: > There's no need to probe CPU features if we don't need them later. > > Debian Wheezy's QEMU 1.1.2 lacks the feature-word option so this > unbreaks starting domains that got broken by > d94b7817719b064849818b9ba6c37e403b7c003c like > > error: internal error: unable to execute QEMU command 'qom-get': Property '.feature-words' not found > --- > This might not be ideal since we might to want to use > qemuMonitorGetGuestCPU somewhere else later so I'm happy > to improve on this. > Cheers, > -- Guido > > src/qemu/qemu_process.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c > index fcceedd..be09ea0 100644 > --- a/src/qemu/qemu_process.c > +++ b/src/qemu/qemu_process.c > @@ -3477,14 +3477,14 @@ qemuProcessVerifyGuestCPU(virQEMUDriverPtr driver, virDomainObjPtr vm) > switch (arch) { > case VIR_ARCH_I686: > case VIR_ARCH_X86_64: > - qemuDomainObjEnterMonitor(driver, vm); > - guestcpu = qemuMonitorGetGuestCPU(priv->mon, arch); > - qemuDomainObjExitMonitor(driver, vm); > + if (def->features[VIR_DOMAIN_FEATURE_PVSPINLOCK] == VIR_DOMAIN_FEATURE_STATE_ON) { > + qemuDomainObjEnterMonitor(driver, vm); > + guestcpu = qemuMonitorGetGuestCPU(priv->mon, arch); > + qemuDomainObjExitMonitor(driver, vm); > > - if (!(guestcpu)) > - goto cleanup; > + if (!(guestcpu)) > + goto cleanup; > > - if (def->features[VIR_DOMAIN_FEATURE_PVSPINLOCK] == VIR_DOMAIN_FEATURE_STATE_ON) { > if (!cpuHasFeature(guestcpu, VIR_CPU_x86_KVM_PV_UNHALT)) { > virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > _("host doesn't support paravirtual spinlocks")); > While this correctly fixes the problem, the code won't be extendable in the future. I'll try sending a patch to fix this problem more cleanly. Sorry for causing trouble. Peter
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list