diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index fd7b90e47d..b02da95c1e 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4495,12 +4495,21 @@ qemuValidateDomainDeviceDefFS(virDomainFSDef *fs, if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, "virtiofs") < 0) { return -1; } - if (fs->info.bootIndex && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VHOST_USER_FS_BOOTINDEX)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("setting virtiofs boot order is not supported with this QEMU binary")); - return -1; + + if (fs->info.bootIndex) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VHOST_USER_FS_BOOTINDEX)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("setting virtiofs boot order is not supported with this QEMU binary")); + return -1; + } + + if (fs->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("setting virtiofs boot order is supported only with PCI bus")); + return -1; + } } + break; case VIR_DOMAIN_FS_DRIVER_TYPE_MTP: diff --git a/tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.s390x-latest.err b/tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.s390x-latest.err new file mode 100644 index 0000000000..d865421bc7 --- /dev/null +++ b/tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.s390x-latest.err @@ -0,0 +1 @@ +unsupported configuration: setting virtiofs boot order is supported only with PCI bus diff --git a/tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.xml b/tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.xml new file mode 100644 index 0000000000..833b91d574 --- /dev/null +++ b/tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.xml @@ -0,0 +1,38 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + + + + hvm + + + destroy + restart + destroy + + /usr/bin/qemu-system-s390x + + + + +
+ +