Linux IOMMU Development
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>,
	David Woodhouse <dwmw2@infradead.org>,
	iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Will Deacon <will@kernel.org>
Cc: Calvin Owens <calvin@wbinvd.org>,
	Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
	Joerg Roedel <joerg.roedel@amd.com>,
	Kevin Tian <kevin.tian@intel.com>,
	patches@lists.linux.dev, Tina Zhang <tina.zhang@intel.com>
Subject: Re: [PATCH 1/2] iommupt/vtd: Allow VT-d to have a larger table top than the vasz requires
Date: Fri, 28 Nov 2025 14:54:04 +0800	[thread overview]
Message-ID: <c583ed29-34a0-4ab2-bd2c-2fa94ea1a647@linux.intel.com> (raw)
In-Reply-To: <1-v1-ae5d7f0f2620+13b-vtd_mgaw_jgg@nvidia.com>

On 11/28/25 07:54, Jason Gunthorpe wrote:
> VT-d second stage HW specifies both the maximum IOVA and the supported
> table walk starting points. Weirdly there is HW that only supports a 4
> level walk but has a maximum IOVA that only needs 3.
> 
> The current code miscalculates this and creates a wrongly sized page table
> which ultimately fails the compatability check for number of levels.

s/compatability/compatibility/

> 
> This is fixed by allowing the page table to be created with both a vasz
> and top_level input. The vasz will set the aperture for the domain while
> the top_level will set the page table geometry.
> 
> Add top_level to vtdss and correct the logic in VT-d to generate the right
> top_level and vasz from mgaw and sagaw.
> 
> Fixes: d373449d8e97 ("iommu/vt-d: Use the generic iommu page table")
> Reported-by: Calvin Owens<calvin@wbinvd.org>
> Closes:https://lore.kernel.org/ 
> r/8f257d2651eb8a4358fcbd47b0145002e5f1d638.1764237717.git.calvin@wbinvd.org
> Signed-off-by: Jason Gunthorpe<jgg@nvidia.com>

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

  reply	other threads:[~2025-11-28  6:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27 23:54 [PATCH 0/2] Fix VT-d when the IOVA limit is small Jason Gunthorpe
2025-11-27 23:54 ` [PATCH 1/2] iommupt/vtd: Allow VT-d to have a larger table top than the vasz requires Jason Gunthorpe
2025-11-28  6:54   ` Baolu Lu [this message]
2025-11-27 23:54 ` [PATCH 2/2] iommupt/vtd: Support mgaw's less than a 4 level walk for first stage Jason Gunthorpe
2025-11-28  7:03   ` Baolu Lu
2025-11-28  0:04 ` [PATCH 0/2] Fix VT-d when the IOVA limit is small Jason Gunthorpe
2025-11-28  7:48 ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c583ed29-34a0-4ab2-bd2c-2fa94ea1a647@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=calvin@wbinvd.org \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joerg.roedel@amd.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=patches@lists.linux.dev \
    --cc=robin.murphy@arm.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tina.zhang@intel.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox