diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index c867fb8a47..77242f0339 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -3600,6 +3600,12 @@
iothread
value. The iothread
value
must be within the range 1 to the domain iothreads value.
+
virtio options
+
+ For virtio controllers,
+ Virtio-specific options can also be
+ set. (Since 3.5.0)
+
USB companion controllers have an optional
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index d106550542..1d4639227d 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2073,6 +2073,7 @@
+
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index a03ed097cf..a3c06c95b5 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1886,6 +1886,7 @@ void virDomainControllerDefFree(virDomainControllerDefPtr def)
return;
virDomainDeviceInfoClear(&def->info);
+ VIR_FREE(def->virtio);
VIR_FREE(def);
}
@@ -9064,6 +9065,9 @@ virDomainControllerDefParseXML(xmlNodePtr node,
cur = cur->next;
}
+ if (virDomainVirtioOptionsParseXML(ctxt, &def->virtio) < 0)
+ goto error;
+
/* node is parsed differently from target attributes because
* someone thought it should be a subelement instead...
*/
@@ -19240,6 +19244,10 @@ virDomainControllerDefCheckABIStability(virDomainControllerDefPtr src,
}
}
+ if (src->virtio && dst->virtio &&
+ !virDomainVirtioOptionsCheckABIStability(src->virtio, dst->virtio))
+ return false;
+
if (!virDomainDeviceInfoCheckABIStability(&src->info, &dst->info))
return false;
@@ -21557,6 +21565,8 @@ virDomainControllerDriverFormat(virBufferPtr buf,
if (def->iothread)
virBufferAsprintf(&driverBuf, " iothread='%u'", def->iothread);
+ virDomainVirtioOptionsFormat(&driverBuf, def->virtio);
+
if (virBufferUse(&driverBuf)) {
virBufferAddLit(buf, "
+
+