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

From: Gong Shuai

Date: Tue Nov 10 2026 - 09:05:04 EST


Hi Jason,

On 11/10/2026 9:16 PM, Jason Gunthorpe wrote:
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.

Thanks for the confirmation. The new version will use this scheme.


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.

Understood. This approach makes sense.

Thanks,
Shuai


Jason