[PATCH 04/12] qemu: automatically set model type='virtio' for interface type='vhostuser'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Both vdpa and vhostuser require that the guest device be virtio, and
for interface type='vdpa', we already set <model type='virtio'/> if it
is unspecified in the input XML, so let's be just as courteous for
interface type='vhostuser'.

Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
---
 src/qemu/qemu_postparse.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c
index 20ee333e0d..49009ae2e4 100644
--- a/src/qemu/qemu_postparse.c
+++ b/src/qemu/qemu_postparse.c
@@ -100,7 +100,8 @@ qemuDomainDeviceNetDefPostParse(virDomainNetDef *net,
                                 const virDomainDef *def,
                                 virQEMUCaps *qemuCaps)
 {
-    if (net->type == VIR_DOMAIN_NET_TYPE_VDPA &&
+    if ((net->type == VIR_DOMAIN_NET_TYPE_VDPA ||
+         net->type == VIR_DOMAIN_NET_TYPE_VHOSTUSER) &&
         !virDomainNetGetModelString(net)) {
         net->model = VIR_DOMAIN_NET_MODEL_VIRTIO;
     } else if (net->type != VIR_DOMAIN_NET_TYPE_HOSTDEV &&
-- 
2.47.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux