1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

qemu: caps: Always assume QEMU_CAPS_DEVICE_DEL_EVENT

DEVICE_DELETED was added in qemu commit 0402a5d65ec00 which was released
in v1.5.0.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Peter Krempa 2019-02-07 12:08:57 +01:00
parent 458a3453da
commit 8c191a9061
42 changed files with 2 additions and 54 deletions

View File

@ -987,7 +987,6 @@ struct virQEMUCapsStringFlags virQEMUCapsMigration[] = {
};
struct virQEMUCapsStringFlags virQEMUCapsEvents[] = {
{ "DEVICE_DELETED", QEMU_CAPS_DEVICE_DEL_EVENT },
{ "MIGRATION", QEMU_CAPS_MIGRATION_EVENT },
{ "VSERPORT_CHANGE", QEMU_CAPS_VSERPORT_CHANGE },
{ "DEVICE_TRAY_MOVED", QEMU_CAPS_DEVICE_TRAY_MOVED },

View File

@ -257,7 +257,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
/* 150 */
X_QEMU_CAPS_VNC_SHARE_POLICY, /* set display sharing policy */
QEMU_CAPS_DEVICE_DEL_EVENT, /* DEVICE_DELETED event */
X_QEMU_CAPS_DEVICE_DEL_EVENT, /* DEVICE_DELETED event */
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, /* -device i82801b11-bridge */
QEMU_CAPS_I440FX_PCI_HOLE64_SIZE, /* i440FX-pcihost.pci-hole64-size */
QEMU_CAPS_Q35_PCI_HOLE64_SIZE, /* q35-pcihost.pci-hole64-size */

View File

@ -9486,9 +9486,6 @@ qemuDomainUpdateDeviceList(virQEMUDriverPtr driver,
char **aliases;
int rc;
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT))
return 0;
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
return -1;
rc = qemuMonitorGetDeviceAliases(priv->mon, &aliases);

View File

@ -5116,9 +5116,6 @@ qemuDomainMarkDeviceAliasForRemoval(virDomainObjPtr vm,
memset(&priv->unplug, 0, sizeof(priv->unplug));
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT))
return;
priv->unplug.alias = alias;
}
@ -5142,11 +5139,9 @@ qemuDomainResetDeviceRemoval(virDomainObjPtr vm)
/* Returns:
* -1 Unplug of the device failed
*
* 0 DEVICE_DELETED event is supported and removal of the device did not
* finish in qemuDomainRemoveDeviceWaitTime
* 0 removal of the device did not finish in qemuDomainRemoveDeviceWaitTime
*
* 1 when the caller is responsible for finishing the device removal:
* - DEVICE_DELETED event is unsupported
* - DEVICE_DELETED event arrived before the timeout time
* - we failed to reliably wait for the event and thus use fallback behavior
*/
@ -5157,9 +5152,6 @@ qemuDomainWaitForDeviceRemoval(virDomainObjPtr vm)
unsigned long long until;
int rc;
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT))
return 1;
if (virTimeMillisNow(&until) < 0)
return 1;
until += qemuDomainRemoveDeviceWaitTime;

View File

@ -3635,9 +3635,6 @@ qemuProcessUpdateDevices(virQEMUDriverPtr driver,
char **tmp;
int ret = -1;
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT))
return 0;
old = priv->qemuDevices;
priv->qemuDevices = NULL;
if (qemuDomainUpdateDeviceList(driver, vm, QEMU_ASYNC_JOB_NONE) < 0)

View File

@ -61,7 +61,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>

View File

@ -61,7 +61,6 @@
<flag name='vfio-pci'/>
<flag name='mem-merge'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -62,7 +62,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -50,7 +50,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>

View File

@ -50,7 +50,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>
<flag name='virtio-mmio'/>

View File

@ -35,7 +35,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='virtio-mmio'/>
<flag name='boot-strict'/>
<flag name='msg-timestamp'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -35,7 +35,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='virtio-mmio'/>
<flag name='boot-strict'/>
<flag name='msg-timestamp'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -50,7 +50,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>

View File

@ -50,7 +50,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>
<flag name='virtio-mmio'/>

View File

@ -35,7 +35,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='virtio-mmio'/>
<flag name='boot-strict'/>
<flag name='msg-timestamp'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -52,7 +52,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>

View File

@ -50,7 +50,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>
<flag name='virtio-mmio'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -35,7 +35,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='virtio-mmio'/>
<flag name='boot-strict'/>
<flag name='msg-timestamp'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -35,7 +35,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='virtio-mmio'/>
<flag name='boot-strict'/>
<flag name='msg-timestamp'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -50,7 +50,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>
<flag name='virtio-mmio'/>

View File

@ -35,7 +35,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='virtio-mmio'/>
<flag name='boot-strict'/>
<flag name='msg-timestamp'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -50,7 +50,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>
<flag name='ich9-intel-hda'/>

View File

@ -25,7 +25,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='virtio-mmio'/>
<flag name='boot-strict'/>
<flag name='msg-timestamp'/>

View File

@ -25,7 +25,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='virtio-mmio'/>
<flag name='boot-strict'/>
<flag name='msg-timestamp'/>

View File

@ -37,7 +37,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='boot-strict'/>
<flag name='msg-timestamp'/>
<flag name='active-commit'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -51,7 +51,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>
<flag name='ich9-intel-hda'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -54,7 +54,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>
<flag name='virtio-mmio'/>

View File

@ -54,7 +54,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='usb-storage'/>
<flag name='usb-storage.removable'/>
<flag name='virtio-mmio'/>

View File

@ -64,7 +64,6 @@
<flag name='mem-merge'/>
<flag name='drive-discard'/>
<flag name='mlock'/>
<flag name='device-del-event'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='i440fx-pci-hole64-size'/>
<flag name='q35-pci-hole64-size'/>

View File

@ -78,7 +78,6 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt,
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_PLAIN);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_DISK_WWN);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT);
if (qemuTestCapsCacheInsert(driver.qemuCapsCache, priv->qemuCaps) < 0)
goto cleanup;