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: <7d5f761b-2e26-4d09-a285-7840487d5d83@linux.intel.com>
Date: Fri, 9 Feb 2024 10:40:57 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: Yi Liu <yi.l.liu@...el.com>, joro@...tes.org, jgg@...dia.com,
 kevin.tian@...el.com
Cc: baolu.lu@...ux.intel.com, alex.williamson@...hat.com,
 robin.murphy@....com, eric.auger@...hat.com, nicolinc@...dia.com,
 kvm@...r.kernel.org, chao.p.peng@...ux.intel.com, yi.y.sun@...ux.intel.com,
 iommu@...ts.linux.dev, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org, zhenzhong.duan@...el.com,
 joao.m.martins@...cle.com
Subject: Re: [PATCH rc 7/8] iommu/vt-d: Wrap the dirty tracking loop to be a
 helper

On 2024/2/8 16:23, Yi Liu wrote:
> --- a/drivers/iommu/intel/iommu.c
> +++ b/drivers/iommu/intel/iommu.c
> @@ -4730,23 +4730,35 @@ static void *intel_iommu_hw_info(struct device *dev, u32 *length, u32 *type)
>   	return vtd;
>   }
>   
> +static int
> +device_set_dirty_tracking(struct list_head *devices, bool enable)
> +{
> +	struct device_domain_info *info;
> +	int ret = 0;
> +
> +	list_for_each_entry(info, devices, link) {
> +		ret = intel_pasid_setup_dirty_tracking(info->iommu, info->dev,
> +						       IOMMU_NO_PASID, enable);
> +		if (ret)
> +			break;
> +	}
> +
> +	return ret;
> +}

Let's make this helper specific. Something like below.

/*
  * Set dirty tracking for the device list of a domain. The caller must
  * hold the domain->lock when calling it.
  */
static int device_list_set_dirty_tracking(...)

Best regards,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ