Re: [PATCH v3 7/7] iommu/arm-smmu-v3: Probe a guest-level Realm VSMMU via RSI commands
From: Nicolin Chen
Date: Thu Nov 26 2026 - 00:08:36 EST
On Wed, Nov 25, 2026 at 02:07:45PM -0400, Jason Gunthorpe wrote:
> > In CCA, the ACPI/etc doesn't tell the OS whether the SMMU is a confidential
> > T=1 instance or a normal T=0 one. Instead, it has to be learned by issuing
> > a trusted RSI. Before the kernel can operate the trusted T=1 IOMMU, it also
> > has to validate all the information that it gets from ACPI against the true
> > information that it gets from the RSI call, to ensure the ACPI is correct
> > and prevent substitution attacks.
> >
> > Use RSI_VSMMU_GET_INFO during probe and require the returned register range
> > to match firmware. Then use RSI_ARCH_DEV_ACTIVATE before mapping registers.
> >
> > Currently the driver doesn't support a T=0 SMMU inside a realm. For example
> > it doesn't make the page table allocations into shared memory. If we are in
> > a realm reject any SMMU that is not T=1.
> >
> > Once the SMMU is activated, its DMA will follow the DEV_FLAG_DMA_CC_PRIVATE
> > rules. It must set that flag to ensure its coherent allocations for its own
> > structures are allocated from private memory, not the SWIOTLB shared pool.
> >
> > Also skip Tegra241 CMDQV implementation in the realm world, since realm has
> > the support only for a standard SMMU for now.
>
> Maybe clarify that from a guest perspective there is no way to verify
> the information with the RMM in the NVDA200C ACPI device so that MMIO
> space cannot be used.
No way yet with the current RMM spec. But, yes. I can clarify it.
> > [ ... 21 lines skipped ... ]
> > @@ -5611,8 +5613,11 @@ static int acpi_smmu_iort_probe_model(struct acpi_iort_node *node,
> > /*
> > * Tegra241 implementation stores its SMMU options and impl_dev
> > * in DSDT. Thus, go through the ACPI tables unconditionally.
> > + *
> > + * Realm doesn't support Tegra CMDQV yet.
> > */
> > - acpi_smmu_dsdt_probe_tegra241_cmdqv(node, smmu);
> > + if (!is_realm_world())
> > + acpi_smmu_dsdt_probe_tegra241_cmdqv(node, smmu);
>
> I think I wolud put this check inside
> acpi_smmu_dsdt_probe_tegra241_cmdqv() with a comment including the
> above note.
OK (to the other two places too).
Thanks
Nicolin