[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241016133043.GL3559746@nvidia.com>
Date: Wed, 16 Oct 2024 10:30:43 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Suravee Suthikulpanit <suravee.suthikulpanit@....com>
Cc: linux-kernel@...r.kernel.org, iommu@...ts.linux.dev, joro@...tes.org,
robin.murphy@....com, vasant.hegde@....com, kevin.tian@...el.com,
jon.grimm@....com, santosh.shukla@....com, pandoh@...gle.com,
kumaranand@...gle.com
Subject: Re: [PATCH v6 7/9] iommu/amd: Move erratum 63 logic to
write_dte_lower128()
On Wed, Oct 16, 2024 at 05:17:54AM +0000, Suravee Suthikulpanit wrote:
> diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
> index c03e2d9d2990..a8c0a57003a8 100644
> --- a/drivers/iommu/amd/iommu.c
> +++ b/drivers/iommu/amd/iommu.c
> @@ -105,6 +105,10 @@ static void write_dte_lower128(struct dev_table_entry *ptr, struct dev_table_ent
>
> old.data128[0] = READ_ONCE(ptr->data128[0]);
> do {
> + /* Apply erratum 63 */
> + if (FIELD_GET(DTE_DATA1_SYSMGT_MASK, new->data[1]) == 0x1)
> + new->data[0] |= DTE_FLAG_IW;
> +
Why not put it in set_dte_entry() ?
Jason
Powered by blists - more mailing lists