Skip to content

softmmu: Clean up arch_init.c

Peter Maydell qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8softmmu: Use accel_find("xen") instead of xen_available()include/sysemu/arch_init.h softmmu/arch_init.c softmmu/vl.c+3 -131 reply
2/8monitor: Use accel_find("kvm") instead of kvm_available()include/sysemu/arch_init.h monitor/qmp-cmds.c softmmu/arch_init.c+1 -121 reply
3/8softmmu/arch_init.c: Trim down include listsoftmmu/arch_init.c+0 -71 reply
4/8meson.build: Define QEMU_ARCH in config-target.hmeson.build softmmu/arch_init.c+2 -412 replies
5/8arch_init.h: Add QEMU_ARCH_HEXAGONinclude/sysemu/arch_init.h+1 -03 replies
6/8arch_init.h: Move QEMU_ARCH_VIRTIO_* to qdev-monitor.cinclude/sysemu/arch_init.h softmmu/qdev-monitor.c+9 -92 replies
7/8arch_init.h: Don't include arch_init.h unnecessarilyblockdev.c hw/i386/pc.c hw/i386/pc_piix.c +11 more+0 -143 replies
8/8stubs: Remove unused arch_type.c stubinclude/sysemu/arch_init.h stubs/arch_type.c stubs/meson.build+0 -72 replies

Reviews trailers per patch

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

PatchPhilippe Mathieu-DaudéRichard HendersonTaylor SimpsonAlistair FrancisMarkus Armbruster
1/8R-b
2/8R-b
3/8R-b
4/8R-b R-b
5/8R-b R-b R-b
6/8R-b R-b
7/8R-b R-b R-b
8/8R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH for-6.2 0/8] softmmu: Clean up arch_init.c

This patchset does some cleanups of arch_init.c. The bit I started out caring about was getting rid of the TARGET_* ifdef ladder (in patch 4 we make meson.build define QEMU_ARCH in config-target.h instead) -- this kind of ifdef ladder is nasty because it's always another place in the code that needs updating when we add or remove a target. I think this was one of the last remaining "every single arch touches this" ones. The rest of the patchset is stuff I noticed when I started looking at what else arch_init.c was doing.

The graphic_width/height/depth target-specific defaults that arch_init.c does also look like they could use cleanup. My guess is that we should instead have a per-machine default graphics width/height/depth. But that's a separate thing and more work than I felt like doing this morning :-)

-- PMM

Peter Maydell (8):
softmmu: Use accel_find("xen") instead of xen_available()
monitor: Use accel_find("kvm") instead of kvm_available() softmmu/arch_init.c: Trim down include list meson.build: Define QEMU_ARCH in config-target.h arch_init.h: Add QEMU_ARCH_HEXAGON
arch_init.h: Move QEMU_ARCH_VIRTIO_* to qdev-monitor.c arch_init.h: Don't include arch_init.h unnecessarily
stubs: Remove unused arch_type.c stub

 meson.build                |  2 ++
 include/sysemu/arch_init.h | 15 +--------
 blockdev.c                 |  1 -
 hw/i386/pc.c               |  1 -
 hw/i386/pc_piix.c          |  1 -
 hw/i386/pc_q35.c           |  1 -
 hw/mips/jazz.c             |  1 -
 hw/mips/malta.c            |  1 -
 hw/ppc/prep.c              |  1 -
 hw/riscv/sifive_e.c        |  1 -
 hw/riscv/sifive_u.c        |  1 -
 hw/riscv/spike.c           |  1 -
 hw/riscv/virt.c            |  1 -
 monitor/qmp-cmds.c         |  3 +-
 softmmu/arch_init.c        | 66 --------------------------------------
 softmmu/qdev-monitor.c     |  9 ++++++
 softmmu/vl.c               |  6 ++--
 stubs/arch_type.c          |  4 ---
 target/ppc/cpu_init.c      |  1 -
 target/s390x/cpu-sysemu.c  |  1 -
 stubs/meson.build          |  1 -
 21 files changed, 16 insertions(+), 103 deletions(-)
 delete mode 100644 stubs/arch_type.c
Signature · 1 line
2.20.1