[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b665c89-db75-4d5e-98d8-3c113684f532@linux.intel.com>
Date: Fri, 9 Feb 2024 10:40:11 +0800
From: Baolu Lu <baolu.lu@...ux.intel.com>
To: "Tian, Kevin" <kevin.tian@...el.com>, "Liu, Yi L" <yi.l.liu@...el.com>,
"joro@...tes.org" <joro@...tes.org>, "jgg@...dia.com" <jgg@...dia.com>
Cc: baolu.lu@...ux.intel.com,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"robin.murphy@....com" <robin.murphy@....com>,
"eric.auger@...hat.com" <eric.auger@...hat.com>,
"nicolinc@...dia.com" <nicolinc@...dia.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"chao.p.peng@...ux.intel.com" <chao.p.peng@...ux.intel.com>,
"yi.y.sun@...ux.intel.com" <yi.y.sun@...ux.intel.com>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"Duan, Zhenzhong" <zhenzhong.duan@...el.com>,
"joao.m.martins@...cle.com" <joao.m.martins@...cle.com>
Subject: Re: [PATCH rc 3/8] iommu/vt-d: Add missing iotlb flush for parent
domain
On 2024/2/8 16:38, Tian, Kevin wrote:
>> From: Liu, Yi L<yi.l.liu@...el.com>
>> Sent: Thursday, February 8, 2024 4:23 PM
>>
>> +/*
>> + * Flush the relevant caches in nested translation if the domain
>> + * also serves as a parent
>> + */
>> +static void parent_domain_flush(struct dmar_domain *domain,
>> + unsigned long pfn,
>> + unsigned long pages, int ih)
>> +{
>> + struct dmar_domain *s1_domain;
>> +
>> + spin_lock(&domain->s1_lock);
>> + list_for_each_entry(s1_domain, &domain->s1_domains, s2_link) {
>> + struct iommu_domain_info *info;
>> + unsigned long i;
>> +
>> + xa_for_each(&s1_domain->iommu_array, i, info)
>> + __iommu_flush_iotlb_psi(info->iommu, info->did,
>> + pfn, pages, ih);
>> + }
> As Jason suggested before this xarray lacks of proper locking.
>
> but given it's rc fix I'm fine with it. @Baolu we do need fix it soon so
> this problem won't further expand like here.
Yes. I planned to fix the locking issue in a separated series.
Best regards,
baolu
Powered by blists - more mailing lists