qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] buildsys: Start shrinking qemu-user build process
@ 2024-04-08 15:53 Paolo Bonzini
  2024-04-08 15:53 ` [PATCH v2 01/18] meson: do not link pixman automatically into all targets Paolo Bonzini
                   ` (17 more replies)
  0 siblings, 18 replies; 38+ messages in thread
From: Paolo Bonzini @ 2024-04-08 15:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: philmd

Some files (especially from hw/core/, stubs/ and util/) are built for
user mode emulation unnecessarily; they are not needed by any code that
is part of qemu-user.

The bulk of the patch (commits 6-17) puts stubs/ on a diet both in
general (moving stubs out into specific subdirectories and away from
libqemuutil.a) and for specific builds, by documenting which parts
of QEMU need the various object files.

Tested by building

   --disable-system --disable-user --disable-tools --disable-guest-agent
   --disable-system --enable-user --disable-tools --disable-guest-agent
   --disable-system --disable-user --enable-tools --disable-guest-agent
   --disable-system --disable-user --disable-tools --enable-guest-agent

as well as regular CI.

Paolo

Paolo Bonzini (15):
  meson: do not link pixman automatically into all targets
  tests: only build plugins if TCG is enabled
  tests/unit: match some unit tests to corresponding feature switches
  yank: only build if needed
  hw/core: Move system emulation files to system_ss
  stubs: remove obsolete stubs
  hw/usb: move stubs out of stubs/
  hw/virtio: move stubs out of stubs/
  semihosting: move stubs out of stubs/
  ramfb: move stubs out of stubs/
  memory-device: move stubs out of stubs/
  colo: move stubs out of stubs/
  stubs: split record/replay stubs further
  stubs: include stubs only if needed
  stubs: move monitor_fdsets_cleanup with other fdset stubs

Philippe Mathieu-Daudé (3):
  ebpf: Restrict to system emulation
  util/qemu-config: Extract QMP commands to qemu-config-qmp.c
  hw: Include minimal source set in user emulation build

 meson.build                                   |   8 +-
 include/qemu/config-file.h                    |   3 +
 include/sysemu/sysemu.h                       |   2 -
 stubs/ramfb.c => hw/display/ramfb-stubs.c     |   0
 .../mem/memory-device-stubs.c                 |   0
 stubs/usb-dev-stub.c => hw/usb/bus-stub.c     |   5 -
 .../virtio/virtio-md-stubs.c                  |   0
 stubs/colo.c => migration/colo-stubs.c        |   0
 monitor/qemu-config-qmp.c                     | 206 ++++++++++++++++++
 stubs/colo-compare.c => net/colo-stubs.c      |   0
 .../semihost-all.c => semihosting/stubs-all.c |   0
 .../semihost.c => semihosting/stubs-system.c  |   0
 stubs/fdset.c                                 |   6 +
 {hw/core => stubs}/hotplug-stubs.c            |   0
 stubs/isa-bus.c                               |   7 -
 stubs/module-opts.c                           |   2 -
 stubs/monitor-core.c                          |   6 -
 stubs/{monitor.c => monitor-internal.c}       |   5 -
 stubs/pci-bus.c                               |   7 -
 stubs/qdev.c                                  |   6 -
 stubs/qtest.c                                 |  10 -
 stubs/replay-mode.c                           |   4 +
 stubs/replay.c                                |   2 -
 util/qemu-config.c                            | 204 +----------------
 ebpf/meson.build                              |   2 +-
 hw/core/meson.build                           |  14 +-
 hw/display/meson.build                        |   2 +-
 hw/mem/meson.build                            |   1 +
 hw/usb/meson.build                            |   2 +-
 hw/virtio/meson.build                         |   3 +-
 migration/meson.build                         |   2 +
 monitor/meson.build                           |   1 +
 net/meson.build                               |   2 +
 semihosting/meson.build                       |   3 +
 stubs/meson.build                             | 133 ++++++-----
 tests/meson.build                             |   2 +-
 tests/unit/meson.build                        |  12 +-
 util/meson.build                              |   2 +-
 38 files changed, 328 insertions(+), 336 deletions(-)
 rename stubs/ramfb.c => hw/display/ramfb-stubs.c (100%)
 rename stubs/memory_device.c => hw/mem/memory-device-stubs.c (100%)
 rename stubs/usb-dev-stub.c => hw/usb/bus-stub.c (83%)
 rename stubs/virtio-md-pci.c => hw/virtio/virtio-md-stubs.c (100%)
 rename stubs/colo.c => migration/colo-stubs.c (100%)
 create mode 100644 monitor/qemu-config-qmp.c
 rename stubs/colo-compare.c => net/colo-stubs.c (100%)
 rename stubs/semihost-all.c => semihosting/stubs-all.c (100%)
 rename stubs/semihost.c => semihosting/stubs-system.c (100%)
 rename {hw/core => stubs}/hotplug-stubs.c (100%)
 delete mode 100644 stubs/isa-bus.c
 delete mode 100644 stubs/module-opts.c
 rename stubs/{monitor.c => monitor-internal.c} (79%)
 delete mode 100644 stubs/pci-bus.c
 create mode 100644 stubs/replay-mode.c

-- 
2.44.0



^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2024-04-08 18:18 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08 15:53 [PATCH v2 0/7] buildsys: Start shrinking qemu-user build process Paolo Bonzini
2024-04-08 15:53 ` [PATCH v2 01/18] meson: do not link pixman automatically into all targets Paolo Bonzini
2024-04-08 16:41   ` Richard Henderson
2024-04-08 15:53 ` [PATCH v2 02/18] tests: only build plugins if TCG is enabled Paolo Bonzini
2024-04-08 15:54   ` Philippe Mathieu-Daudé
2024-04-08 17:03   ` Richard Henderson
2024-04-08 15:53 ` [PATCH v2 03/18] ebpf: Restrict to system emulation Paolo Bonzini
2024-04-08 15:53 ` [PATCH v2 04/18] tests/unit: match some unit tests to corresponding feature switches Paolo Bonzini
2024-04-08 16:42   ` Richard Henderson
2024-04-08 15:53 ` [PATCH v2 05/18] yank: only build if needed Paolo Bonzini
2024-04-08 15:55   ` Philippe Mathieu-Daudé
2024-04-08 16:42   ` Richard Henderson
2024-04-08 15:53 ` [PATCH v2 06/18] util/qemu-config: Extract QMP commands to qemu-config-qmp.c Paolo Bonzini
2024-04-08 15:53 ` [PATCH v2 07/18] hw/core: Move system emulation files to system_ss Paolo Bonzini
2024-04-08 16:45   ` Richard Henderson
2024-04-08 15:53 ` [PATCH v2 08/18] hw: Include minimal source set in user emulation build Paolo Bonzini
2024-04-08 15:53 ` [PATCH v2 09/18] stubs: remove obsolete stubs Paolo Bonzini
2024-04-08 16:46   ` Richard Henderson
2024-04-08 15:53 ` [PATCH v2 10/18] hw/usb: move stubs out of stubs/ Paolo Bonzini
2024-04-08 15:59   ` Philippe Mathieu-Daudé
2024-04-08 16:47   ` Richard Henderson
2024-04-08 15:53 ` [PATCH v2 11/18] hw/virtio: " Paolo Bonzini
2024-04-08 16:47   ` Richard Henderson
2024-04-08 15:53 ` [PATCH v2 12/18] semihosting: " Paolo Bonzini
2024-04-08 15:53 ` [PATCH v2 13/18] ramfb: " Paolo Bonzini
2024-04-08 15:59   ` Philippe Mathieu-Daudé
2024-04-08 16:49   ` Richard Henderson
2024-04-08 16:50   ` Richard Henderson
2024-04-08 15:53 ` [PATCH v2 14/18] memory-device: " Paolo Bonzini
2024-04-08 16:50   ` Richard Henderson
2024-04-08 18:17   ` Philippe Mathieu-Daudé
2024-04-08 15:53 ` [PATCH v2 15/18] colo: " Paolo Bonzini
2024-04-08 15:53 ` [PATCH v2 16/18] stubs: split record/replay stubs further Paolo Bonzini
2024-04-08 16:59   ` Richard Henderson
2024-04-08 17:14     ` Paolo Bonzini
2024-04-08 15:53 ` [PATCH v2 17/18] stubs: include stubs only if needed Paolo Bonzini
2024-04-08 15:53 ` [PATCH v2 18/18] stubs: move monitor_fdsets_cleanup with other fdset stubs Paolo Bonzini
2024-04-08 17:02   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).