1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 06:50:22 +03:00

qemuValidateDomainDeviceDefNetwork: Require shared memory for all vhost-user interfaces

Currently we produce only a warning into the log if a non-passt
vhost-user interface is configured with shared memory.

Since we do make it fatal with all other vhost-user types, fix the check
to trigger also for normal-vhost-user interfaces.

Since passt-based vhost-user interfaces are checked separately the check
will no longer be required.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2025-03-11 09:01:12 +01:00
parent 779a975355
commit 0d20632179
2 changed files with 4 additions and 7 deletions

View File

@ -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 <interface type='vhostuser'>"));
return -1;
}
if (qemuValidateDomainDefVhostUserRequireSharedMemory(def, "interface") < 0)
return -1;
}
if (!virDomainNetIsVirtioModel(net)) {

View File

@ -1 +1 @@
unsupported configuration: 'interface type="vhostuser" backend type="passt"' requires shared memory
unsupported configuration: 'interface' requires shared memory