On Thu, 26 Feb 2026 18:50:22 +0800 fanhuang <[email protected]> wrote:
> Hi all, > > This is v6 of the SPM (Specific Purpose Memory) patch. Thank you for > the feedback on v5, especially Gregory's review. > > Changes in v6: > - Added validation: memmap-type now requires memdev to be specified, > to avoid misconfiguration on memory-less NUMA nodes > - Simplified pc_update_numa_memory_types() by replacing switch/goto > with a direct conditional expression > - Reserved memory nodes are now excluded from SRAT memory affinity > entries, since E820 already marks them as reserved and SRAT should > not report them as enabled memory affinity > > Use case: > This feature allows marking NUMA node memory as Specific Purpose Memory > (SPM) or reserved in the E820 table. SPM serves as a hint to the guest > that this memory might be managed by device drivers based on guest policy > > Example usage: > -object memory-backend-ram,size=8G,id=m0 > -object memory-backend-memfd,size=8G,id=m1 > -numa node,nodeid=0,memdev=m0 > -numa node,nodeid=1,memdev=m1,memmap-type=spm > > Supported memmap-type values: > - normal: Regular system RAM (E820 type 1, default) > - spm: Specific Purpose Memory (E820 type 0xEFFFFFFF), a hint > that this memory might be managed by device drivers > - reserved: Reserved memory (E820 type 2), not usable as RAM Interface looks good to me. I'm not familiar enough to confirm the x86 specific elements without more time than I have today though so no tags from me. Thanks for doing this! Jonathan
