[libvirt] [PATCH 6/8] conf: Add IOMMU support to virDomainDeviceInfoIterate()
Ján Tomko
jtomko at redhat.com
Mon May 20 13:03:47 UTC 2019
On Mon, May 20, 2019 at 01:37:51PM +0200, Andrea Bolognani wrote:
>Now that we can safely iterate over devices that don't have
>an associated virDomainDeviceInfo, supporting IOMMU devices
>is no longer a problem.
>
Actually, not having a DeviceInfo for the IOMMU device might be a bug
here. I omitted it because there's no address to be specified, but
there might be a use for an alias here.
Jano
>Signed-off-by: Andrea Bolognani <abologna at redhat.com>
>---
> src/conf/domain_conf.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index 16820424be..eda424dbef 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -4252,6 +4252,13 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr def,
> return rc;
> }
>
>+ if (def->iommu) {
>+ device.type = VIR_DOMAIN_DEVICE_IOMMU;
>+ device.data.iommu = def->iommu;
>+ if ((rc = cb(def, &device, NULL, opaque)) != 0)
>+ return rc;
>+ }
>+
> /* Coverity is not very happy with this - all dead_error_condition */
> #if !STATIC_ANALYSIS
> /* This switch statement is here to trigger compiler warning when adding
>--
>2.21.0
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190520/db71340c/attachment-0001.sig>
More information about the libvir-list
mailing list