All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: fanhuang <FangSheng.Huang@amd.com>
Cc: <qemu-devel@nongnu.org>, <david@redhat.com>,
	<jonathan.cameron@huawei.com>, <Zhigang.Luo@amd.com>,
	<Lianjie.Shi@amd.com>
Subject: Re: [PATCH v4 0/1] numa: add 'spm' option for Specific Purpose Memory
Date: Fri, 2 Jan 2026 14:09:22 +0100	[thread overview]
Message-ID: <20260102140922.456f599e@imammedo-mac> (raw)
In-Reply-To: <20251209093841.2250527-1-FangSheng.Huang@amd.com>

On Tue, 9 Dec 2025 17:38:40 +0800
fanhuang <FangSheng.Huang@amd.com> wrote:

> 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

I'm still not fond of 'spm' toggle on numa node itself (even though on AMD hadware sunch memory has 1:1 mapping)
without device model in between.

Can we try following instead:
  * add 'spm' property to DIMM device and disable hotplug on it in such case
  * make E820 enumerate spm/not hotpluggble marked DIMMs.

That will let us later to have mixed memory on the node if such need arises without
breaking QEMU CLI.

> Please review. Thanks!
> 
> Best regards,
> Jerry Huang
> 



  parent reply	other threads:[~2026-01-02 13:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-09  9:38 [PATCH v4 0/1] numa: add 'spm' option for Specific Purpose Memory fanhuang
2025-12-09  9:38 ` [PATCH v4 1/1] " fanhuang
2025-12-23  9:56   ` Jonathan Cameron via
2025-12-23 10:01     ` David Hildenbrand (Red Hat)
2025-12-26  7:15       ` Huang, FangSheng (Jerry)
2025-12-26 22:46         ` Alistair Popple
2025-12-30 20:09         ` David Hildenbrand (Red Hat)
2026-01-04 10:43           ` Huang, FangSheng (Jerry)
2025-12-29 18:26 ` [PATCH v4 0/1] " Gregory Price
2025-12-30  2:55   ` Huang, FangSheng (Jerry)
2025-12-30 14:06     ` Gregory Price
2025-12-30 20:15       ` David Hildenbrand (Red Hat)
2025-12-30 23:03         ` Gregory Price
2026-01-02 13:09 ` Igor Mammedov [this message]
2026-01-02 16:28   ` Gregory Price
2026-01-02 16:30 ` Gregory Price
2026-01-05 15:29   ` David Hildenbrand (Red Hat)
2026-01-07  9:03     ` Huang, FangSheng (Jerry)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260102140922.456f599e@imammedo-mac \
    --to=imammedo@redhat.com \
    --cc=FangSheng.Huang@amd.com \
    --cc=Lianjie.Shi@amd.com \
    --cc=Zhigang.Luo@amd.com \
    --cc=david@redhat.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.