[libvirt] [PATCH v2 1/5] qemu_hotplug: Introduce and use qemuDomainDeleteDevice

Michal Privoznik mprivozn at redhat.com
Thu Mar 14 13:56:50 UTC 2019


On 3/14/19 2:04 PM, Peter Krempa wrote:
> On Thu, Mar 14, 2019 at 13:22:35 +0100, Michal Privoznik wrote:
>> The aim of this function will be to fix return value of
>> qemuMonitorDelDevice() in one specific case. But that is yet to
>> come. Right now this is nothing but a plain substitution.
>>
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> ---
>>   src/qemu/qemu_hotplug.c | 278 +++++++++++++++-------------------------
>>   1 file changed, 103 insertions(+), 175 deletions(-)
>>
>> diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
>> index f43f80668c..baa4713cf4 100644
>> --- a/src/qemu/qemu_hotplug.c
>> +++ b/src/qemu/qemu_hotplug.c
>> @@ -67,6 +67,44 @@ VIR_LOG_INIT("qemu.qemu_hotplug");
>>   unsigned long long qemuDomainRemoveDeviceWaitTime = 1000ull * 5;
>>   
>>   
>> +/**
>> + * qemuDomainDeleteDevice:
>> + * @vm: domain object
>> + * @alias: device to remove
>> + * @enterMonitor: whether do EnterMonitor/ExitMonitor too
> 
> I'm not persuaded about usefullnes of this argument.
> 

<snip/>

> This means that for the ZPCI extension device does not need this
> handling as basically any errors should be ignore. Since the
> 'enterMonitor' flag results into an utter locking mess in the upcomming
> commit which is basically useless you should drop
> it, make the ZPCI function ignore error if the device is missing and use
> qemuMonitorDelDevice rather than qemuDomainDeleteDevice in it.
> 

Fair enough.

Michal




More information about the libvir-list mailing list