Re: [PATCH 4/5] iommu/amd: Make CMD_INV_IOMMU_ALL_PAGES_ADDRESS match the spec

Jason Gunthorpe
2026-04-01T13:17:05Z

On Wed, Apr 01, 2026 at 02:42:52PM +0800, Wei Wang wrote:

> > diff --git a/drivers/iommu/amd/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h
> > index c685d3771436a2..c239c5fbe47461 100644
> > --- a/drivers/iommu/amd/amd_iommu_types.h
> > +++ b/drivers/iommu/amd/amd_iommu_types.h
> > @@ -221,7 +221,7 @@
> > #define PPR_STATUS_MASK 0xf
> > #define PPR_STATUS_SHIFT 12
> > -#define CMD_INV_IOMMU_ALL_PAGES_ADDRESS 0x7fffffffffffffffULL
> > +#define CMD_INV_IOMMU_ALL_PAGES_ADDRESS 0x7ffffffffffff000ULL
>
>
> Nit: Using GENMASK_ULL(62, 12) here might be easier to read
>
> Reviewed-by: Wei Wang <wei.w.wang@hotmail.com>

I left it like this because it is the raw value the spec has:

2.4.3:

The IOMMU invalidates all translation
information associated with the DomainID for both nested and guest levels when S=1, PDE=1,
GN=0, and Address[63:12]=7_FFFF_FFFF_FFFFh.

Thanks,
Jason