[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <12c1f0a3-5f55-4773-bda5-d0831947adbc@amd.com>
Date: Thu, 15 Jan 2026 16:24:23 +0700
From: "Suthikulpanit, Suravee" <suravee.suthikulpanit@....com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: jgg@...dia.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 13/14] iommu/amd: Refactor logic to program the host
page table in DTE
On 11/14/2025 4:19 AM, Nicolin Chen wrote:
>> @@ -2097,35 +2115,29 @@ static void set_dte_entry(struct amd_iommu *iommu,
>>
>>.....
>>
>> - new.data[0] |= DTE_FLAG_IR | DTE_FLAG_IW;
>> -
>> /*
>> * When SNP is enabled, we can only support TV=1 with non-zero domain ID.
>> * This is prevented by the SNP-enable and IOMMU_DOMAIN_IDENTITY check in
>> * do_iommu_domain_alloc().
>> */
>> WARN_ON(amd_iommu_snp_en && (domid == 0));
> This, if it's very necessary, can go into individual functions.
>
> Though I am not sure if it is accurate as it seems to imply that
> IOMMU_DOMAIN_IDENTITY has domid == 0?
>
> But an IOMMU_DOMAIN_IDENTITY does:
> identity_domain.id = amd_iommu_pdom_id_alloc();
> doing:
> ida_alloc_range(&pdom_ids, 1, MAX_DOMAIN_ID - 1, GFP_ATOMIC);
> which means it never returns 0.
>
> Nicolin
After more careful review, I am removing this check for now since it's
no longer applicable with the more recent code.
Thanks,
Suravee
Powered by blists - more mailing lists