Skip to content

numa: add 'spm' option for Specific Purpose Memory

fanhuang qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest1 patch 16 repliesIn review
  2. v31 patch 1 replySuperseded
  3. v2 posting 2/21 patch 8 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/21 patch2 repliesSuperseded
v11 patch0 repliesSuperseded

Changes in v4 from the cover letter

- Added architecture check: spm=on now reports error on non-x86 machines
- Simplified return logic in e820_update_entry_type() (return true/false directly)
- Changed 4GB boundary spanning from warn_report to error_report + exit
- Updated QAPI documentation to be architecture-agnostic (removed E820 reference)
- Removed unnecessary comments

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1numa: add 'spm' option for Specific Purpose Memoryhw/core/numa.c hw/i386/e820_memory_layout.c hw/i386/e820_memory_layout.h +4 more+151 -26 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/1] numa: add 'spm' option for Specific Purpose Memory

Hi all,

This is v4 of the SPM (Specific Purpose Memory) patch. Thank you Jonathan for the detailed review.

Changes in v4 (addressing Jonathan's feedback):
- Added architecture check: spm=on now reports error on non-x86 machines
- Simplified return logic in e820_update_entry_type() (return true/false directly)
- Changed 4GB boundary spanning from warn_report to error_report + exit
- Updated QAPI documentation to be architecture-agnostic (removed E820 reference)
- Removed unnecessary comments

Use case:
This feature allows passing EFI_MEMORY_SP (Specific Purpose Memory) from host to guest VM, useful for memory reserved for specific PCI devices (e.g., GPU memory via VFIO-PCI). The SPM memory appears as soft reserved to the guest and is managed by device drivers rather than the OS memory allocator.

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

Please review. Thanks!

Best regards,
Jerry Huang

Signature · 1 line
2.34.1