* [PATCH 0/9] tools: Move more tools sources into tools/
@ 2026-05-08 15:24 Peter Maydell
2026-05-08 15:24 ` [PATCH 1/9] ebpf: move ebpf skeleton source to ebpf/ directory Peter Maydell
` (11 more replies)
0 siblings, 12 replies; 23+ messages in thread
From: Peter Maydell @ 2026-05-08 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
We have a set of binaries that we call "tools": they're built based on
the --enable-tools/--disable-tools configure setting, they're
documented in docs/tools, and they're standalone executables of one
form or another.
Currently the sources for these are a bit scattered: many still in the
top level source directory, some in contrib, one or two actually in
the tools directory.
As an initial attempt at cleanup, this patchset moves the sources for
qemu-bridge-helper, qemu-edid, qemu-img, qemu-io, qemu-nbd,
qemu-keymap, qemu-vmsr-helper and elf2dmp into the tools/ directory.
The patchseries also moves the ebfp skeleton sources from tools/ebpf/
to ebpf/bpf-src/, because this isn't a tool by the above definition.
As per my thread from a while back, I would ultimately like us to
clean up contrib/:
https://lore.kernel.org/qemu-devel/CAFEAcA_5HvGriDsWnb1ALuA_dgG320eKv7yuM2kThv=rfOSZQA@mail.gmail.com/
But parts of that clearly need more discussion. So this is just doing
some parts that I hope are not controversial.
Annoyingly, meson doesn't seem to provide any way for a subdirectory
meson.build to say "the foo.c in this subdir builds into a foo
executable that lives at the top level of the builddir". And we have a
lot of test harness stuff plus user muscle memory that assumes that
qemu-img and qemu-io live there. So the build runes for these tools
have to stay in the top level meson.build (and tools/meson.build
remains an empty file). The exception is that contrib/elf2dmp/elf2dmp
is now tools/elf2dmp/elf2dmp, but I think the set of people who were
running that from the build directory will be small.
thanks
-- PMM
Peter Maydell (9):
ebpf: move ebpf skeleton source to ebpf/ directory
tools: Move qemu-bridge-helper sources to tools/ directory
tools: Move qemu-edid sources to tools/ directory
tools: Move qemu-img sources to tools/ directory
tools: Move qemu-io sources to tools/ directory
tools: Move qemu-nbd sources to tools/ directory
tools: Move qemu-keymap sources to tools/ directory
tools: Move qemu-vmsr-helper up a directory level
tools: Move elf2dmp from contrib/ to tools/
MAINTAINERS | 15 +++++++-------
docs/tools/qemu-img.rst | 2 +-
{tools/ebpf => ebpf/bpf-src}/Makefile.ebpf | 2 +-
{tools/ebpf => ebpf/bpf-src}/rss.bpf.c | 0
meson.build | 20 +++++++++----------
{contrib => tools}/elf2dmp/addrspace.c | 0
{contrib => tools}/elf2dmp/addrspace.h | 0
{contrib => tools}/elf2dmp/download.c | 0
{contrib => tools}/elf2dmp/download.h | 0
{contrib => tools}/elf2dmp/err.h | 0
{contrib => tools}/elf2dmp/kdbg.h | 0
{contrib => tools}/elf2dmp/main.c | 0
{contrib => tools}/elf2dmp/meson.build | 0
{contrib => tools}/elf2dmp/pdb.c | 0
{contrib => tools}/elf2dmp/pdb.h | 0
{contrib => tools}/elf2dmp/pe.h | 0
{contrib => tools}/elf2dmp/qemu_elf.c | 0
{contrib => tools}/elf2dmp/qemu_elf.h | 0
.../qemu-bridge-helper.c | 0
qemu-edid.c => tools/qemu-edid.c | 0
qemu-img-cmds.hx => tools/qemu-img-cmds.hx | 0
qemu-img.c => tools/qemu-img.c | 0
qemu-io-cmds.c => tools/qemu-io-cmds.c | 0
qemu-io.c => tools/qemu-io.c | 0
qemu-keymap.c => tools/qemu-keymap.c | 0
qemu-nbd.c => tools/qemu-nbd.c | 0
tools/{i386 => }/qemu-vmsr-helper.c | 0
tools/{i386 => }/rapl-msr-index.h | 0
28 files changed, 20 insertions(+), 19 deletions(-)
rename {tools/ebpf => ebpf/bpf-src}/Makefile.ebpf (96%)
rename {tools/ebpf => ebpf/bpf-src}/rss.bpf.c (100%)
rename {contrib => tools}/elf2dmp/addrspace.c (100%)
rename {contrib => tools}/elf2dmp/addrspace.h (100%)
rename {contrib => tools}/elf2dmp/download.c (100%)
rename {contrib => tools}/elf2dmp/download.h (100%)
rename {contrib => tools}/elf2dmp/err.h (100%)
rename {contrib => tools}/elf2dmp/kdbg.h (100%)
rename {contrib => tools}/elf2dmp/main.c (100%)
rename {contrib => tools}/elf2dmp/meson.build (100%)
rename {contrib => tools}/elf2dmp/pdb.c (100%)
rename {contrib => tools}/elf2dmp/pdb.h (100%)
rename {contrib => tools}/elf2dmp/pe.h (100%)
rename {contrib => tools}/elf2dmp/qemu_elf.c (100%)
rename {contrib => tools}/elf2dmp/qemu_elf.h (100%)
rename qemu-bridge-helper.c => tools/qemu-bridge-helper.c (100%)
rename qemu-edid.c => tools/qemu-edid.c (100%)
rename qemu-img-cmds.hx => tools/qemu-img-cmds.hx (100%)
rename qemu-img.c => tools/qemu-img.c (100%)
rename qemu-io-cmds.c => tools/qemu-io-cmds.c (100%)
rename qemu-io.c => tools/qemu-io.c (100%)
rename qemu-keymap.c => tools/qemu-keymap.c (100%)
rename qemu-nbd.c => tools/qemu-nbd.c (100%)
rename tools/{i386 => }/qemu-vmsr-helper.c (100%)
rename tools/{i386 => }/rapl-msr-index.h (100%)
--
2.43.0
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/9] ebpf: move ebpf skeleton source to ebpf/ directory
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
@ 2026-05-08 15:24 ` Peter Maydell
2026-05-08 16:07 ` Daniel P. Berrangé
2026-05-27 6:35 ` Philippe Mathieu-Daudé
2026-05-08 15:24 ` [PATCH 2/9] tools: Move qemu-bridge-helper sources to tools/ directory Peter Maydell
` (10 subsequent siblings)
11 siblings, 2 replies; 23+ messages in thread
From: Peter Maydell @ 2026-05-08 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
Currently the code and makefile to regenerate rss.bpf.skeleton.h
are in tools/ebpf/. This isn't really a good fit, because the tools/
directory ought to be standalone tools of the kind that we build
with configured with --enable-tools and document in docs/tools.
Move it to ebpf/bpf-src with the rest of the ebpf code.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
{tools/ebpf => ebpf/bpf-src}/Makefile.ebpf | 2 +-
| 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename {tools/ebpf => ebpf/bpf-src}/Makefile.ebpf (96%)
rename {tools/ebpf => ebpf/bpf-src}/rss.bpf.c (100%)
diff --git a/tools/ebpf/Makefile.ebpf b/ebpf/bpf-src/Makefile.ebpf
similarity index 96%
rename from tools/ebpf/Makefile.ebpf
rename to ebpf/bpf-src/Makefile.ebpf
index 572ca5987a..7ed0e3b440 100755
--- a/tools/ebpf/Makefile.ebpf
+++ b/ebpf/bpf-src/Makefile.ebpf
@@ -21,4 +21,4 @@ clean:
%.skeleton.h: %.o
bpftool gen skeleton $< > $@
- cp $@ ../../ebpf/
+ cp $@ ..
diff --git a/tools/ebpf/rss.bpf.c b/ebpf/bpf-src/rss.bpf.c
similarity index 100%
rename from tools/ebpf/rss.bpf.c
rename to ebpf/bpf-src/rss.bpf.c
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 2/9] tools: Move qemu-bridge-helper sources to tools/ directory
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
2026-05-08 15:24 ` [PATCH 1/9] ebpf: move ebpf skeleton source to ebpf/ directory Peter Maydell
@ 2026-05-08 15:24 ` Peter Maydell
2026-05-08 15:24 ` [PATCH 3/9] tools: Move qemu-edid " Peter Maydell
` (9 subsequent siblings)
11 siblings, 0 replies; 23+ messages in thread
From: Peter Maydell @ 2026-05-08 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
Move the qemu-bridge-helper sources to the tools/ directory.
Note that we have to keep the meson.build rule for building the
executable in the top-level meson.build file rather than putting it
in tools/meson.build, because meson has no way to say "build
executable foo in the top level of the build directory" using
"executable()" in the meson.build file in a subdirectory. We don't
want to have the tools executables themselves built to tools/foo,
because developers and test-harness code all assumes they are in the
root of the build tree.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
MAINTAINERS | 2 +-
meson.build | 2 +-
qemu-bridge-helper.c => tools/qemu-bridge-helper.c | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename qemu-bridge-helper.c => tools/qemu-bridge-helper.c (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 9d3d645953..06d703d422 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3430,7 +3430,7 @@ M: Jason Wang <jasowang@redhat.com>
S: Maintained
F: net/
F: include/net/
-F: qemu-bridge-helper.c
+F: tools/qemu-bridge-helper.c
T: git https://github.com/jasowang/qemu.git net
F: qapi/net.json
diff --git a/meson.build b/meson.build
index 5fbdc75a0f..b7b260e40c 100644
--- a/meson.build
+++ b/meson.build
@@ -4558,7 +4558,7 @@ if have_tools
endif
if host_os == 'linux'
- executable('qemu-bridge-helper', files('qemu-bridge-helper.c'),
+ executable('qemu-bridge-helper', files('tools/qemu-bridge-helper.c'),
dependencies: [qemuutil, libcap_ng],
install: true,
install_dir: get_option('libexecdir'))
diff --git a/qemu-bridge-helper.c b/tools/qemu-bridge-helper.c
similarity index 100%
rename from qemu-bridge-helper.c
rename to tools/qemu-bridge-helper.c
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 3/9] tools: Move qemu-edid sources to tools/ directory
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
2026-05-08 15:24 ` [PATCH 1/9] ebpf: move ebpf skeleton source to ebpf/ directory Peter Maydell
2026-05-08 15:24 ` [PATCH 2/9] tools: Move qemu-bridge-helper sources to tools/ directory Peter Maydell
@ 2026-05-08 15:24 ` Peter Maydell
2026-05-08 15:24 ` [PATCH 4/9] tools: Move qemu-img " Peter Maydell
` (8 subsequent siblings)
11 siblings, 0 replies; 23+ messages in thread
From: Peter Maydell @ 2026-05-08 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
Move the qemu-edid source files into the tools subdirectory.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
MAINTAINERS | 2 +-
meson.build | 2 +-
qemu-edid.c => tools/qemu-edid.c | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename qemu-edid.c => tools/qemu-edid.c (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 06d703d422..cd53604f92 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2841,7 +2841,7 @@ M: Gerd Hoffmann <kraxel@redhat.com>
S: Maintained
F: hw/display/edid*
F: include/hw/display/edid.h
-F: qemu-edid.c
+F: tools/qemu-edid.c
macOS PV Graphics (apple-gfx)
M: Phil Dennis-Jordan <phil@philjordan.eu>
diff --git a/meson.build b/meson.build
index b7b260e40c..d4c16b394e 100644
--- a/meson.build
+++ b/meson.build
@@ -4545,7 +4545,7 @@ if have_tools
subdir('contrib/elf2dmp')
- executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'),
+ executable('qemu-edid', files('tools/qemu-edid.c', 'hw/display/edid-generate.c'),
dependencies: [qemuutil, rt],
install: true)
diff --git a/qemu-edid.c b/tools/qemu-edid.c
similarity index 100%
rename from qemu-edid.c
rename to tools/qemu-edid.c
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 4/9] tools: Move qemu-img sources to tools/ directory
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
` (2 preceding siblings ...)
2026-05-08 15:24 ` [PATCH 3/9] tools: Move qemu-edid " Peter Maydell
@ 2026-05-08 15:24 ` Peter Maydell
2026-05-08 15:24 ` [PATCH 5/9] tools: Move qemu-io " Peter Maydell
` (7 subsequent siblings)
11 siblings, 0 replies; 23+ messages in thread
From: Peter Maydell @ 2026-05-08 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
Move the qemu-img source files into the tools subdirectory.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
MAINTAINERS | 2 +-
docs/tools/qemu-img.rst | 2 +-
meson.build | 4 ++--
qemu-img-cmds.hx => tools/qemu-img-cmds.hx | 0
qemu-img.c => tools/qemu-img.c | 0
5 files changed, 4 insertions(+), 4 deletions(-)
rename qemu-img-cmds.hx => tools/qemu-img-cmds.hx (100%)
rename qemu-img.c => tools/qemu-img.c (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index cd53604f92..2ef9655c94 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3106,7 +3106,7 @@ F: qapi/block*.json
F: qapi/transaction.json
F: include/block/
F: include/system/block-*.h
-F: qemu-img*
+F: tools/qemu-img*
F: docs/tools/qemu-img.rst
F: qemu-io*
F: tests/qemu-iotests/
diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst
index 558b0eb84d..52466759d2 100644
--- a/docs/tools/qemu-img.rst
+++ b/docs/tools/qemu-img.rst
@@ -39,7 +39,7 @@ Standard options:
The following commands are supported:
-.. hxtool-doc:: qemu-img-cmds.hx
+.. hxtool-doc:: tools/qemu-img-cmds.hx
Command parameters:
diff --git a/meson.build b/meson.build
index d4c16b394e..5d34ea39ed 100644
--- a/meson.build
+++ b/meson.build
@@ -3561,7 +3561,7 @@ genh += qemu_version
hxdep = []
hx_headers = [
['qemu-options.hx', 'qemu-options.def'],
- ['qemu-img-cmds.hx', 'qemu-img-cmds.h'],
+ ['tools/qemu-img-cmds.hx', 'qemu-img-cmds.h'],
]
if have_system
hx_headers += [
@@ -4523,7 +4523,7 @@ endif
if have_tools
tools_link_args = enable_modules ? ['@block.syms'] : []
- qemu_img = executable('qemu-img', [files('qemu-img.c'), hxdep],
+ qemu_img = executable('qemu-img', [files('tools/qemu-img.c'), hxdep],
link_args: tools_link_args, link_depends: block_syms,
dependencies: [authz, block, crypto, io, qom, qemuutil], install: true)
qemu_io = executable('qemu-io', files('qemu-io.c'),
diff --git a/qemu-img-cmds.hx b/tools/qemu-img-cmds.hx
similarity index 100%
rename from qemu-img-cmds.hx
rename to tools/qemu-img-cmds.hx
diff --git a/qemu-img.c b/tools/qemu-img.c
similarity index 100%
rename from qemu-img.c
rename to tools/qemu-img.c
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 5/9] tools: Move qemu-io sources to tools/ directory
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
` (3 preceding siblings ...)
2026-05-08 15:24 ` [PATCH 4/9] tools: Move qemu-img " Peter Maydell
@ 2026-05-08 15:24 ` Peter Maydell
2026-05-08 15:24 ` [PATCH 6/9] tools: Move qemu-nbd " Peter Maydell
` (6 subsequent siblings)
11 siblings, 0 replies; 23+ messages in thread
From: Peter Maydell @ 2026-05-08 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
Move the qemu-io sources into the tools/ subdirectory.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
MAINTAINERS | 2 +-
meson.build | 4 ++--
qemu-io-cmds.c => tools/qemu-io-cmds.c | 0
qemu-io.c => tools/qemu-io.c | 0
4 files changed, 3 insertions(+), 3 deletions(-)
rename qemu-io-cmds.c => tools/qemu-io-cmds.c (100%)
rename qemu-io.c => tools/qemu-io.c (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 2ef9655c94..0f89bf2642 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3108,7 +3108,7 @@ F: include/block/
F: include/system/block-*.h
F: tools/qemu-img*
F: docs/tools/qemu-img.rst
-F: qemu-io*
+F: tools/qemu-io*
F: tests/qemu-iotests/
F: util/qemu-progress.c
F: qobject/block-qdict.c
diff --git a/meson.build b/meson.build
index 5d34ea39ed..1f34ed71ab 100644
--- a/meson.build
+++ b/meson.build
@@ -3810,7 +3810,7 @@ if have_block
'block.c',
'blockjob.c',
'job.c',
- 'qemu-io-cmds.c',
+ 'tools/qemu-io-cmds.c',
))
if config_host_data.get('CONFIG_REPLICATION')
block_ss.add(files('replication.c'))
@@ -4526,7 +4526,7 @@ if have_tools
qemu_img = executable('qemu-img', [files('tools/qemu-img.c'), hxdep],
link_args: tools_link_args, link_depends: block_syms,
dependencies: [authz, block, crypto, io, qom, qemuutil], install: true)
- qemu_io = executable('qemu-io', files('qemu-io.c'),
+ qemu_io = executable('qemu-io', files('tools/qemu-io.c'),
link_args: tools_link_args, link_depends: block_syms,
dependencies: [block, qemuutil], install: true)
qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
diff --git a/qemu-io-cmds.c b/tools/qemu-io-cmds.c
similarity index 100%
rename from qemu-io-cmds.c
rename to tools/qemu-io-cmds.c
diff --git a/qemu-io.c b/tools/qemu-io.c
similarity index 100%
rename from qemu-io.c
rename to tools/qemu-io.c
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 6/9] tools: Move qemu-nbd sources to tools/ directory
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
` (4 preceding siblings ...)
2026-05-08 15:24 ` [PATCH 5/9] tools: Move qemu-io " Peter Maydell
@ 2026-05-08 15:24 ` Peter Maydell
2026-05-08 15:24 ` [PATCH 7/9] tools: Move qemu-keymap " Peter Maydell
` (5 subsequent siblings)
11 siblings, 0 replies; 23+ messages in thread
From: Peter Maydell @ 2026-05-08 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
Move the qemu-nbd sources into the tools/ subdirectory.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
MAINTAINERS | 2 +-
meson.build | 2 +-
qemu-nbd.c => tools/qemu-nbd.c | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename qemu-nbd.c => tools/qemu-nbd.c (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 0f89bf2642..f2c66d7cc3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4227,7 +4227,7 @@ S: Maintained
F: block/nbd*
F: nbd/
F: include/block/nbd*
-F: qemu-nbd.*
+F: tools/qemu-nbd.*
F: blockdev-nbd.c
F: docs/interop/nbd.rst
F: docs/tools/qemu-nbd.rst
diff --git a/meson.build b/meson.build
index 1f34ed71ab..63eb4031a4 100644
--- a/meson.build
+++ b/meson.build
@@ -4529,7 +4529,7 @@ if have_tools
qemu_io = executable('qemu-io', files('tools/qemu-io.c'),
link_args: tools_link_args, link_depends: block_syms,
dependencies: [block, qemuutil], install: true)
- qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
+ qemu_nbd = executable('qemu-nbd', files('tools/qemu-nbd.c'),
link_args: tools_link_args, link_depends: block_syms,
dependencies: [blockdev, qemuutil, selinux],
install: true)
diff --git a/qemu-nbd.c b/tools/qemu-nbd.c
similarity index 100%
rename from qemu-nbd.c
rename to tools/qemu-nbd.c
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 7/9] tools: Move qemu-keymap sources to tools/ directory
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
` (5 preceding siblings ...)
2026-05-08 15:24 ` [PATCH 6/9] tools: Move qemu-nbd " Peter Maydell
@ 2026-05-08 15:24 ` Peter Maydell
2026-05-08 15:24 ` [PATCH 8/9] tools: Move qemu-vmsr-helper up a directory level Peter Maydell
` (4 subsequent siblings)
11 siblings, 0 replies; 23+ messages in thread
From: Peter Maydell @ 2026-05-08 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
Move the qemu-keymap sources into the tools subdirectory.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
meson.build | 2 +-
qemu-keymap.c => tools/qemu-keymap.c | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename qemu-keymap.c => tools/qemu-keymap.c (100%)
diff --git a/meson.build b/meson.build
index 63eb4031a4..8164458eea 100644
--- a/meson.build
+++ b/meson.build
@@ -4517,7 +4517,7 @@ subdir('qga')
# when we don't build tools or system
if xkbcommon.found()
# used for the update-keymaps target, so include rules even if !have_tools
- qemu_keymap = executable('qemu-keymap', files('qemu-keymap.c', 'ui/input-keymap.c') + genh,
+ qemu_keymap = executable('qemu-keymap', files('tools/qemu-keymap.c', 'ui/input-keymap.c') + genh,
dependencies: [qemuutil, xkbcommon], install: have_tools)
endif
diff --git a/qemu-keymap.c b/tools/qemu-keymap.c
similarity index 100%
rename from qemu-keymap.c
rename to tools/qemu-keymap.c
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 8/9] tools: Move qemu-vmsr-helper up a directory level
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
` (6 preceding siblings ...)
2026-05-08 15:24 ` [PATCH 7/9] tools: Move qemu-keymap " Peter Maydell
@ 2026-05-08 15:24 ` Peter Maydell
2026-05-12 6:53 ` Akihiko Odaki
2026-05-08 15:24 ` [PATCH 9/9] tools: Move elf2dmp from contrib/ to tools/ Peter Maydell
` (3 subsequent siblings)
11 siblings, 1 reply; 23+ messages in thread
From: Peter Maydell @ 2026-05-08 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
We currently have exactly one subdirectory of tools, i386, which has
the qemu-vmsr-helper sources in it. An entire subdirectory isn't
really necessary here as we have only one i386-specific tool binary
and no expectation that we will have many more. Move it up a
directory level so it's in tools/ with all the other tools sources.
This was previously covered by the "X86 general architecture support"
section of MAINTAINERS under the tools/i386/ path; add both the
source file and the docs file to that section.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
MAINTAINERS | 3 ++-
meson.build | 2 +-
tools/{i386 => }/qemu-vmsr-helper.c | 0
tools/{i386 => }/rapl-msr-index.h | 0
4 files changed, 3 insertions(+), 2 deletions(-)
rename tools/{i386 => }/qemu-vmsr-helper.c (100%)
rename tools/{i386 => }/rapl-msr-index.h (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index f2c66d7cc3..88cc1516d8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -153,7 +153,8 @@ F: stubs/hmp-cmds-target-i386.c
F: target/i386/*.[ch]
F: target/i386/Kconfig
F: target/i386/meson.build
-F: tools/i386/
+F: tools/qemu-vmsr-helper.c
+F: docs/tools/qemu-vmsr-helper.rst
F: tests/functional/i386/
F: tests/functional/x86_64/
diff --git a/meson.build b/meson.build
index 8164458eea..1dad3a2462 100644
--- a/meson.build
+++ b/meson.build
@@ -4569,7 +4569,7 @@ if have_tools
install: true)
if cpu == 'x86_64'
- executable('qemu-vmsr-helper', files('tools/i386/qemu-vmsr-helper.c'),
+ executable('qemu-vmsr-helper', files('tools/qemu-vmsr-helper.c'),
dependencies: [authz, crypto, io, qom, qemuutil,
libcap_ng, mpathpersist],
install: true)
diff --git a/tools/i386/qemu-vmsr-helper.c b/tools/qemu-vmsr-helper.c
similarity index 100%
rename from tools/i386/qemu-vmsr-helper.c
rename to tools/qemu-vmsr-helper.c
diff --git a/tools/i386/rapl-msr-index.h b/tools/rapl-msr-index.h
similarity index 100%
rename from tools/i386/rapl-msr-index.h
rename to tools/rapl-msr-index.h
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 9/9] tools: Move elf2dmp from contrib/ to tools/
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
` (7 preceding siblings ...)
2026-05-08 15:24 ` [PATCH 8/9] tools: Move qemu-vmsr-helper up a directory level Peter Maydell
@ 2026-05-08 15:24 ` Peter Maydell
2026-05-08 16:00 ` [PATCH 0/9] tools: Move more tools sources into tools/ Pierrick Bouvier
` (2 subsequent siblings)
11 siblings, 0 replies; 23+ messages in thread
From: Peter Maydell @ 2026-05-08 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
We install elf2dmp by default, so move it from tools/ to contrib/.
(Almost all the other tool-like binaries in contrib/ are not
installed by default, so are more like example code.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
MAINTAINERS | 2 +-
meson.build | 2 +-
{contrib => tools}/elf2dmp/addrspace.c | 0
{contrib => tools}/elf2dmp/addrspace.h | 0
{contrib => tools}/elf2dmp/download.c | 0
{contrib => tools}/elf2dmp/download.h | 0
{contrib => tools}/elf2dmp/err.h | 0
{contrib => tools}/elf2dmp/kdbg.h | 0
{contrib => tools}/elf2dmp/main.c | 0
{contrib => tools}/elf2dmp/meson.build | 0
{contrib => tools}/elf2dmp/pdb.c | 0
{contrib => tools}/elf2dmp/pdb.h | 0
{contrib => tools}/elf2dmp/pe.h | 0
{contrib => tools}/elf2dmp/qemu_elf.c | 0
{contrib => tools}/elf2dmp/qemu_elf.h | 0
15 files changed, 2 insertions(+), 2 deletions(-)
rename {contrib => tools}/elf2dmp/addrspace.c (100%)
rename {contrib => tools}/elf2dmp/addrspace.h (100%)
rename {contrib => tools}/elf2dmp/download.c (100%)
rename {contrib => tools}/elf2dmp/download.h (100%)
rename {contrib => tools}/elf2dmp/err.h (100%)
rename {contrib => tools}/elf2dmp/kdbg.h (100%)
rename {contrib => tools}/elf2dmp/main.c (100%)
rename {contrib => tools}/elf2dmp/meson.build (100%)
rename {contrib => tools}/elf2dmp/pdb.c (100%)
rename {contrib => tools}/elf2dmp/pdb.h (100%)
rename {contrib => tools}/elf2dmp/pe.h (100%)
rename {contrib => tools}/elf2dmp/qemu_elf.c (100%)
rename {contrib => tools}/elf2dmp/qemu_elf.h (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 88cc1516d8..054ae3e6c6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3938,7 +3938,7 @@ elf2dmp
M: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
R: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
S: Maintained
-F: contrib/elf2dmp/
+F: tools/elf2dmp/
Overall sensors
M: Philippe Mathieu-Daudé <philmd@linaro.org>
diff --git a/meson.build b/meson.build
index 1dad3a2462..69cdf2ab60 100644
--- a/meson.build
+++ b/meson.build
@@ -4543,7 +4543,7 @@ if have_tools
}]
endforeach
- subdir('contrib/elf2dmp')
+ subdir('tools/elf2dmp')
executable('qemu-edid', files('tools/qemu-edid.c', 'hw/display/edid-generate.c'),
dependencies: [qemuutil, rt],
diff --git a/contrib/elf2dmp/addrspace.c b/tools/elf2dmp/addrspace.c
similarity index 100%
rename from contrib/elf2dmp/addrspace.c
rename to tools/elf2dmp/addrspace.c
diff --git a/contrib/elf2dmp/addrspace.h b/tools/elf2dmp/addrspace.h
similarity index 100%
rename from contrib/elf2dmp/addrspace.h
rename to tools/elf2dmp/addrspace.h
diff --git a/contrib/elf2dmp/download.c b/tools/elf2dmp/download.c
similarity index 100%
rename from contrib/elf2dmp/download.c
rename to tools/elf2dmp/download.c
diff --git a/contrib/elf2dmp/download.h b/tools/elf2dmp/download.h
similarity index 100%
rename from contrib/elf2dmp/download.h
rename to tools/elf2dmp/download.h
diff --git a/contrib/elf2dmp/err.h b/tools/elf2dmp/err.h
similarity index 100%
rename from contrib/elf2dmp/err.h
rename to tools/elf2dmp/err.h
diff --git a/contrib/elf2dmp/kdbg.h b/tools/elf2dmp/kdbg.h
similarity index 100%
rename from contrib/elf2dmp/kdbg.h
rename to tools/elf2dmp/kdbg.h
diff --git a/contrib/elf2dmp/main.c b/tools/elf2dmp/main.c
similarity index 100%
rename from contrib/elf2dmp/main.c
rename to tools/elf2dmp/main.c
diff --git a/contrib/elf2dmp/meson.build b/tools/elf2dmp/meson.build
similarity index 100%
rename from contrib/elf2dmp/meson.build
rename to tools/elf2dmp/meson.build
diff --git a/contrib/elf2dmp/pdb.c b/tools/elf2dmp/pdb.c
similarity index 100%
rename from contrib/elf2dmp/pdb.c
rename to tools/elf2dmp/pdb.c
diff --git a/contrib/elf2dmp/pdb.h b/tools/elf2dmp/pdb.h
similarity index 100%
rename from contrib/elf2dmp/pdb.h
rename to tools/elf2dmp/pdb.h
diff --git a/contrib/elf2dmp/pe.h b/tools/elf2dmp/pe.h
similarity index 100%
rename from contrib/elf2dmp/pe.h
rename to tools/elf2dmp/pe.h
diff --git a/contrib/elf2dmp/qemu_elf.c b/tools/elf2dmp/qemu_elf.c
similarity index 100%
rename from contrib/elf2dmp/qemu_elf.c
rename to tools/elf2dmp/qemu_elf.c
diff --git a/contrib/elf2dmp/qemu_elf.h b/tools/elf2dmp/qemu_elf.h
similarity index 100%
rename from contrib/elf2dmp/qemu_elf.h
rename to tools/elf2dmp/qemu_elf.h
--
2.43.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH 0/9] tools: Move more tools sources into tools/
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
` (8 preceding siblings ...)
2026-05-08 15:24 ` [PATCH 9/9] tools: Move elf2dmp from contrib/ to tools/ Peter Maydell
@ 2026-05-08 16:00 ` Pierrick Bouvier
2026-05-08 16:22 ` Peter Maydell
2026-05-08 16:02 ` Pierrick Bouvier
2026-05-11 9:05 ` Kevin Wolf
11 siblings, 1 reply; 23+ messages in thread
From: Pierrick Bouvier @ 2026-05-08 16:00 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Paolo Bonzini, Daniel P. Berrangé,
Philippe Mathieu-Daudé, Viktor Prutyanov, Akihiko Odaki,
Gerd Hoffmann, Eric Blake, Vladimir Sementsov-Ogievskiy,
Jason Wang
On 5/8/2026 8:24 AM, Peter Maydell wrote:
> We have a set of binaries that we call "tools": they're built based on
> the --enable-tools/--disable-tools configure setting, they're
> documented in docs/tools, and they're standalone executables of one
> form or another.
>
> Currently the sources for these are a bit scattered: many still in the
> top level source directory, some in contrib, one or two actually in
> the tools directory.
>
> As an initial attempt at cleanup, this patchset moves the sources for
> qemu-bridge-helper, qemu-edid, qemu-img, qemu-io, qemu-nbd,
> qemu-keymap, qemu-vmsr-helper and elf2dmp into the tools/ directory.
>
> The patchseries also moves the ebfp skeleton sources from tools/ebpf/
> to ebpf/bpf-src/, because this isn't a tool by the above definition.
>
> As per my thread from a while back, I would ultimately like us to
> clean up contrib/:
> https://lore.kernel.org/qemu-devel/CAFEAcA_5HvGriDsWnb1ALuA_dgG320eKv7yuM2kThv=rfOSZQA@mail.gmail.com/
> But parts of that clearly need more discussion. So this is just doing
> some parts that I hope are not controversial.
>
> Annoyingly, meson doesn't seem to provide any way for a subdirectory
> meson.build to say "the foo.c in this subdir builds into a foo
> executable that lives at the top level of the builddir". And we have a
> lot of test harness stuff plus user muscle memory that assumes that
> qemu-img and qemu-io live there. So the build runes for these tools
> have to stay in the top level meson.build (and tools/meson.build
> remains an empty file). The exception is that contrib/elf2dmp/elf2dmp
> is now tools/elf2dmp/elf2dmp, but I think the set of people who were
> running that from the build directory will be small.
>
It's a deliberate design more than an annoyance. It pushes users to make
things explicit at top level, which is good to understand what is built
and how, and hide details in subdirs in variables. QEMU's top level
meson.build is over complex, so it may appear more as a burden than a
benefit though.
> thanks
> -- PMM
>
>
> Peter Maydell (9):
> ebpf: move ebpf skeleton source to ebpf/ directory
> tools: Move qemu-bridge-helper sources to tools/ directory
> tools: Move qemu-edid sources to tools/ directory
> tools: Move qemu-img sources to tools/ directory
> tools: Move qemu-io sources to tools/ directory
> tools: Move qemu-nbd sources to tools/ directory
> tools: Move qemu-keymap sources to tools/ directory
> tools: Move qemu-vmsr-helper up a directory level
> tools: Move elf2dmp from contrib/ to tools/
>
> MAINTAINERS | 15 +++++++-------
> docs/tools/qemu-img.rst | 2 +-
> {tools/ebpf => ebpf/bpf-src}/Makefile.ebpf | 2 +-
> {tools/ebpf => ebpf/bpf-src}/rss.bpf.c | 0
> meson.build | 20 +++++++++----------
> {contrib => tools}/elf2dmp/addrspace.c | 0
> {contrib => tools}/elf2dmp/addrspace.h | 0
> {contrib => tools}/elf2dmp/download.c | 0
> {contrib => tools}/elf2dmp/download.h | 0
> {contrib => tools}/elf2dmp/err.h | 0
> {contrib => tools}/elf2dmp/kdbg.h | 0
> {contrib => tools}/elf2dmp/main.c | 0
> {contrib => tools}/elf2dmp/meson.build | 0
> {contrib => tools}/elf2dmp/pdb.c | 0
> {contrib => tools}/elf2dmp/pdb.h | 0
> {contrib => tools}/elf2dmp/pe.h | 0
> {contrib => tools}/elf2dmp/qemu_elf.c | 0
> {contrib => tools}/elf2dmp/qemu_elf.h | 0
> .../qemu-bridge-helper.c | 0
> qemu-edid.c => tools/qemu-edid.c | 0
> qemu-img-cmds.hx => tools/qemu-img-cmds.hx | 0
> qemu-img.c => tools/qemu-img.c | 0
> qemu-io-cmds.c => tools/qemu-io-cmds.c | 0
> qemu-io.c => tools/qemu-io.c | 0
> qemu-keymap.c => tools/qemu-keymap.c | 0
> qemu-nbd.c => tools/qemu-nbd.c | 0
> tools/{i386 => }/qemu-vmsr-helper.c | 0
> tools/{i386 => }/rapl-msr-index.h | 0
> 28 files changed, 20 insertions(+), 19 deletions(-)
> rename {tools/ebpf => ebpf/bpf-src}/Makefile.ebpf (96%)
> rename {tools/ebpf => ebpf/bpf-src}/rss.bpf.c (100%)
> rename {contrib => tools}/elf2dmp/addrspace.c (100%)
> rename {contrib => tools}/elf2dmp/addrspace.h (100%)
> rename {contrib => tools}/elf2dmp/download.c (100%)
> rename {contrib => tools}/elf2dmp/download.h (100%)
> rename {contrib => tools}/elf2dmp/err.h (100%)
> rename {contrib => tools}/elf2dmp/kdbg.h (100%)
> rename {contrib => tools}/elf2dmp/main.c (100%)
> rename {contrib => tools}/elf2dmp/meson.build (100%)
> rename {contrib => tools}/elf2dmp/pdb.c (100%)
> rename {contrib => tools}/elf2dmp/pdb.h (100%)
> rename {contrib => tools}/elf2dmp/pe.h (100%)
> rename {contrib => tools}/elf2dmp/qemu_elf.c (100%)
> rename {contrib => tools}/elf2dmp/qemu_elf.h (100%)
> rename qemu-bridge-helper.c => tools/qemu-bridge-helper.c (100%)
> rename qemu-edid.c => tools/qemu-edid.c (100%)
> rename qemu-img-cmds.hx => tools/qemu-img-cmds.hx (100%)
> rename qemu-img.c => tools/qemu-img.c (100%)
> rename qemu-io-cmds.c => tools/qemu-io-cmds.c (100%)
> rename qemu-io.c => tools/qemu-io.c (100%)
> rename qemu-keymap.c => tools/qemu-keymap.c (100%)
> rename qemu-nbd.c => tools/qemu-nbd.c (100%)
> rename tools/{i386 => }/qemu-vmsr-helper.c (100%)
> rename tools/{i386 => }/rapl-msr-index.h (100%)
>
For series:
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 0/9] tools: Move more tools sources into tools/
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
` (9 preceding siblings ...)
2026-05-08 16:00 ` [PATCH 0/9] tools: Move more tools sources into tools/ Pierrick Bouvier
@ 2026-05-08 16:02 ` Pierrick Bouvier
2026-05-11 9:05 ` Kevin Wolf
11 siblings, 0 replies; 23+ messages in thread
From: Pierrick Bouvier @ 2026-05-08 16:02 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Paolo Bonzini, Daniel P. Berrangé,
Philippe Mathieu-Daudé, Viktor Prutyanov, Akihiko Odaki,
Gerd Hoffmann, Eric Blake, Vladimir Sementsov-Ogievskiy,
Jason Wang
On 5/8/2026 8:24 AM, Peter Maydell wrote:
> We have a set of binaries that we call "tools": they're built based on
> the --enable-tools/--disable-tools configure setting, they're
> documented in docs/tools, and they're standalone executables of one
> form or another.
>
> Currently the sources for these are a bit scattered: many still in the
> top level source directory, some in contrib, one or two actually in
> the tools directory.
>
> As an initial attempt at cleanup, this patchset moves the sources for
> qemu-bridge-helper, qemu-edid, qemu-img, qemu-io, qemu-nbd,
> qemu-keymap, qemu-vmsr-helper and elf2dmp into the tools/ directory.
>
> The patchseries also moves the ebfp skeleton sources from tools/ebpf/
> to ebpf/bpf-src/, because this isn't a tool by the above definition.
>
> As per my thread from a while back, I would ultimately like us to
> clean up contrib/:
> https://lore.kernel.org/qemu-devel/CAFEAcA_5HvGriDsWnb1ALuA_dgG320eKv7yuM2kThv=rfOSZQA@mail.gmail.com/
> But parts of that clearly need more discussion. So this is just doing
> some parts that I hope are not controversial.
>
> Annoyingly, meson doesn't seem to provide any way for a subdirectory
> meson.build to say "the foo.c in this subdir builds into a foo
> executable that lives at the top level of the builddir". And we have a
> lot of test harness stuff plus user muscle memory that assumes that
> qemu-img and qemu-io live there. So the build runes for these tools
> have to stay in the top level meson.build (and tools/meson.build
> remains an empty file). The exception is that contrib/elf2dmp/elf2dmp
> is now tools/elf2dmp/elf2dmp, but I think the set of people who were
> running that from the build directory will be small.
>
> thanks
> -- PMM
>
>
> Peter Maydell (9):
> ebpf: move ebpf skeleton source to ebpf/ directory
> tools: Move qemu-bridge-helper sources to tools/ directory
> tools: Move qemu-edid sources to tools/ directory
> tools: Move qemu-img sources to tools/ directory
> tools: Move qemu-io sources to tools/ directory
> tools: Move qemu-nbd sources to tools/ directory
> tools: Move qemu-keymap sources to tools/ directory
> tools: Move qemu-vmsr-helper up a directory level
> tools: Move elf2dmp from contrib/ to tools/
>
> MAINTAINERS | 15 +++++++-------
> docs/tools/qemu-img.rst | 2 +-
> {tools/ebpf => ebpf/bpf-src}/Makefile.ebpf | 2 +-
> {tools/ebpf => ebpf/bpf-src}/rss.bpf.c | 0
> meson.build | 20 +++++++++----------
> {contrib => tools}/elf2dmp/addrspace.c | 0
> {contrib => tools}/elf2dmp/addrspace.h | 0
> {contrib => tools}/elf2dmp/download.c | 0
> {contrib => tools}/elf2dmp/download.h | 0
> {contrib => tools}/elf2dmp/err.h | 0
> {contrib => tools}/elf2dmp/kdbg.h | 0
> {contrib => tools}/elf2dmp/main.c | 0
> {contrib => tools}/elf2dmp/meson.build | 0
> {contrib => tools}/elf2dmp/pdb.c | 0
> {contrib => tools}/elf2dmp/pdb.h | 0
> {contrib => tools}/elf2dmp/pe.h | 0
> {contrib => tools}/elf2dmp/qemu_elf.c | 0
> {contrib => tools}/elf2dmp/qemu_elf.h | 0
> .../qemu-bridge-helper.c | 0
> qemu-edid.c => tools/qemu-edid.c | 0
> qemu-img-cmds.hx => tools/qemu-img-cmds.hx | 0
> qemu-img.c => tools/qemu-img.c | 0
> qemu-io-cmds.c => tools/qemu-io-cmds.c | 0
> qemu-io.c => tools/qemu-io.c | 0
> qemu-keymap.c => tools/qemu-keymap.c | 0
> qemu-nbd.c => tools/qemu-nbd.c | 0
> tools/{i386 => }/qemu-vmsr-helper.c | 0
> tools/{i386 => }/rapl-msr-index.h | 0
> 28 files changed, 20 insertions(+), 19 deletions(-)
> rename {tools/ebpf => ebpf/bpf-src}/Makefile.ebpf (96%)
> rename {tools/ebpf => ebpf/bpf-src}/rss.bpf.c (100%)
> rename {contrib => tools}/elf2dmp/addrspace.c (100%)
> rename {contrib => tools}/elf2dmp/addrspace.h (100%)
> rename {contrib => tools}/elf2dmp/download.c (100%)
> rename {contrib => tools}/elf2dmp/download.h (100%)
> rename {contrib => tools}/elf2dmp/err.h (100%)
> rename {contrib => tools}/elf2dmp/kdbg.h (100%)
> rename {contrib => tools}/elf2dmp/main.c (100%)
> rename {contrib => tools}/elf2dmp/meson.build (100%)
> rename {contrib => tools}/elf2dmp/pdb.c (100%)
> rename {contrib => tools}/elf2dmp/pdb.h (100%)
> rename {contrib => tools}/elf2dmp/pe.h (100%)
> rename {contrib => tools}/elf2dmp/qemu_elf.c (100%)
> rename {contrib => tools}/elf2dmp/qemu_elf.h (100%)
> rename qemu-bridge-helper.c => tools/qemu-bridge-helper.c (100%)
> rename qemu-edid.c => tools/qemu-edid.c (100%)
> rename qemu-img-cmds.hx => tools/qemu-img-cmds.hx (100%)
> rename qemu-img.c => tools/qemu-img.c (100%)
> rename qemu-io-cmds.c => tools/qemu-io-cmds.c (100%)
> rename qemu-io.c => tools/qemu-io.c (100%)
> rename qemu-keymap.c => tools/qemu-keymap.c (100%)
> rename qemu-nbd.c => tools/qemu-nbd.c (100%)
> rename tools/{i386 => }/qemu-vmsr-helper.c (100%)
> rename tools/{i386 => }/rapl-msr-index.h (100%)
>
As well, feel free to send a patches for contrib/plugins, moving them to
plugins/plugins as you offered first.
We didn't find a better alternative, and it does not really matters to
be honest. You have my reviewed-by.
Regards,
Pierrick
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/9] ebpf: move ebpf skeleton source to ebpf/ directory
2026-05-08 15:24 ` [PATCH 1/9] ebpf: move ebpf skeleton source to ebpf/ directory Peter Maydell
@ 2026-05-08 16:07 ` Daniel P. Berrangé
2026-05-27 6:35 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 23+ messages in thread
From: Daniel P. Berrangé @ 2026-05-08 16:07 UTC (permalink / raw)
To: Peter Maydell
Cc: qemu-devel, Kevin Wolf, Hanna Reitz, Pierrick Bouvier,
Paolo Bonzini, Philippe Mathieu-Daudé, Viktor Prutyanov,
Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
On Fri, May 08, 2026 at 04:24:20PM +0100, Peter Maydell wrote:
> Currently the code and makefile to regenerate rss.bpf.skeleton.h
> are in tools/ebpf/. This isn't really a good fit, because the tools/
> directory ought to be standalone tools of the kind that we build
> with configured with --enable-tools and document in docs/tools.
>
> Move it to ebpf/bpf-src with the rest of the ebpf code.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> {tools/ebpf => ebpf/bpf-src}/Makefile.ebpf | 2 +-
> {tools/ebpf => ebpf/bpf-src}/rss.bpf.c | 0
> 2 files changed, 1 insertion(+), 1 deletion(-)
> rename {tools/ebpf => ebpf/bpf-src}/Makefile.ebpf (96%)
> rename {tools/ebpf => ebpf/bpf-src}/rss.bpf.c (100%)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 0/9] tools: Move more tools sources into tools/
2026-05-08 16:00 ` [PATCH 0/9] tools: Move more tools sources into tools/ Pierrick Bouvier
@ 2026-05-08 16:22 ` Peter Maydell
2026-05-10 20:23 ` Marc-André Lureau
0 siblings, 1 reply; 23+ messages in thread
From: Peter Maydell @ 2026-05-08 16:22 UTC (permalink / raw)
To: Pierrick Bouvier
Cc: qemu-devel, Kevin Wolf, Hanna Reitz, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
On Fri, 8 May 2026 at 17:00, Pierrick Bouvier
<pierrick.bouvier@oss.qualcomm.com> wrote:
>
> On 5/8/2026 8:24 AM, Peter Maydell wrote:
> > We have a set of binaries that we call "tools": they're built based on
> > the --enable-tools/--disable-tools configure setting, they're
> > documented in docs/tools, and they're standalone executables of one
> > form or another.
> >
> > Currently the sources for these are a bit scattered: many still in the
> > top level source directory, some in contrib, one or two actually in
> > the tools directory.
> >
> > As an initial attempt at cleanup, this patchset moves the sources for
> > qemu-bridge-helper, qemu-edid, qemu-img, qemu-io, qemu-nbd,
> > qemu-keymap, qemu-vmsr-helper and elf2dmp into the tools/ directory.
> >
> > The patchseries also moves the ebfp skeleton sources from tools/ebpf/
> > to ebpf/bpf-src/, because this isn't a tool by the above definition.
> >
> > As per my thread from a while back, I would ultimately like us to
> > clean up contrib/:
> > https://lore.kernel.org/qemu-devel/CAFEAcA_5HvGriDsWnb1ALuA_dgG320eKv7yuM2kThv=rfOSZQA@mail.gmail.com/
> > But parts of that clearly need more discussion. So this is just doing
> > some parts that I hope are not controversial.
> >
> > Annoyingly, meson doesn't seem to provide any way for a subdirectory
> > meson.build to say "the foo.c in this subdir builds into a foo
> > executable that lives at the top level of the builddir". And we have a
> > lot of test harness stuff plus user muscle memory that assumes that
> > qemu-img and qemu-io live there. So the build runes for these tools
> > have to stay in the top level meson.build (and tools/meson.build
> > remains an empty file). The exception is that contrib/elf2dmp/elf2dmp
> > is now tools/elf2dmp/elf2dmp, but I think the set of people who were
> > running that from the build directory will be small.
> >
>
> It's a deliberate design more than an annoyance. It pushes users to make
> things explicit at top level, which is good to understand what is built
> and how, and hide details in subdirs in variables. QEMU's top level
> meson.build is over complex, so it may appear more as a burden than a
> benefit though.
Personally I think if the build system doesn't let you do a
pretty normal and reasonable thing that's annoying. Meson
annoys me because it has a tendency to be over-opinionated.
-- PMM
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 0/9] tools: Move more tools sources into tools/
2026-05-08 16:22 ` Peter Maydell
@ 2026-05-10 20:23 ` Marc-André Lureau
2026-05-11 8:37 ` Daniel P. Berrangé
0 siblings, 1 reply; 23+ messages in thread
From: Marc-André Lureau @ 2026-05-10 20:23 UTC (permalink / raw)
To: Peter Maydell
Cc: Pierrick Bouvier, qemu-devel, Kevin Wolf, Hanna Reitz,
Paolo Bonzini, Daniel P. Berrangé,
Philippe Mathieu-Daudé, Viktor Prutyanov, Akihiko Odaki,
Gerd Hoffmann, Eric Blake, Vladimir Sementsov-Ogievskiy,
Jason Wang
Hi
On Fri, May 8, 2026 at 8:23 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Fri, 8 May 2026 at 17:00, Pierrick Bouvier
> <pierrick.bouvier@oss.qualcomm.com> wrote:
> >
> > On 5/8/2026 8:24 AM, Peter Maydell wrote:
> > > We have a set of binaries that we call "tools": they're built based on
> > > the --enable-tools/--disable-tools configure setting, they're
> > > documented in docs/tools, and they're standalone executables of one
> > > form or another.
> > >
> > > Currently the sources for these are a bit scattered: many still in the
> > > top level source directory, some in contrib, one or two actually in
> > > the tools directory.
> > >
> > > As an initial attempt at cleanup, this patchset moves the sources for
> > > qemu-bridge-helper, qemu-edid, qemu-img, qemu-io, qemu-nbd,
> > > qemu-keymap, qemu-vmsr-helper and elf2dmp into the tools/ directory.
> > >
> > > The patchseries also moves the ebfp skeleton sources from tools/ebpf/
> > > to ebpf/bpf-src/, because this isn't a tool by the above definition.
> > >
> > > As per my thread from a while back, I would ultimately like us to
> > > clean up contrib/:
> > > https://lore.kernel.org/qemu-devel/CAFEAcA_5HvGriDsWnb1ALuA_dgG320eKv7yuM2kThv=rfOSZQA@mail.gmail.com/
> > > But parts of that clearly need more discussion. So this is just doing
> > > some parts that I hope are not controversial.
> > >
> > > Annoyingly, meson doesn't seem to provide any way for a subdirectory
> > > meson.build to say "the foo.c in this subdir builds into a foo
> > > executable that lives at the top level of the builddir". And we have a
> > > lot of test harness stuff plus user muscle memory that assumes that
> > > qemu-img and qemu-io live there. So the build runes for these tools
> > > have to stay in the top level meson.build (and tools/meson.build
> > > remains an empty file). The exception is that contrib/elf2dmp/elf2dmp
> > > is now tools/elf2dmp/elf2dmp, but I think the set of people who were
> > > running that from the build directory will be small.
> > >
> >
> > It's a deliberate design more than an annoyance. It pushes users to make
> > things explicit at top level, which is good to understand what is built
> > and how, and hide details in subdirs in variables. QEMU's top level
> > meson.build is over complex, so it may appear more as a burden than a
> > benefit though.
>
> Personally I think if the build system doesn't let you do a
> pretty normal and reasonable thing that's annoying. Meson
> annoys me because it has a tendency to be over-opinionated.
>
I have to agree that meson is sometimes lacking. In this case, it
would be convenient to have a link created at build time. But you have
to resort to fairly annoying custom_target python code today. In the
meantime, there is also fs.copyfile() that could work (although it's
also somewhat limited or buggy). For later, we could try adding
fs.symlink() perhaps. Paolo might have better chances than me getting
it accepted ;)
--
Marc-André Lureau
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 0/9] tools: Move more tools sources into tools/
2026-05-10 20:23 ` Marc-André Lureau
@ 2026-05-11 8:37 ` Daniel P. Berrangé
2026-05-11 9:27 ` Peter Maydell
0 siblings, 1 reply; 23+ messages in thread
From: Daniel P. Berrangé @ 2026-05-11 8:37 UTC (permalink / raw)
To: Marc-André Lureau
Cc: Peter Maydell, Pierrick Bouvier, qemu-devel, Kevin Wolf,
Hanna Reitz, Paolo Bonzini, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
On Mon, May 11, 2026 at 12:23:32AM +0400, Marc-André Lureau wrote:
> Hi
>
> On Fri, May 8, 2026 at 8:23 PM Peter Maydell <peter.maydell@linaro.org> wrote:
> >
> > On Fri, 8 May 2026 at 17:00, Pierrick Bouvier
> > <pierrick.bouvier@oss.qualcomm.com> wrote:
> > >
> > > On 5/8/2026 8:24 AM, Peter Maydell wrote:
> > > > We have a set of binaries that we call "tools": they're built based on
> > > > the --enable-tools/--disable-tools configure setting, they're
> > > > documented in docs/tools, and they're standalone executables of one
> > > > form or another.
> > > >
> > > > Currently the sources for these are a bit scattered: many still in the
> > > > top level source directory, some in contrib, one or two actually in
> > > > the tools directory.
> > > >
> > > > As an initial attempt at cleanup, this patchset moves the sources for
> > > > qemu-bridge-helper, qemu-edid, qemu-img, qemu-io, qemu-nbd,
> > > > qemu-keymap, qemu-vmsr-helper and elf2dmp into the tools/ directory.
> > > >
> > > > The patchseries also moves the ebfp skeleton sources from tools/ebpf/
> > > > to ebpf/bpf-src/, because this isn't a tool by the above definition.
> > > >
> > > > As per my thread from a while back, I would ultimately like us to
> > > > clean up contrib/:
> > > > https://lore.kernel.org/qemu-devel/CAFEAcA_5HvGriDsWnb1ALuA_dgG320eKv7yuM2kThv=rfOSZQA@mail.gmail.com/
> > > > But parts of that clearly need more discussion. So this is just doing
> > > > some parts that I hope are not controversial.
> > > >
> > > > Annoyingly, meson doesn't seem to provide any way for a subdirectory
> > > > meson.build to say "the foo.c in this subdir builds into a foo
> > > > executable that lives at the top level of the builddir". And we have a
> > > > lot of test harness stuff plus user muscle memory that assumes that
> > > > qemu-img and qemu-io live there. So the build runes for these tools
> > > > have to stay in the top level meson.build (and tools/meson.build
> > > > remains an empty file). The exception is that contrib/elf2dmp/elf2dmp
> > > > is now tools/elf2dmp/elf2dmp, but I think the set of people who were
> > > > running that from the build directory will be small.
> > > >
> > >
> > > It's a deliberate design more than an annoyance. It pushes users to make
> > > things explicit at top level, which is good to understand what is built
> > > and how, and hide details in subdirs in variables. QEMU's top level
> > > meson.build is over complex, so it may appear more as a burden than a
> > > benefit though.
> >
> > Personally I think if the build system doesn't let you do a
> > pretty normal and reasonable thing that's annoying. Meson
> > annoys me because it has a tendency to be over-opinionated.
Being opinionated is a double edge sword. A big part of the mess you
get with traditional build tools is that they are not opinionated so
every project ends up doing something slightly different and thus it
is harder to understand each project. Being opinionated is what keeps
meson simpler to understand and learn, at the cost of loss of flexiblity.
Meson may not have the balance entirely right, but overall I think it
has been beneficial to be very opinionated, even if that means some
places needs to be relaxed over time.
> I have to agree that meson is sometimes lacking. In this case, it
> would be convenient to have a link created at build time. But you have
> to resort to fairly annoying custom_target python code today. In the
> meantime, there is also fs.copyfile() that could work (although it's
> also somewhat limited or buggy). For later, we could try adding
> fs.symlink() perhaps. Paolo might have better chances than me getting
> it accepted ;)
IIUC, the main reason to want binaries in a specific location is
so that tests find them in that location. That is a valid historical
approach, but meson offer an alternative approach that could be used
instead.
We can set the test environment so that meson modifies $PATH such that
all the built binaries appear at head of $PATH. Tests then don't need
to assume a location for them in the build directory, just let execvp
search $PATH as normal. For execution outside of 'meson test', we have
"meson devenv" which sets up a local interactive shell environment, or
we can launch the test via the "run" script which wraps "meson devenv"
for a single command.
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 0/9] tools: Move more tools sources into tools/
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
` (10 preceding siblings ...)
2026-05-08 16:02 ` Pierrick Bouvier
@ 2026-05-11 9:05 ` Kevin Wolf
2026-05-11 9:21 ` Peter Maydell
11 siblings, 1 reply; 23+ messages in thread
From: Kevin Wolf @ 2026-05-11 9:05 UTC (permalink / raw)
To: Peter Maydell
Cc: qemu-devel, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
Am 08.05.2026 um 17:24 hat Peter Maydell geschrieben:
> We have a set of binaries that we call "tools": they're built based on
> the --enable-tools/--disable-tools configure setting, they're
> documented in docs/tools, and they're standalone executables of one
> form or another.
>
> Currently the sources for these are a bit scattered: many still in the
> top level source directory, some in contrib, one or two actually in
> the tools directory.
>
> As an initial attempt at cleanup, this patchset moves the sources for
> qemu-bridge-helper, qemu-edid, qemu-img, qemu-io, qemu-nbd,
> qemu-keymap, qemu-vmsr-helper and elf2dmp into the tools/ directory.
>
> The patchseries also moves the ebfp skeleton sources from tools/ebpf/
> to ebpf/bpf-src/, because this isn't a tool by the above definition.
>
> As per my thread from a while back, I would ultimately like us to
> clean up contrib/:
> https://lore.kernel.org/qemu-devel/CAFEAcA_5HvGriDsWnb1ALuA_dgG320eKv7yuM2kThv=rfOSZQA@mail.gmail.com/
> But parts of that clearly need more discussion. So this is just doing
> some parts that I hope are not controversial.
>
> Annoyingly, meson doesn't seem to provide any way for a subdirectory
> meson.build to say "the foo.c in this subdir builds into a foo
> executable that lives at the top level of the builddir". And we have a
> lot of test harness stuff plus user muscle memory that assumes that
> qemu-img and qemu-io live there. So the build runes for these tools
> have to stay in the top level meson.build (and tools/meson.build
> remains an empty file). The exception is that contrib/elf2dmp/elf2dmp
> is now tools/elf2dmp/elf2dmp, but I think the set of people who were
> running that from the build directory will be small.
Should qemu-storage-daemon be moved as well? I never particularly liked
the storage-daemon/ directory that Paolo created in 7c58bb76 and that
singled qemu-storage-daemon out among the tools. If the binary could
move whereever all the other tools live, too, that would be even better.
Kevin
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 0/9] tools: Move more tools sources into tools/
2026-05-11 9:05 ` Kevin Wolf
@ 2026-05-11 9:21 ` Peter Maydell
0 siblings, 0 replies; 23+ messages in thread
From: Peter Maydell @ 2026-05-11 9:21 UTC (permalink / raw)
To: Kevin Wolf
Cc: qemu-devel, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
On Mon, 11 May 2026 at 10:05, Kevin Wolf <kwolf@redhat.com> wrote:
>
> Am 08.05.2026 um 17:24 hat Peter Maydell geschrieben:
> > We have a set of binaries that we call "tools": they're built based on
> > the --enable-tools/--disable-tools configure setting, they're
> > documented in docs/tools, and they're standalone executables of one
> > form or another.
> >
> > Currently the sources for these are a bit scattered: many still in the
> > top level source directory, some in contrib, one or two actually in
> > the tools directory.
> >
> > As an initial attempt at cleanup, this patchset moves the sources for
> > qemu-bridge-helper, qemu-edid, qemu-img, qemu-io, qemu-nbd,
> > qemu-keymap, qemu-vmsr-helper and elf2dmp into the tools/ directory.
> >
> > The patchseries also moves the ebfp skeleton sources from tools/ebpf/
> > to ebpf/bpf-src/, because this isn't a tool by the above definition.
> >
> > As per my thread from a while back, I would ultimately like us to
> > clean up contrib/:
> > https://lore.kernel.org/qemu-devel/CAFEAcA_5HvGriDsWnb1ALuA_dgG320eKv7yuM2kThv=rfOSZQA@mail.gmail.com/
> > But parts of that clearly need more discussion. So this is just doing
> > some parts that I hope are not controversial.
> >
> > Annoyingly, meson doesn't seem to provide any way for a subdirectory
> > meson.build to say "the foo.c in this subdir builds into a foo
> > executable that lives at the top level of the builddir". And we have a
> > lot of test harness stuff plus user muscle memory that assumes that
> > qemu-img and qemu-io live there. So the build runes for these tools
> > have to stay in the top level meson.build (and tools/meson.build
> > remains an empty file). The exception is that contrib/elf2dmp/elf2dmp
> > is now tools/elf2dmp/elf2dmp, but I think the set of people who were
> > running that from the build directory will be small.
>
> Should qemu-storage-daemon be moved as well? I never particularly liked
> the storage-daemon/ directory that Paolo created in 7c58bb76 and that
> singled qemu-storage-daemon out among the tools. If the binary could
> move whereever all the other tools live, too, that would be even better.
Yes, moving qemu-storage-daemon would probably also be a good idea.
This patchset is just starting with some of the easy stuff where
I was pretty sure the move was correct.
-- PMM
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 0/9] tools: Move more tools sources into tools/
2026-05-11 8:37 ` Daniel P. Berrangé
@ 2026-05-11 9:27 ` Peter Maydell
2026-05-11 16:56 ` Pierrick Bouvier
0 siblings, 1 reply; 23+ messages in thread
From: Peter Maydell @ 2026-05-11 9:27 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: Marc-André Lureau, Pierrick Bouvier, qemu-devel, Kevin Wolf,
Hanna Reitz, Paolo Bonzini, Philippe Mathieu-Daudé,
Viktor Prutyanov, Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
On Mon, 11 May 2026 at 09:37, Daniel P. Berrangé <berrange@redhat.com> wrote:
> IIUC, the main reason to want binaries in a specific location is
> so that tests find them in that location. That is a valid historical
> approach, but meson offer an alternative approach that could be used
> instead.
It's not the only reason, though. The other half is humans.
People do run QEMU and the tools out of the build directory quite
frequently, and so the location of the binaries in the build tree
shouldn't have to depend on where we put the tool sources in the
source tree or where we want to put the meson runes in the
meson.build files. Just as we prefer to have qemu-system-foo
in the top level of the build tree, I think it's also preferable
to put the qemu-bar tools binaries there. It's more consistent,
and they're easier to find.
> We can set the test environment so that meson modifies $PATH such that
> all the built binaries appear at head of $PATH. Tests then don't need
> to assume a location for them in the build directory, just let execvp
> search $PATH as normal. For execution outside of 'meson test', we have
> "meson devenv" which sets up a local interactive shell environment, or
> we can launch the test via the "run" script which wraps "meson devenv"
> for a single command.
I definitely don't want to have to run a separate command to
set up an environment: this is painful whenever I have to
interact with python venvs, and it's not something I think
we want or need here.
I think the least-worst option is that we say "all the
meson runes for building executables must live in the
top level meson.build even if the sources and most of
the meson runes for the source/object files are in a
subdirectory".
thanks
-- PMM
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 0/9] tools: Move more tools sources into tools/
2026-05-11 9:27 ` Peter Maydell
@ 2026-05-11 16:56 ` Pierrick Bouvier
0 siblings, 0 replies; 23+ messages in thread
From: Pierrick Bouvier @ 2026-05-11 16:56 UTC (permalink / raw)
To: Peter Maydell, Daniel P. Berrangé
Cc: Marc-André Lureau, qemu-devel, Kevin Wolf, Hanna Reitz,
Paolo Bonzini, Philippe Mathieu-Daudé, Viktor Prutyanov,
Akihiko Odaki, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
On 5/11/2026 2:27 AM, Peter Maydell wrote:
> On Mon, 11 May 2026 at 09:37, Daniel P. Berrangé <berrange@redhat.com> wrote:
>> IIUC, the main reason to want binaries in a specific location is
>> so that tests find them in that location. That is a valid historical
>> approach, but meson offer an alternative approach that could be used
>> instead.
>
> It's not the only reason, though. The other half is humans.
> People do run QEMU and the tools out of the build directory quite
> frequently, and so the location of the binaries in the build tree
> shouldn't have to depend on where we put the tool sources in the
> source tree or where we want to put the meson runes in the
> meson.build files. Just as we prefer to have qemu-system-foo
> in the top level of the build tree, I think it's also preferable
> to put the qemu-bar tools binaries there. It's more consistent,
> and they're easier to find.
>
>> We can set the test environment so that meson modifies $PATH such that
>> all the built binaries appear at head of $PATH. Tests then don't need
>> to assume a location for them in the build directory, just let execvp
>> search $PATH as normal. For execution outside of 'meson test', we have
>> "meson devenv" which sets up a local interactive shell environment, or
>> we can launch the test via the "run" script which wraps "meson devenv"
>> for a single command.
>
> I definitely don't want to have to run a separate command to
> set up an environment: this is painful whenever I have to
> interact with python venvs, and it's not something I think
> we want or need here.
>
I agree, this kind of "source my_env" are really not convenient to work
with. Better to have things in the correct place instead.
> I think the least-worst option is that we say "all the
> meson runes for building executables must live in the
> top level meson.build even if the sources and most of
> the meson runes for the source/object files are in a
> subdirectory".
>
Which is the way meson devs expect you to write it. For people looking
for the definition of those executable, they can expect, without any
surprise, that definition will be in top level meson.build.
From there, it's easy to see which sources var it uses and where it's
declared.
> thanks
> -- PMM
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 8/9] tools: Move qemu-vmsr-helper up a directory level
2026-05-08 15:24 ` [PATCH 8/9] tools: Move qemu-vmsr-helper up a directory level Peter Maydell
@ 2026-05-12 6:53 ` Akihiko Odaki
2026-05-12 8:45 ` Peter Maydell
0 siblings, 1 reply; 23+ messages in thread
From: Akihiko Odaki @ 2026-05-12 6:53 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Philippe Mathieu-Daudé,
Viktor Prutyanov, Gerd Hoffmann, Eric Blake,
Vladimir Sementsov-Ogievskiy, Jason Wang
On 2026/05/09 0:24, Peter Maydell wrote:
> We currently have exactly one subdirectory of tools, i386, which has
> the qemu-vmsr-helper sources in it. An entire subdirectory isn't
> really necessary here as we have only one i386-specific tool binary
> and no expectation that we will have many more. Move it up a
> directory level so it's in tools/ with all the other tools sources.
>
> This was previously covered by the "X86 general architecture support"
> section of MAINTAINERS under the tools/i386/ path; add both the
> source file and the docs file to that section.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> MAINTAINERS | 3 ++-
> meson.build | 2 +-
> tools/{i386 => }/qemu-vmsr-helper.c | 0
> tools/{i386 => }/rapl-msr-index.h | 0
> 4 files changed, 3 insertions(+), 2 deletions(-)
> rename tools/{i386 => }/qemu-vmsr-helper.c (100%)
> rename tools/{i386 => }/rapl-msr-index.h (100%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f2c66d7cc3..88cc1516d8 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -153,7 +153,8 @@ F: stubs/hmp-cmds-target-i386.c
> F: target/i386/*.[ch]
> F: target/i386/Kconfig
> F: target/i386/meson.build
> -F: tools/i386/
> +F: tools/qemu-vmsr-helper.c
> +F: docs/tools/qemu-vmsr-helper.rst
> F: tests/functional/i386/
> F: tests/functional/x86_64/
>
> diff --git a/meson.build b/meson.build
> index 8164458eea..1dad3a2462 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -4569,7 +4569,7 @@ if have_tools
> install: true)
>
> if cpu == 'x86_64'
> - executable('qemu-vmsr-helper', files('tools/i386/qemu-vmsr-helper.c'),
> + executable('qemu-vmsr-helper', files('tools/qemu-vmsr-helper.c'),
> dependencies: [authz, crypto, io, qom, qemuutil,
> libcap_ng, mpathpersist],
> install: true)
> diff --git a/tools/i386/qemu-vmsr-helper.c b/tools/qemu-vmsr-helper.c
> similarity index 100%
> rename from tools/i386/qemu-vmsr-helper.c
> rename to tools/qemu-vmsr-helper.c
> diff --git a/tools/i386/rapl-msr-index.h b/tools/rapl-msr-index.h
> similarity index 100%
> rename from tools/i386/rapl-msr-index.h
> rename to tools/rapl-msr-index.h
tools/rapl-msr-index.h lost maintainer coverage when F: tools/i386/ was
narrowed to only tools/qemu-vmsr-helper.c
Regards,
Akihiko Odaki
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 8/9] tools: Move qemu-vmsr-helper up a directory level
2026-05-12 6:53 ` Akihiko Odaki
@ 2026-05-12 8:45 ` Peter Maydell
0 siblings, 0 replies; 23+ messages in thread
From: Peter Maydell @ 2026-05-12 8:45 UTC (permalink / raw)
To: Akihiko Odaki
Cc: qemu-devel, Kevin Wolf, Hanna Reitz, Pierrick Bouvier,
Paolo Bonzini, Daniel P. Berrangé,
Philippe Mathieu-Daudé, Viktor Prutyanov, Gerd Hoffmann,
Eric Blake, Vladimir Sementsov-Ogievskiy, Jason Wang
On Tue, 12 May 2026 at 07:54, Akihiko Odaki
<odaki@rsg.ci.i.u-tokyo.ac.jp> wrote:
>
> On 2026/05/09 0:24, Peter Maydell wrote:
> > We currently have exactly one subdirectory of tools, i386, which has
> > the qemu-vmsr-helper sources in it. An entire subdirectory isn't
> > really necessary here as we have only one i386-specific tool binary
> > and no expectation that we will have many more. Move it up a
> > directory level so it's in tools/ with all the other tools sources.
> >
> > This was previously covered by the "X86 general architecture support"
> > section of MAINTAINERS under the tools/i386/ path; add both the
> > source file and the docs file to that section.
> >
> > Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> > ---
> > MAINTAINERS | 3 ++-
> > meson.build | 2 +-
> > tools/{i386 => }/qemu-vmsr-helper.c | 0
> > tools/{i386 => }/rapl-msr-index.h | 0
> > 4 files changed, 3 insertions(+), 2 deletions(-)
> > rename tools/{i386 => }/qemu-vmsr-helper.c (100%)
> > rename tools/{i386 => }/rapl-msr-index.h (100%)
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index f2c66d7cc3..88cc1516d8 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -153,7 +153,8 @@ F: stubs/hmp-cmds-target-i386.c
> > F: target/i386/*.[ch]
> > F: target/i386/Kconfig
> > F: target/i386/meson.build
> > -F: tools/i386/
> > +F: tools/qemu-vmsr-helper.c
> > +F: docs/tools/qemu-vmsr-helper.rst
> > F: tests/functional/i386/
> > F: tests/functional/x86_64/
> >
> > diff --git a/meson.build b/meson.build
> > index 8164458eea..1dad3a2462 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -4569,7 +4569,7 @@ if have_tools
> > install: true)
> >
> > if cpu == 'x86_64'
> > - executable('qemu-vmsr-helper', files('tools/i386/qemu-vmsr-helper.c'),
> > + executable('qemu-vmsr-helper', files('tools/qemu-vmsr-helper.c'),
> > dependencies: [authz, crypto, io, qom, qemuutil,
> > libcap_ng, mpathpersist],
> > install: true)
> > diff --git a/tools/i386/qemu-vmsr-helper.c b/tools/qemu-vmsr-helper.c
> > similarity index 100%
> > rename from tools/i386/qemu-vmsr-helper.c
> > rename to tools/qemu-vmsr-helper.c
> > diff --git a/tools/i386/rapl-msr-index.h b/tools/rapl-msr-index.h
> > similarity index 100%
> > rename from tools/i386/rapl-msr-index.h
> > rename to tools/rapl-msr-index.h
>
>
> tools/rapl-msr-index.h lost maintainer coverage when F: tools/i386/ was
> narrowed to only tools/qemu-vmsr-helper.c
Good catch; we should add
F: tools/rapl-msr-index.h
to the MAINTAINERS section.
thanks
-- PMM
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/9] ebpf: move ebpf skeleton source to ebpf/ directory
2026-05-08 15:24 ` [PATCH 1/9] ebpf: move ebpf skeleton source to ebpf/ directory Peter Maydell
2026-05-08 16:07 ` Daniel P. Berrangé
@ 2026-05-27 6:35 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 23+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-05-27 6:35 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Pierrick Bouvier, Paolo Bonzini,
Daniel P. Berrangé, Viktor Prutyanov, Akihiko Odaki,
Gerd Hoffmann, Eric Blake, Vladimir Sementsov-Ogievskiy,
Jason Wang
On 8/5/26 17:24, Peter Maydell wrote:
> Currently the code and makefile to regenerate rss.bpf.skeleton.h
> are in tools/ebpf/. This isn't really a good fit, because the tools/
> directory ought to be standalone tools of the kind that we build
> with configured with --enable-tools and document in docs/tools.
>
> Move it to ebpf/bpf-src with the rest of the ebpf code.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> {tools/ebpf => ebpf/bpf-src}/Makefile.ebpf | 2 +-
> {tools/ebpf => ebpf/bpf-src}/rss.bpf.c | 0
> 2 files changed, 1 insertion(+), 1 deletion(-)
> rename {tools/ebpf => ebpf/bpf-src}/Makefile.ebpf (96%)
> rename {tools/ebpf => ebpf/bpf-src}/rss.bpf.c (100%)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2026-05-27 6:35 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08 15:24 [PATCH 0/9] tools: Move more tools sources into tools/ Peter Maydell
2026-05-08 15:24 ` [PATCH 1/9] ebpf: move ebpf skeleton source to ebpf/ directory Peter Maydell
2026-05-08 16:07 ` Daniel P. Berrangé
2026-05-27 6:35 ` Philippe Mathieu-Daudé
2026-05-08 15:24 ` [PATCH 2/9] tools: Move qemu-bridge-helper sources to tools/ directory Peter Maydell
2026-05-08 15:24 ` [PATCH 3/9] tools: Move qemu-edid " Peter Maydell
2026-05-08 15:24 ` [PATCH 4/9] tools: Move qemu-img " Peter Maydell
2026-05-08 15:24 ` [PATCH 5/9] tools: Move qemu-io " Peter Maydell
2026-05-08 15:24 ` [PATCH 6/9] tools: Move qemu-nbd " Peter Maydell
2026-05-08 15:24 ` [PATCH 7/9] tools: Move qemu-keymap " Peter Maydell
2026-05-08 15:24 ` [PATCH 8/9] tools: Move qemu-vmsr-helper up a directory level Peter Maydell
2026-05-12 6:53 ` Akihiko Odaki
2026-05-12 8:45 ` Peter Maydell
2026-05-08 15:24 ` [PATCH 9/9] tools: Move elf2dmp from contrib/ to tools/ Peter Maydell
2026-05-08 16:00 ` [PATCH 0/9] tools: Move more tools sources into tools/ Pierrick Bouvier
2026-05-08 16:22 ` Peter Maydell
2026-05-10 20:23 ` Marc-André Lureau
2026-05-11 8:37 ` Daniel P. Berrangé
2026-05-11 9:27 ` Peter Maydell
2026-05-11 16:56 ` Pierrick Bouvier
2026-05-08 16:02 ` Pierrick Bouvier
2026-05-11 9:05 ` Kevin Wolf
2026-05-11 9:21 ` Peter Maydell
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.