vhost backends and guest drivers. Possible values are ``on`` or ``off``.
:since:`Since 6.3.0 (QEMU and KVM only)`
+This optional attribute ``page_per_vq`` controls the layout of the notification
+capabilities exposed to the guest. When enabled, each virtio queue will have a
+dedicated page on the device BAR exposed to the guest. It is recommended to be
+used when vDPA is enabled on the hypervisor, as it enables mapping the
+notification area to the physical device, which is only supported in page
+granularity. The default is determined by QEMU. :since:`Since 7.8.0 (QEMU 2.8)`
+Note: In general you should leave this option alone, unless you are very certain
+you know what you are doing.
+
:anchor:`<a id="elementsVirtioTransitional"/>`
Virtio transitional devices
<ref name="virOnOff"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="page_per_vq">
+ <ref name="virOnOff"/>
+ </attribute>
+ </optional>
</define>
<define name="usbmaster">
&(*virtio)->packed) < 0)
return -1;
+ if (virXMLPropTristateSwitch(driver, "page_per_vq", VIR_XML_PROP_NONE,
+ &(*virtio)->page_per_vq) < 0)
+ return -1;
+
return 0;
}
virBufferAsprintf(buf, " packed='%s'",
virTristateSwitchTypeToString(virtio->packed));
}
+ if (virtio->page_per_vq != VIR_TRISTATE_SWITCH_ABSENT) {
+ virBufferAsprintf(buf, " page_per_vq='%s'",
+ virTristateSwitchTypeToString(virtio->page_per_vq));
+ }
}
virTristateSwitchTypeToString(src->packed));
return false;
}
+ if (src->page_per_vq != dst->page_per_vq) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target device page_per_vq option '%s' does not "
+ "match source '%s'"),
+ virTristateSwitchTypeToString(dst->page_per_vq),
+ virTristateSwitchTypeToString(src->page_per_vq));
+ return false;
+ }
return true;
}
virTristateSwitch iommu;
virTristateSwitch ats;
virTristateSwitch packed;
+ virTristateSwitch page_per_vq;
};
"for virtio devices"));
return -1;
}
+
+ if (virtio->page_per_vq != VIR_TRISTATE_SWITCH_ABSENT) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("page_per_vq option is only supported for virtio devices"));
+ return -1;
+ }
return 0;
}