Re: [RFC PATCH 3/6] vfio: Extend iommu-info to return MSIs automap state

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

 



On Mon, 2015-10-05 at 06:00 +0000, Bhushan Bharat wrote:
> > -1138,6 +1156,8 @@
> > > static long vfio_iommu_type1_ioctl(void *iommu_data,
> > >  		}
> > >  	} else if (cmd == VFIO_IOMMU_GET_INFO) {
> > >  		struct vfio_iommu_type1_info info;
> > > +		struct iommu_domain_msi_maps msi_maps;
> > > +		int ret;
> > >
> > >  		minsz = offsetofend(struct vfio_iommu_type1_info,
> > iova_pgsizes);
> > >
> > > @@ -1149,6 +1169,18 @@ static long vfio_iommu_type1_ioctl(void
> > > *iommu_data,
> > >
> > >  		info.flags = 0;
> > >
> > > +		ret = vfio_domains_get_msi_maps(iommu, &msi_maps);
> > > +		if (ret)
> > > +			return ret;
> > 
> > And now ioctl(VFIO_IOMMU_GET_INFO) no longer works for any IOMMU
> > implementing domain_get_attr but not supporting
> > DOMAIN_ATTR_MSI_MAPPING.
> 
> With this current patch version this will get the default assumed behavior as you commented on previous patch. 

How so?

+               msi_maps->automap = true;
+               msi_maps->override_automap = false;
+
+               if (domain->ops->domain_get_attr)
+                       ret = domain->ops->domain_get_attr(domain, attr, data);

If domain_get_attr is implemented, but DOMAIN_ATTR_MSI_MAPPING is not,
ret should be an error code.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux