[libvirt] [PATCH v5 11/13] qemu: Add hotpluging support for PCI devices on S390 guests

Yi Min Zhao zyimin at linux.ibm.com
Tue Sep 18 07:44:05 UTC 2018



在 2018/9/17 下午8:40, Andrea Bolognani 写道:
>>>>    
>>>>        qemuDomainObjEnterMonitor(driver, vm);
>>>> -    ret = qemuMonitorAddDevice(priv->mon, devstr);
>>>> +
>>>> +    if (qemuDomainAttachExtensionDevice(priv->mon, &controller->info) < 0) {
>>>> +        ignore_value(qemuDomainObjExitMonitor(driver, vm));
>>>> +        goto cleanup;
>>>> +    }
>>> I'm not sure this is entirely safe. Perhaps you should introduce an
>>> exit_monitor label that ensures failure to exit the monitor is also
>>> taken into account, and jump to that one instead?
>> I see there're a lot of code ignoring monitor exit failure. Of course,
>> taking it into account
>> is proper. Do you strongly suggest to add that?
> As mentioned a while ago, I'm not particularly comfortable around
> this part of libvirt, so we should definitely have someone with
> more experience look it over before merging.
>
> That said, while there are indeed a few existing places where the
> return value of qemuDomainObjExitMonitor() is ignored, it seems
> like it's far more common to take it into account, so I would say
> do that unless you have a very good reason not to.
>
I will take it into account in next version.

-- 
Yi Min




More information about the libvir-list mailing list