Re: [PATCH iommufd 2/9] vfio/type1: Check that every device supports IOMMU_CAP_INTR_REMAP

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

 



On Thu, Dec 08, 2022 at 02:48:25PM -0700, Alex Williamson wrote:
> On Thu,  8 Dec 2022 16:26:29 -0400
> Jason Gunthorpe <jgg@xxxxxxxxxx> wrote:
> 
> > iommu_group_for_each_dev() exits the loop at the first callback that
> > returns 1 - thus returning 1 fails to check the rest of the devices in the
> > group.
> > 
> > msi_remap (aka secure MSI) requires that all the devices in the group
> > support it, not just any one. This is only a theoretical problem as no
> > current drivers will have different secure MSI properties within a group.
> 
> Which is exactly how Robin justified the behavior in the referenced
> commit:
> 
>   As with domains, any capability must in practice be consistent for
>   devices in a given group - and after all it's still the same
>   capability which was expected to be consistent across an entire bus!
>   - so there's no need for any complicated validation.
> 
> That suggests to me that it's intentional that we break if any device
> supports the capability and therefore this isn't so much a "Fixes:", as
> it is a refactoring expressly to support msi_device_has_secure_msi(),
> which cannot make these sort of assumptions as a non-group API.  Thanks,

Sure, lets drop the fixes and your analysis seems correct

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