Re: [PATCH v5 12/15] iommupt: Add the x86 64 bit page table format

Jason Gunthorpe
2025-10-08T13:03:36Z

On Wed, Oct 08, 2025 at 03:35:39PM +0530, Vasant Hegde wrote:

> > +static inline pt_oaddr_t x86_64_pt_entry_oa(const struct pt_state *pts)
> > +{
> > + return oalog2_mul(FIELD_GET(X86_64_FMT_OA, pts->entry),
> > + PT_GRANULE_LG2SZ);
>
> Also here.

Presumably this as well?

@@ -2166,7 +2166,7 @@ static int init_gcr3_table(struct iommu_dev_data *dev_data,
return ret;

pt_iommu_x86_64_hw_info(&pdom->amdv2, &pt_info);
- ret = update_gcr3(dev_data, 0, pt_info.gcr3_pt, true);
+ ret = update_gcr3(dev_data, 0, __sme_set(pt_info.gcr3_pt), true);
if (ret)
free_gcr3_table(&dev_data->gcr3_info);

Jason