Skip to content

arch_init.c cleanup

Eduardo Habkost kvm qemu-arm qemu-devel qemu-riscv xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest6 patches 20 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6arch_init: Move QEMU_ARCH definitions to cpu.hsoftmmu/arch_init.c target/alpha/cpu.h target/arm/cpu.h +20 more+22 -462 replies
2/6accel: accel_available() functionaccel/accel.c include/sysemu/accel.h+6 -012 replies
3/6kvm: Remove kvm_available() functioninclude/sysemu/arch_init.h monitor/qmp-cmds.c softmmu/arch_init.c+1 -111 reply
4/6xen: Delete xen_available() functioninclude/sysemu/arch_init.h softmmu/arch_init.c softmmu/vl.c+3 -142 replies
5/6Remove unnecessary usage of arch_init.haccel/accel.c hw/i386/pc.c hw/i386/pc_piix.c +13 more+0 -161 reply
6/6Rename arch_init.h to arch_type.hblockdev.c include/sysemu/arch_type.h softmmu/arch_init.c +3 more+5 -51 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRoman BolshakovThomas HuthCornelia HuckAnthony PERARD
SeriesR-b
1/6A-b R-b
2/6R-b
3/6R-b
4/6R-b A-b
5/6R-b
6/6R-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 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/6] arch_init.c cleanup

This series gets rid of most of the code in arch_init.c. It moves the QEMU_ARCH macro definitions to corresponding cpu.h files, and gets rid of kvm_available() and xen_available().

After this series, only two things remain in arch_init.c:
- the arch_type variable, which seems to be a useful feature; and
- the initialization of graphic_width/graphic_height/graphic_depth, which is a hack we must eventually get rid of.

Gerd got rid of the graphic_* initialization hack once (in 2017), but the series was never merged:
https://lore.kernel.org/qemu-devel/[email protected]

Eduardo Habkost (6):
arch_init: Move QEMU_ARCH definitions to cpu.h
accel: accel_available() function
kvm: Remove kvm_available() function
xen: Delete xen_available() function
Remove unnecessary usage of arch_init.h
Rename arch_init.h to arch_type.h

 include/sysemu/accel.h                      |  1 +
 include/sysemu/{arch_init.h => arch_type.h} |  3 -
 target/alpha/cpu.h                          |  1 +
 target/arm/cpu.h                            |  1 +
 target/avr/cpu.h                            |  1 +
 target/cris/cpu.h                           |  1 +
 target/hppa/cpu.h                           |  1 +
 target/i386/cpu.h                           |  1 +
 target/lm32/cpu.h                           |  1 +
 target/m68k/cpu.h                           |  1 +
 target/microblaze/cpu.h                     |  1 +
 target/mips/cpu.h                           |  1 +
 target/moxie/cpu.h                          |  1 +
 target/nios2/cpu.h                          |  1 +
 target/openrisc/cpu.h                       |  1 +
 target/ppc/cpu.h                            |  1 +
 target/riscv/cpu.h                          |  1 +
 target/rx/cpu.h                             |  1 +
 target/s390x/cpu.h                          |  1 +
 target/sh4/cpu.h                            |  1 +
 target/sparc/cpu.h                          |  1 +
 target/tricore/cpu.h                        |  1 +
 target/unicore32/cpu.h                      |  1 +
 target/xtensa/cpu.h                         |  1 +
 accel/accel.c                               |  6 +-
 blockdev.c                                  |  2 +-
 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                      |  2 +-
 softmmu/vl.c                                |  8 +--
 stubs/arch_type.c                           |  2 +-
 target/i386/cpu.c                           |  1 -
 target/s390x/cpu.c                          |  1 -
 target/s390x/cpu_models.c                   |  1 -
 target/ppc/translate_init.c.inc             |  1 -
 45 files changed, 37 insertions(+), 92 deletions(-)
 rename include/sysemu/{arch_init.h => arch_type.h} (94%)
Signature · 1 line
2.28.0