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 Tue, Aug 24, 2021 at 04:46:46PM +0200, Christoph Hellwig wrote:
> Pass the group flags to ->attach_group and remove the messy check for
> the bus type.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  drivers/vfio/vfio.c                 | 11 +++++------
>  drivers/vfio/vfio.h                 |  7 ++++++-
>  drivers/vfio/vfio_iommu_spapr_tce.c |  2 +-
>  drivers/vfio/vfio_iommu_type1.c     | 19 ++-----------------
>  4 files changed, 14 insertions(+), 25 deletions(-)

Every caller is doing group->iommu_group, maybe change the signature
to

 (*attach_group)(struct vfio_iommu *iommu, struct vfio_iommu_group *group)
 
?

Then the flags don't need to be another arg, just group->flags

Happy to see the symbol_get removed!

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