Hi Gregory,
Thanks for your review and good question!
On 12/30/2025 2:26 AM, Gregory Price wrote:
On Tue, Dec 09, 2025 at 05:38:40PM +0800, fanhuang wrote:
Example usage:
-object memory-backend-ram,size=8G,id=m0
-object memory-backend-file,size=8G,id=m1,mem-path=/dev/dax0.0
-numa node,nodeid=0,memdev=m0
-numa node,nodeid=1,memdev=m1,spm=on
Interesting that you added spm= to NUMA rather than the memory backend,
but then in the patch you consume it to apply to the EFI/E820 memory
maps.
Sorry i've missed prior versions, is numa the right place to put this,
considering that the node is not necessarily 100% SPM on a real system?
The decision to add `spm=` to NUMA rather than the memory backend was
based on
earlier feedback from David during our initial RFC discussions.
David raised a concern that if we put the spm flag on the memory
backend, a user
could accidentally pass such a memory backend to DIMM/virtio-mem/boot
memory,
which would have very undesired side effects.
(in practice it should be, but not technically required to be)
You're right that on a real system, a NUMA node is not technically
required to
be 100% SPM. However, in AMD's use case, the entire NUMA node memory
(backed by
memdev) is intended to be SPM, and this approach provides a cleaner and
safer
configuration interface.
~Gregory
Please let me know if you have further concerns or suggestions.
Best Regards,
Jerry Huang