qemu: validate: Always assume QEMU_CAPS_SPICE_FILE_XFER_DISABLE

QEMU added the capability to disable file transfers via spice in commit
5ad24e5f3b ("spice: Add -spice disable-agent-file-transfer cmdline
option (rhbz#961850)") released in qemu-v1.6.0 and the option can't be
disabled.

Remove the unnecessary validation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-09-23 09:11:29 +02:00
parent 1ceb92d415
commit 686caa57e5
4 changed files with 3 additions and 15 deletions

View File

@ -4031,13 +4031,6 @@ qemuValidateDomainDeviceDefSPICEGraphics(const virDomainGraphicsDef *graphics,
break;
}
if (graphics->data.spice.filetransfer == VIR_TRISTATE_BOOL_NO &&
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE_FILE_XFER_DISABLE)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("This QEMU can't disable file transfers through spice"));
return -1;
}
if (graphics->data.spice.gl == VIR_TRISTATE_BOOL_YES) {
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE_GL)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",

View File

@ -91,7 +91,6 @@ qemuHotplugCreateObjects(virDomainXMLOption *xmlopt,
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_PIIX_DISABLE_S4);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VNC);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SPICE);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SPICE_FILE_XFER_DISABLE);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_PR_MANAGER_HELPER);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_BLOCK);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_KBD);

View File

@ -1503,8 +1503,7 @@ mymain(void)
QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_SDL);
DO_TEST("graphics-spice",
QEMU_CAPS_SPICE,
QEMU_CAPS_DEVICE_QXL,
QEMU_CAPS_SPICE_FILE_XFER_DISABLE);
QEMU_CAPS_DEVICE_QXL);
DO_TEST("graphics-spice-no-args",
QEMU_CAPS_SPICE, QEMU_CAPS_DEVICE_CIRRUS_VGA);
driver.config->spiceSASL = 1;
@ -1537,8 +1536,7 @@ mymain(void)
QEMU_CAPS_DEVICE_CIRRUS_VGA);
DO_TEST("graphics-spice-agent-file-xfer",
QEMU_CAPS_SPICE,
QEMU_CAPS_DEVICE_QXL,
QEMU_CAPS_SPICE_FILE_XFER_DISABLE);
QEMU_CAPS_DEVICE_QXL);
DO_TEST("graphics-spice-socket",
QEMU_CAPS_SPICE,
QEMU_CAPS_SPICE_UNIX,

View File

@ -389,8 +389,7 @@ mymain(void)
cfg->spiceTLS = true;
DO_TEST("graphics-spice",
QEMU_CAPS_DEVICE_QXL,
QEMU_CAPS_SPICE,
QEMU_CAPS_SPICE_FILE_XFER_DISABLE);
QEMU_CAPS_SPICE);
DO_TEST("graphics-spice-compression",
QEMU_CAPS_DEVICE_QXL,
QEMU_CAPS_SPICE);
@ -1225,7 +1224,6 @@ mymain(void)
QEMU_CAPS_DEVICE_VIRTIO_GPU,
QEMU_CAPS_VIRTIO_GPU_VIRGL,
QEMU_CAPS_SPICE,
QEMU_CAPS_SPICE_FILE_XFER_DISABLE,
QEMU_CAPS_SPICE_GL,
QEMU_CAPS_SPICE_RENDERNODE);
DO_TEST("video-virtio-gpu-sdl-gl",