lkml.org 
[lkml]   [2023]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 7/7] dmaengine/idxd: Re-enable kernel workqueue under DMA API
    On Fri, Mar 31, 2023 at 04:11:37PM -0700, Jacob Pan wrote:
    > static void idxd_disable_system_pasid(struct idxd_device *idxd)
    > {
    > + struct pci_dev *pdev = idxd->pdev;
    > + struct device *dev = &pdev->dev;
    > + struct iommu_domain *domain;
    > + union gencfg_reg gencfg;
    > +
    > + domain = iommu_get_domain_for_dev(dev);
    > + if (!domain || domain->type == IOMMU_DOMAIN_BLOCKED)
    > + return;
    > +
    > + iommu_detach_device_pasid(domain, dev, idxd->pasid);

    This sequence is kinda weird, we shouldn't pass in domain to
    detach_device_pasid, IMHO. We already know the domain because we store
    it in an xarray, it just creates weirdness if the user passes in the
    wrong domain.

    Jason

    \
     
     \ /
      Last update: 2023-04-05 14:16    [W:2.997 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site