RE: [PATCH] vfio: Remove vfio_group dev_counter

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

 



> From: Liu, Yi L <yi.l.liu@xxxxxxxxx>
> Sent: Thursday, August 18, 2022 4:13 PM
> 
> Hi Kevin,
> 
> On 2022/8/18 15:46, Tian, Kevin wrote:
> >> From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> >> Sent: Tuesday, August 16, 2022 12:50 AM
> >>
> >> This counts the number of devices attached to a vfio_group, ie the
> number
> >> of items in the group->device_list.
> >>
> >> It is only read in vfio_pin_pages(), however that function already does
> >> vfio_assert_device_open(). Given an opened device has to already be
> >> properly setup with a group, this test and variable are redundant. Remove
> >> it.
> >
> > I didn't get the rationale behind. The original check was for whether
> > the group is singleton. Why is it equivalent to the condition of an
> > opened device?
> >
> > Though I do think this check is unnecessary. All the devices in the group
> > share the container and iommu domain which is what the pinning
> > operation applies to. I'm not sure why the singleton restriction was
> > added in the first place.
> 
> see if your confusion is addressed in below link?
> 
> https://lore.kernel.org/kvm/BN9PR11MB5276F9EB0295CBD485A58D308C6D
> 9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/T/#m42eaf154823581082
> 0d7e2ad1491092c4b0bbcba
> 

Ah, yes. I didn't note that this is already addressed. 😊




[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