Re: [PATCH v18 6/7] firmware: arm_rmm: Ensure the RMM has GPT entries for memory

From: Suzuki K Poulose

Date: Mon Sep 21 2026 - 06:11:01 EST


On 16/09/2026 19:23, Alper Gun wrote:
On Sat, Sep 12, 2026 at 1:37 AM Suzuki K Poulose <suzuki.poulose@xxxxxxx> wrote:
[...]
+static int rmi_init_metadata(void)
+{
+ phys_addr_t start, end;
+ struct memblock_region *r;
+
+ for_each_mem_region(r) {
+ int ret;
+
+ /* Firmware-reserved NOMAP regions are not usable system RAM */
+ if (memblock_is_nomap(r))
+ continue;
+
+ start = memblock_region_memory_base_pfn(r) << PAGE_SHIFT;
+ end = memblock_region_memory_end_pfn(r) << PAGE_SHIFT;
+
+ ret = rmi_prepare_memory(start, end);
+ if (ret)
+ return ret;
+ }

Hi Suzuki,

What happens if a system has memory regions in memblock that are not
tracked by RMM (e.g. CXL memory)?

Currently, rmi_verify_memory_tracking() returns -ENODEV for untracked
regions, causing rmi_init_metadata() to abort and disable CCA
system-wide.

Shouldn't rmi_init_metadata() skip untracked regions (continue) with a
warning/info log instead of aborting? That would allow Realm support
for conventional DRAM while leaving untracked memory for the host.

No. We can't handle RMI_ERROR_TRACKING if the Host tries to back the
Realm memory by the memory that we haven't verified. So, it is safer
to give up KVM support for now. We plan to address this in future
by introducing the dynamic tracking.

Cheers
Suzuki


Thanks,
Alper