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]
Date:   Mon, 15 Mar 2021 08:30:18 +0800
From:   Lu Baolu <baolu.lu@...ux.intel.com>
To:     Kyung Min Park <kyung.min.park@...el.com>,
        iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Cc:     baolu.lu@...ux.intel.com, dwmw2@...radead.org, joro@...tes.org,
        will@...nel.org, jacob.jun.pan@...ux.intel.com,
        ashok.raj@...el.com, ravi.v.shankar@...el.com, yian.chen@...el.com,
        sohil.mehta@...el.com
Subject: Re: [PATCH] iommu/vt-d: Disable SVM when ATS/PRI/PASID are not
 enabled in the device

On 3/15/21 4:15 AM, Kyung Min Park wrote:
> Currently, the Intel VT-d supports Shared Virtual Memory (SVM) only when
> IO page fault is supported. Otherwise, shared memory pages can not be
> swapped out and need to be pinned. The device needs the Address Translation
> Service (ATS), Page Request Interface (PRI) and Process Address Space
> Identifier (PASID) capabilities to be enabled to support IO page fault.
> 
> Disable SVM when ATS, PRI and PASID are not enabled in the device.
> 
> Signed-off-by: Kyung Min Park <kyung.min.park@...el.com>
> ---
>   drivers/iommu/intel/iommu.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> index ee0932307d64..956a02eb40b4 100644
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -5380,6 +5380,9 @@ intel_iommu_dev_enable_feat(struct device *dev, enum iommu_dev_features feat)
>   		if (!info)
>   			return -EINVAL;
>   
> +		if (!info->pasid_enabled || !info->pri_enabled || !info->ats_enabled)
> +			return -EINVAL;
> +
>   		if (info->iommu->flags & VTD_FLAG_SVM_CAPABLE)
>   			return 0;
>   	}
> 

Thanks for the patch.

Acked-by: Lu Baolu <baolu.lu@...ux.intel.com>

Best regards,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ