Re: [PATCH 11/14] vfio: clean up the check for mediated device in vfio_iommu_type1

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

 



On Fri, Sep 17, 2021 at 01:25:59AM +0530, Kirti Wankhede wrote:
> 
> 
> On 9/13/2021 12:46 PM, Christoph Hellwig wrote:
> > Pass the group flags to ->attach_group and remove the messy check for
> > the bus type.
> > 
> 
> I like the way vfio_group_type is used in this patch, that removes messy way
> to call symbol_get(mdev_bus_type).
> 
> Any thoughts on how VFIO_IOMMU, i.e. IOMMU backed mdev, can be implemented?
> 
> For IOMMU backed mdev, mdev->dev->iommu_group should be same as
> mdev->type->parent->dev->iommu_group or in other words, parent device would
> be DMA alias for the mdev device with the restriction - single mdev device
> can be created for the physical device. Is it possible to link iommu_group
> of these two devices some way?

You just use the new style mdev API and directly call
vfio_register_group_dev and it will pick up the
parent->dev->iommu_group naturally like everything else using physical
iommu groups.

Jason



[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