Re: [PATCH v3 7/7] iommu/arm-smmu-v3: Probe a guest-level Realm VSMMU via RSI commands
From: Jason Gunthorpe
Date: Wed Nov 25 2026 - 13:08:19 EST
> 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.
> [ ... 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.
> break;
> }
>
> @@ -5676,7 +5681,9 @@ static int arm_smmu_device_dt_probe(struct platform_device *pdev,
> smmu->features |= ARM_SMMU_FEAT_COHERENCY;
>
> if (of_device_is_compatible(dev->of_node, "nvidia,tegra264-smmu")) {
> - tegra_cmdqv_dt_probe(dev->of_node, smmu);
> + /* Realm doesn't support Tegra CMDQV yet */
> + if (!is_realm_world())
> + tegra_cmdqv_dt_probe(dev->of_node, smmu);
> static_branch_enable(&arm_smmu_erratum_repeat_tlbi_cfgi_key);
> }
Ditto
> [ ... 55 lines skipped ... ]
> @@ -5814,6 +5868,12 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
> }
> ioaddr = res->start;
>
> + if (is_realm_world()) {
same here
But the logic looks sound otherwise
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
There will be more to do when we get to TDISP devices of course, but
this is good enough to for upstream to boot on a VM offering them
without using them.
--
Jason