diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index f117441ece..4ef944addb 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1850,12 +1850,6 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef *net, return -1; } - if (net->type == VIR_DOMAIN_NET_TYPE_VHOSTUSER && - net->backend.type == VIR_DOMAIN_NET_BACKEND_PASST) { - if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, "interface type=\"vhostuser\" backend type=\"passt\"") < 0) - return -1; - } - if (net->type == VIR_DOMAIN_NET_TYPE_VDPA) { if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_NETDEV_VHOST_VDPA)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -1879,6 +1873,9 @@ qemuValidateDomainDeviceDefNetwork(const virDomainNetDef *net, _("'reconnect' attribute is not supported when source mode='server' for ")); return -1; } + + if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, "interface") < 0) + return -1; } if (!virDomainNetIsVirtioModel(net)) { diff --git a/tests/qemuxmlconfdata/net-vhostuser-passt-no-shmem.x86_64-latest.err b/tests/qemuxmlconfdata/net-vhostuser-passt-no-shmem.x86_64-latest.err index 274af5c722..babde17518 100644 --- a/tests/qemuxmlconfdata/net-vhostuser-passt-no-shmem.x86_64-latest.err +++ b/tests/qemuxmlconfdata/net-vhostuser-passt-no-shmem.x86_64-latest.err @@ -1 +1 @@ -unsupported configuration: 'interface type="vhostuser" backend type="passt"' requires shared memory +unsupported configuration: 'interface' requires shared memory