1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

qemu: Retire QEMU_CAPS_BLOCKDEV

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2022-07-21 17:16:23 +02:00
parent f385b069c3
commit a0b8b54348
31 changed files with 6 additions and 49 deletions

View File

@ -504,7 +504,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
"usb-storage.werror", /* X_QEMU_CAPS_USB_STORAGE_WERROR */
"egl-headless", /* QEMU_CAPS_EGL_HEADLESS */
"vfio-pci.display", /* QEMU_CAPS_VFIO_PCI_DISPLAY */
"blockdev", /* QEMU_CAPS_BLOCKDEV */
"blockdev", /* X_QEMU_CAPS_BLOCKDEV */
/* 315 */
"vfio-ap", /* QEMU_CAPS_DEVICE_VFIO_AP */
@ -5223,10 +5223,6 @@ virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps)
static void
virQEMUCapsInitQMPVersionCaps(virQEMUCaps *qemuCaps)
{
/* While the removal of pre-blockdev code is in progress we always hard-code
* the support for QEMU_CAPS_BLOCKDEV */
virQEMUCapsSet(qemuCaps, QEMU_CAPS_BLOCKDEV);
/* -enable-fips is deprecated in QEMU 5.2.0, and QEMU
* should be built with gcrypt to achieve FIPS compliance
* automatically / implicitly
@ -6092,13 +6088,13 @@ struct virQEMUCapsDomainFeatureCapabilityTuple {
/**
* This maps the qemu features to the entries in <features> of the domain
* capability XML.
* capability XML. Use QEMU_CAPS_LAST to always enable a domain feature.
* */
static const struct virQEMUCapsDomainFeatureCapabilityTuple domCapsTuples[] = {
{ VIR_DOMAIN_CAPS_FEATURE_IOTHREADS, QEMU_CAPS_OBJECT_IOTHREAD },
{ VIR_DOMAIN_CAPS_FEATURE_VMCOREINFO, QEMU_CAPS_DEVICE_VMCOREINFO },
{ VIR_DOMAIN_CAPS_FEATURE_GENID, QEMU_CAPS_DEVICE_VMGENID },
{ VIR_DOMAIN_CAPS_FEATURE_BACKING_STORE_INPUT, QEMU_CAPS_BLOCKDEV },
{ VIR_DOMAIN_CAPS_FEATURE_BACKING_STORE_INPUT, QEMU_CAPS_LAST },
{ VIR_DOMAIN_CAPS_FEATURE_BACKUP, QEMU_CAPS_INCREMENTAL_BACKUP },
};
@ -6110,7 +6106,8 @@ virQEMUCapsFillDomainFeaturesFromQEMUCaps(virQEMUCaps *qemuCaps,
size_t i;
for (i = 0; i < G_N_ELEMENTS(domCapsTuples); i++) {
if (virQEMUCapsGet(qemuCaps, domCapsTuples[i].qemucap))
if (virQEMUCapsGet(qemuCaps, domCapsTuples[i].qemucap) ||
domCapsTuples[i].qemucap == QEMU_CAPS_LAST)
domCaps->features[domCapsTuples[i].domcap] = VIR_TRISTATE_BOOL_YES;
else
domCaps->features[domCapsTuples[i].domcap] = VIR_TRISTATE_BOOL_NO;

View File

@ -483,7 +483,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
X_QEMU_CAPS_USB_STORAGE_WERROR, /* -device usb-storage,werror=..,rerror=.. */
QEMU_CAPS_EGL_HEADLESS, /* -display egl-headless */
QEMU_CAPS_VFIO_PCI_DISPLAY, /* -device vfio-pci.display */
QEMU_CAPS_BLOCKDEV, /* -blockdev and blockdev-add are supported */
X_QEMU_CAPS_BLOCKDEV, /* -blockdev and blockdev-add are supported */
/* 315 */
QEMU_CAPS_DEVICE_VFIO_AP, /* -device vfio-ap */

View File

@ -5573,11 +5573,6 @@ qemuProcessStartUpdateCustomCaps(virDomainObj *vm)
return -1;
}
/* The code is being cleaned up to always assume the support for
* -blockdev thus we must no longer allow users to clear it */
if (tmp == QEMU_CAPS_BLOCKDEV)
continue;
virQEMUCapsClear(priv->qemuCaps, tmp);
}
}
@ -5602,11 +5597,6 @@ qemuProcessStartUpdateCustomCaps(virDomainObj *vm)
return -1;
}
/* The code is being cleaned up to always assume the support for
* -blockdev thus we must no longer allow users to clear it */
if (tmp == QEMU_CAPS_BLOCKDEV)
continue;
virQEMUCapsClear(priv->qemuCaps, tmp);
}
}

View File

@ -110,7 +110,6 @@
<flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -110,7 +110,6 @@
<flag name='machine.pseries.cap-htm'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -78,7 +78,6 @@
<flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='vfio-ap'/>
<flag name='zpci'/>
<flag name='memory-backend-memfd'/>

View File

@ -146,7 +146,6 @@
<flag name='mch.extended-tseg-mbytes'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -113,7 +113,6 @@
<flag name='tpm-emulator'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -113,7 +113,6 @@
<flag name='machine.pseries.cap-htm'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -109,7 +109,6 @@
<flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -146,7 +146,6 @@
<flag name='mch.extended-tseg-mbytes'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -41,7 +41,6 @@
<flag name='memory-backend-file.discard-data'/>
<flag name='screendump_device'/>
<flag name='egl-headless'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -145,7 +145,6 @@
<flag name='mch.extended-tseg-mbytes'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -112,7 +112,6 @@
<flag name='tpm-emulator'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -111,7 +111,6 @@
<flag name='machine.pseries.cap-htm'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -107,7 +107,6 @@
<flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -76,7 +76,6 @@
<flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='vfio-ap'/>
<flag name='zpci'/>
<flag name='memory-backend-memfd'/>

View File

@ -145,7 +145,6 @@
<flag name='mch.extended-tseg-mbytes'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -113,7 +113,6 @@
<flag name='tpm-emulator'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -76,7 +76,6 @@
<flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='vfio-ap'/>
<flag name='zpci'/>
<flag name='memory-backend-memfd'/>

View File

@ -145,7 +145,6 @@
<flag name='sev-guest'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -143,7 +143,6 @@
<flag name='mch.extended-tseg-mbytes'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -120,7 +120,6 @@
<flag name='tpm-emulator'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -110,7 +110,6 @@
<flag name='machine.pseries.cap-hpt-max-page-size'/>
<flag name='machine.pseries.cap-htm'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -143,7 +143,6 @@
<flag name='mch.extended-tseg-mbytes'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -120,7 +120,6 @@
<flag name='tpm-emulator'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -117,7 +117,6 @@
<flag name='machine.pseries.cap-htm'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -143,7 +143,6 @@
<flag name='mch.extended-tseg-mbytes'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -143,7 +143,6 @@
<flag name='mch.extended-tseg-mbytes'/>
<flag name='egl-headless'/>
<flag name='vfio-pci.display'/>
<flag name='blockdev'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='iothread.poll-max-ns'/>

View File

@ -73,7 +73,6 @@ qemuHotplugCreateObjects(virDomainXMLOption *xmlopt,
virQEMUCapsInitQMPBasicArch(priv->qemuCaps);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_SCSI);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_STORAGE);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_CCW);

View File

@ -883,9 +883,6 @@ testQemuInfoSetArgs(struct testQemuInfo *info,
if (!(info->args.fakeCaps = virQEMUCapsNew()))
abort();
/* until removal of the flags is completed we force them also in tests */
virQEMUCapsSet(info->args.fakeCaps, QEMU_CAPS_BLOCKDEV);
info->conf = conf;
info->args.newargs = true;