RE: [PATCH v3 12/15] iommufd: Add kAPI toward external drivers for physical devices

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

 



Alex, is any trick behind checking -ENODEV overlooked here?

> From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Sent: Tuesday, November 8, 2022 1:55 AM
> >
> > > +		rc = iommu_get_msi_cookie(hwpt->domain, sw_msi_start);
> > > +		if (rc && rc != -ENODEV)
> > > +			return rc;
> >
> > I know this is copied from VFIO but a comment is appreciated why
> > -ENODEV is considered sane to move forward.
> 
> Huh. I actually don't know. It looks like it is here to detect that
> the static inline for !CONFIG_IOMMU_DMA returns it.
> 
> However, if we have !CONFIG_IOMMU_DMA then I think we also don't get
> interrupts at all. Ie iommu_dma_prepare_msi() becomes a NOP and
> nothing will map the ITS page into the iomm_domain.
> 
> So let's drop the ENODEV check, it looks wrong.
> 





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux