Skip to content

backends/hostmem: Make QOM types and properties unconditional

Markus Armbruster qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7backends/hostmem: Drop redundant validation of property "size"backends/hostmem-epc.c backends/hostmem-file.c backends/hostmem-memfd.c +2 more+0 -245 replies
2/7backends/hostmem-file: Drop useless validation of property "mem-path"backends/hostmem-file.c+0 -52 replies
3/7backends/hostmem: Improve error reporting when method alloc() failsbackends/hostmem-shm.c backends/hostmem.c+4 -12 replies
4/7backends/hostmem-epc: Register QOM type unconditionallybackends/hostmem-epc.c+1 -62 replies
5/7backends/hostmem-memfd: Register QOM type unconditionallybackends/hostmem-memfd.c+1 -32 replies
6/7util/memfd: Improve error message when memfd_create() failsutil/memfd.c+4 -12 replies
7/7backends/hostmem-memfd: Add huge TLB properties unconditionallybackends/hostmem-memfd.c+12 -142 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchDaniel P. BerrangéMark Cave-Ayland
1/7R-b R-b
2/7R-b R-b
3/7R-b R-b
4/7R-b R-b
5/7R-b R-b
6/7R-b R-b
7/7R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] backends/hostmem: Make QOM types and properties unconditional

I recently checked qom introspection for dangling child and link types, and found one from sgx-epc to memory-backend-epc. I reported

    Subject: qemu-system-x86_64 appears to have sgx-epc, but not memory-backend-epc
    Date: Thu, 22 Oct 2026 14:58:16 +0200
    Message-ID: <[email protected]>

Daniel identified why: we register QOM type "memory-backend-epc" conditionally. He called that "rather dubious". We found similar conditional registration of "hostmem-memfd".

This series makes them both unconditional, along with a two class properties. It also improves error reporting.

Markus Armbruster (7):
backends/hostmem: Drop redundant validation of property "size" backends/hostmem-file: Drop useless validation of property "mem-path" backends/hostmem: Improve error reporting when method alloc() fails backends/hostmem-epc: Register QOM type unconditionally backends/hostmem-memfd: Register QOM type unconditionally util/memfd: Improve error message when memfd_create() fails backends/hostmem-memfd: Add huge TLB properties unconditionally

 backends/hostmem-epc.c   | 12 +-----------
 backends/hostmem-file.c  |  9 ---------
 backends/hostmem-memfd.c | 35 +++++++++++++----------------------
 backends/hostmem-ram.c   |  5 -----
 backends/hostmem-shm.c   |  7 +------
 backends/hostmem.c       |  3 +++
 util/memfd.c             |  5 ++++-
 7 files changed, 22 insertions(+), 54 deletions(-)
Signature · 1 line
2.55.0