[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB5276C76349963BBF68307FF48C8AA@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Fri, 8 Dec 2023 08:56:59 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Lu Baolu <baolu.lu@...ux.intel.com>,
Joerg Roedel <joro@...tes.org>,
"Will Deacon" <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
"Jason Gunthorpe" <jgg@...pe.ca>
CC: "iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 2/6] iommu/vt-d: Remove scalable mode context entry
setup from attach_dev
> From: Lu Baolu <baolu.lu@...ux.intel.com>
> Sent: Tuesday, December 5, 2023 9:22 AM
>
> static int domain_context_mapping_one(struct dmar_domain *domain,
> struct intel_iommu *iommu,
> - struct pasid_table *table,
> u8 bus, u8 devfn)
since this is called in legacy now it's clearer to add a legacy_ prefix
to this and other related functions.
>
> - /* PASID table is mandatory for a PCI device in scalable mode. */
> - if (sm_supported(iommu) && !dev_is_real_dma_subdevice(dev)) {
> - /* Setup the PASID entry for requests without PASID: */
> - if (hw_pass_through && domain_type_is_si(domain))
> - ret = intel_pasid_setup_pass_through(iommu,
> - dev, IOMMU_NO_PASID);
> - else if (domain->use_first_level)
> - ret = domain_setup_first_level(iommu, domain, dev,
> - IOMMU_NO_PASID);
> - else
> - ret = intel_pasid_setup_second_level(iommu,
> domain,
> - dev, IOMMU_NO_PASID);
> - if (ret) {
> - dev_err(dev, "Setup RID2PASID failed\n");
> - device_block_translation(dev);
> - return ret;
> - }
> - }
> + if (dev_is_real_dma_subdevice(dev))
> + return 0;
is it a functional change? old code doesn't early exit for such device.
Powered by blists - more mailing lists