On Thu, Jan 07, 2021 at 10:16:57PM +0800, Lu Baolu wrote: > On 2021/1/7 21:49, Will Deacon wrote: > > On Thu, Jan 07, 2021 at 12:03:56AM +0800, Liu Yi L wrote: > > > In the existing code, loop all devices attached to a domain does not > > > include sub-devices attached via iommu_aux_attach_device(). > > > > > > This was found by when I'm working on the below patch, There is no > > > device in the domain->devices list, thus unable to get the cap and > > > ecap of iommu unit. But this domain actually has subdevice which is > > > attached via aux-manner. But it is tracked by domain. This patch is > > > going to fix it. > > > > > > https://lore.kernel.org/kvm/1599734733-6431-17-git-send-email-yi.l....@intel.com/ > > > > > > And this fix goes beyond the patch above, such sub-device tracking is > > > necessary for other cases. For example, flushing device_iotlb for a > > > domain which has sub-devices attached by auxiliary manner. > > > > Sorry, but I'm having a really hard time understanding what this patch is > > doing based on this commit message. Baolu -- do you think you could reword > > it for me please? No need to resend the patch. > > iommu/vt-d: Fix general protection fault in aux_detach_device()
[...] Thanks! I'll push this out shortly. Will