Re: [RFC PATCH v2 9/9] iommu/riscv: Add riscv_iommu_attach_dev_nested

From: Jason Gunthorpe

Date: Tue Nov 10 2026 - 08:39:08 EST


On Tue, Nov 10, 2026 at 07:51:37PM +0800, Gong Shuai wrote:

> 2. Use the guest PSCID directly, but allocate a separate host GSCID for
> each vIOMMU.

This is the right model. The viommu should allocate the GSCID directly
and keep it for the lifetime of the VM.

> 3. Share the GSCID and maintain a per-vIOMMU mapping from each guest
> PSCID to a host-allocated PSCID.

AMD is doing this because they don't have something like a GSCID.

Jason