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] [day] [month] [year] [list]
Message-ID: <aR0ZCPcxZBV9iUVy@Asurada-Nvidia>
Date: Tue, 18 Nov 2025 17:10:32 -0800
From: Nicolin Chen <nicolinc@...dia.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
	<linux-kernel@...r.kernel.org>, <robin.murphy@....com>, <will@...nel.org>,
	<joro@...tes.org>, <kevin.tian@...el.com>, <jsnitsel@...hat.com>,
	<vasant.hegde@....com>, <iommu@...ts.linux.dev>, <santosh.shukla@....com>,
	<sairaj.arunkodilkar@....com>, <jon.grimm@....com>,
	<prashanthpra@...gle.com>, <wvw@...gle.com>, <wnliu@...gle.com>,
	<gptran@...gle.com>, <kpsingh@...gle.com>, <joao.m.martins@...cle.com>,
	<alejandro.j.jimenez@...cle.com>
Subject: Re: [PATCH v5 11/14] iommu/amd: Introduce gDomID-to-hDomID Mapping
 and handle parent domain invalidation

On Tue, Nov 18, 2025 at 08:11:51PM -0400, Jason Gunthorpe wrote:
> On Wed, Nov 12, 2025 at 06:25:03PM +0000, Suravee Suthikulpanit wrote:
> > +static int iommu_flush_pages_v1_hdom_ids(struct protection_domain *pdom, u64 address, size_t size)
> > +{
> > +	int ret = 0;
> > +	struct amd_iommu_viommu *aviommu;
> > +
> > +	list_for_each_entry(aviommu, &pdom->viommu_list, pdom_list) {
> > +		unsigned long i;
> > +		struct guest_domain_mapping_info *gdom_info;
> > +		struct amd_iommu *iommu = container_of(aviommu->core.iommu_dev, struct amd_iommu, iommu);
> > +
> > +		xa_for_each(&aviommu->gdomid_array, i, gdom_info) {

> This is kind of painfully slow for invalidation but OK for now, we
> don't really expect alot of parent invalidation traffic..
> 
> I think after we get this landed:
> 
> https://lore.kernel.org/r/cover.1762588839.git.nicolinc@nvidia.com
> 
> We should take a serious run at trying to make it shared code and have
> AMD use it. That would resolve the performance concern..

Yea. I had the same feeling when looking at AMD's patch, and
realized that you did foresee all of these.

I've started work on the VMID sharing using the invs. Perhaps
I can add some patches prior to generalize those helpers.

Thanks
Nicolin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ