lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN9PR11MB5276C8112DEF56C11CFC6F198CD52@BN9PR11MB5276.namprd11.prod.outlook.com>
Date: Tue, 25 Jun 2024 02:32:00 +0000
From: "Tian, Kevin" <kevin.tian@...el.com>
To: Lu Baolu <baolu.lu@...ux.intel.com>, Joerg Roedel <joro@...tes.org>, "Liu,
 Yi L" <yi.l.liu@...el.com>, Jacob Pan <jacob.jun.pan@...ux.intel.com>
CC: Will Deacon <will@...nel.org>, Robin Murphy <robin.murphy@....com>,
	"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/2] iommu/vt-d: Remove hardware automatic ATS dependency

> From: Lu Baolu <baolu.lu@...ux.intel.com>
> Sent: Monday, June 24, 2024 1:25 PM
> 
> If a device is listed in the SATC table with ATC_REQUIRED flag set, it
> indicates that the device has a functional requirement to enable its ATC
> (via the ATS capability) for device operation. However, when IOMMU is
> running in the legacy mode, ATS could be automatically supported by the
> hardware so that the OS has no need to support the ATS functionality.

hmm I don't think "has no need to support" matches...

> 
> This is a backward compatibility feature which enables older OSs. Since
> Linux VT-d implementation has already supported ATS features for a long
> time, there is no need to rely on this compatibility hardware. Remove it
> to make the driver future-proof.
> 
> Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com>
> ---
>  drivers/iommu/intel/iommu.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index 07e394dfccc1..b63347c8bf5d 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -3056,14 +3056,7 @@ static bool dmar_ats_supported(struct pci_dev
> *dev, struct intel_iommu *iommu)
>  	dev = pci_physfn(dev);
>  	satcu = dmar_find_matched_satc_unit(dev);
>  	if (satcu)
> -		/*
> -		 * This device supports ATS as it is in SATC table.
> -		 * When IOMMU is in legacy mode, enabling ATS is done
> -		 * automatically by HW for the device that requires
> -		 * ATS, hence OS should not enable this device ATS
> -		 * to avoid duplicated TLB invalidation.
> -		 */

...what above comment tries to convey.

If this comment is valid, it's not about whether the OS itself supports
ATS. instead it's a requirement for the OS to not manage ATS when
it's already managed by HW.

Unless there is a way to disable hw management with this change...

> -		return !(satcu->atc_required && !sm_supported(iommu));
> +		return true;
> 
>  	for (bus = dev->bus; bus; bus = bus->parent) {
>  		bridge = bus->self;
> --
> 2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ