qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-6.1 0/4] Remove more superfluous include statements
@ 2021-04-16 17:13 Thomas Huth
  2021-04-16 17:13 ` [PATCH 1/4] Do not include sysemu/sysemu.h if it's not really necessary Thomas Huth
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Thomas Huth @ 2021-04-16 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Here are some more patches to remove superfluous include statements.
Compile-tested here:

 https://gitlab.com/thuth/qemu/-/pipelines/287607644

and here:

 https://cirrus-ci.com/build/5073843392872448

Thomas Huth (4):
  Do not include sysemu/sysemu.h if it's not really necessary
  Do not include hw/boards.h if it's not really necessary
  Do not include cpu.h if it's not really necessary
  Do not include exec/address-spaces.h if it's not really necessary

 accel/kvm/kvm-all.c               | 2 --
 accel/stubs/kvm-stub.c            | 1 -
 accel/stubs/tcg-stub.c            | 1 -
 accel/tcg/cpu-exec-common.c       | 1 -
 accel/tcg/cpu-exec.c              | 1 -
 accel/tcg/cputlb.c                | 2 --
 accel/tcg/plugin-gen.c            | 1 -
 accel/tcg/tcg-accel-ops-icount.c  | 1 -
 accel/tcg/tcg-accel-ops-rr.c      | 1 -
 accel/tcg/tcg-accel-ops.c         | 1 -
 accel/tcg/translate-all.c         | 1 -
 accel/tcg/translator.c            | 1 -
 accel/tcg/user-exec-stub.c        | 1 -
 accel/tcg/user-exec.c             | 1 -
 backends/hostmem-file.c           | 1 -
 backends/hostmem-memfd.c          | 1 -
 backends/hostmem.c                | 1 -
 block.c                           | 1 -
 block/block-backend.c             | 1 -
 block/nfs.c                       | 1 -
 bsd-user/main.c                   | 1 -
 chardev/char-mux.c                | 1 -
 chardev/char.c                    | 1 -
 disas.c                           | 1 -
 dump/dump.c                       | 1 -
 dump/win_dump.c                   | 1 -
 gdbstub.c                         | 1 -
 hw/acpi/cpu.c                     | 1 -
 hw/acpi/generic_event_device.c    | 1 -
 hw/acpi/ich9.c                    | 1 -
 hw/acpi/memory_hotplug.c          | 1 -
 hw/acpi/pcihp.c                   | 1 -
 hw/acpi/piix4.c                   | 1 -
 hw/alpha/dp264.c                  | 1 -
 hw/alpha/typhoon.c                | 2 --
 hw/arm/allwinner-a10.c            | 2 --
 hw/arm/allwinner-h3.c             | 2 --
 hw/arm/armv7m.c                   | 2 --
 hw/arm/aspeed.c                   | 4 ----
 hw/arm/aspeed_ast2600.c           | 2 --
 hw/arm/aspeed_soc.c               | 2 --
 hw/arm/bcm2836.c                  | 1 -
 hw/arm/boot.c                     | 1 -
 hw/arm/cubieboard.c               | 3 ---
 hw/arm/digic_boards.c             | 3 ---
 hw/arm/exynos4_boards.c           | 2 --
 hw/arm/fsl-imx25.c                | 2 --
 hw/arm/fsl-imx31.c                | 1 -
 hw/arm/highbank.c                 | 1 -
 hw/arm/imx25_pdk.c                | 2 --
 hw/arm/kzm.c                      | 1 -
 hw/arm/mcimx6ul-evk.c             | 1 -
 hw/arm/mcimx7d-sabre.c            | 1 -
 hw/arm/msf2-som.c                 | 1 -
 hw/arm/musicpal.c                 | 1 -
 hw/arm/npcm7xx.c                  | 1 -
 hw/arm/npcm7xx_boards.c           | 2 --
 hw/arm/nrf51_soc.c                | 2 --
 hw/arm/nseries.c                  | 1 -
 hw/arm/omap1.c                    | 1 -
 hw/arm/omap2.c                    | 1 -
 hw/arm/orangepi.c                 | 2 --
 hw/arm/palm.c                     | 1 -
 hw/arm/raspi.c                    | 2 --
 hw/arm/realview.c                 | 1 -
 hw/arm/sabrelite.c                | 1 -
 hw/arm/sbsa-ref.c                 | 1 -
 hw/arm/smmu-common.c              | 1 -
 hw/arm/smmuv3.c                   | 1 -
 hw/arm/stellaris.c                | 1 -
 hw/arm/strongarm.c                | 1 -
 hw/arm/versatilepb.c              | 1 -
 hw/arm/vexpress.c                 | 1 -
 hw/arm/virt.c                     | 3 ---
 hw/arm/xilinx_zynq.c              | 1 -
 hw/arm/xlnx-versal-virt.c         | 1 -
 hw/arm/xlnx-zcu102.c              | 1 -
 hw/arm/xlnx-zynqmp.c              | 2 --
 hw/avr/arduino.c                  | 1 -
 hw/avr/atmega.c                   | 1 -
 hw/block/nvme-subsys.c            | 1 -
 hw/char/mchp_pfsoc_mmuart.c       | 1 -
 hw/char/spapr_vty.c               | 1 -
 hw/core/loader.c                  | 1 -
 hw/core/machine-qmp-cmds.c        | 2 --
 hw/core/null-machine.c            | 1 -
 hw/core/numa.c                    | 1 -
 hw/cris/axis_dev88.c              | 1 -
 hw/display/next-fb.c              | 1 -
 hw/dma/pl080.c                    | 1 -
 hw/hppa/dino.c                    | 2 --
 hw/hppa/lasi.c                    | 2 --
 hw/hppa/machine.c                 | 1 -
 hw/i386/acpi-build.c              | 1 -
 hw/i386/acpi-microvm.c            | 1 -
 hw/i386/intel_iommu.c             | 2 --
 hw/i386/kvm/apic.c                | 1 -
 hw/i386/kvm/clock.c               | 1 -
 hw/i386/kvmvapic.c                | 1 -
 hw/i386/microvm.c                 | 1 -
 hw/i386/pc.c                      | 2 --
 hw/i386/pc_piix.c                 | 3 ---
 hw/i386/pc_q35.c                  | 1 -
 hw/i386/pc_sysfw.c                | 1 -
 hw/i386/vmport.c                  | 1 -
 hw/i386/x86-iommu.c               | 1 -
 hw/i386/xen/xen-hvm.c             | 1 -
 hw/i386/xen/xen_platform.c        | 1 -
 hw/input/lasips2.c                | 1 -
 hw/intc/apic.c                    | 1 -
 hw/intc/apic_common.c             | 1 -
 hw/intc/arm_gic_kvm.c             | 1 -
 hw/intc/armv7m_nvic.c             | 1 -
 hw/intc/grlib_irqmp.c             | 1 -
 hw/intc/openpic_kvm.c             | 2 --
 hw/intc/s390_flic.c               | 1 -
 hw/intc/s390_flic_kvm.c           | 1 -
 hw/intc/sifive_plic.c             | 2 --
 hw/intc/xics.c                    | 1 -
 hw/intc/xics_kvm.c                | 1 -
 hw/intc/xics_spapr.c              | 1 -
 hw/isa/isa-superio.c              | 1 -
 hw/isa/lpc_ich9.c                 | 1 -
 hw/isa/piix3.c                    | 1 -
 hw/isa/vt82c686.c                 | 1 -
 hw/lm32/lm32_boards.c             | 1 -
 hw/lm32/milkymist.c               | 1 -
 hw/m68k/an5206.c                  | 1 -
 hw/m68k/mcf5208.c                 | 1 -
 hw/m68k/next-cube.c               | 2 --
 hw/m68k/next-kbd.c                | 2 --
 hw/m68k/q800.c                    | 1 -
 hw/m68k/virt.c                    | 1 -
 hw/mem/sparse-mem.c               | 1 -
 hw/microblaze/boot.c              | 1 -
 hw/mips/boston.c                  | 1 -
 hw/mips/fuloong2e.c               | 1 -
 hw/mips/gt64xxx_pci.c             | 1 -
 hw/mips/jazz.c                    | 1 -
 hw/mips/loongson3_virt.c          | 3 ---
 hw/mips/malta.c                   | 3 ---
 hw/mips/mips_int.c                | 1 -
 hw/mips/mipssim.c                 | 2 --
 hw/misc/macio/macio.c             | 1 -
 hw/misc/mips_itu.c                | 1 -
 hw/moxie/moxiesim.c               | 1 -
 hw/net/can/xlnx-zynqmp-can.c      | 1 -
 hw/net/i82596.c                   | 1 -
 hw/net/lasi_i82596.c              | 1 -
 hw/net/msf2-emac.c                | 1 -
 hw/net/spapr_llan.c               | 1 -
 hw/nios2/10m50_devboard.c         | 1 -
 hw/nios2/boot.c                   | 2 --
 hw/nios2/generic_nommu.c          | 1 -
 hw/nvram/nrf51_nvm.c              | 1 -
 hw/nvram/spapr_nvram.c            | 1 -
 hw/openrisc/openrisc_sim.c        | 1 -
 hw/pci-host/bonito.c              | 1 -
 hw/pci-host/ppce500.c             | 1 -
 hw/pci-host/prep.c                | 1 -
 hw/pci-host/sabre.c               | 1 -
 hw/pci-host/sh_pci.c              | 1 -
 hw/pci/pci.c                      | 1 -
 hw/pci/pcie_host.c                | 1 -
 hw/ppc/e500.c                     | 2 --
 hw/ppc/mac_newworld.c             | 2 --
 hw/ppc/mac_oldworld.c             | 2 --
 hw/ppc/pnv.c                      | 2 --
 hw/ppc/pnv_psi.c                  | 1 -
 hw/ppc/ppc.c                      | 1 -
 hw/ppc/ppc405_boards.c            | 2 --
 hw/ppc/ppc440_bamboo.c            | 1 -
 hw/ppc/ppc440_pcix.c              | 1 -
 hw/ppc/ppc440_uc.c                | 2 --
 hw/ppc/ppc4xx_devs.c              | 1 -
 hw/ppc/ppc4xx_pci.c               | 1 -
 hw/ppc/prep.c                     | 3 ---
 hw/ppc/rs6000_mc.c                | 1 -
 hw/ppc/sam460ex.c                 | 1 -
 hw/ppc/spapr.c                    | 2 --
 hw/ppc/spapr_drc.c                | 1 -
 hw/ppc/spapr_events.c             | 1 -
 hw/ppc/spapr_hcall.c              | 1 -
 hw/ppc/spapr_iommu.c              | 1 -
 hw/ppc/spapr_pci.c                | 2 --
 hw/ppc/spapr_pci_vfio.c           | 1 -
 hw/ppc/spapr_rng.c                | 1 -
 hw/ppc/spapr_rtas.c               | 2 --
 hw/ppc/spapr_rtas_ddw.c           | 1 -
 hw/ppc/spapr_rtc.c                | 1 -
 hw/ppc/spapr_tpm_proxy.c          | 1 -
 hw/ppc/virtex_ml507.c             | 1 -
 hw/remote/iohub.c                 | 1 -
 hw/remote/machine.c               | 1 -
 hw/remote/memory.c                | 1 -
 hw/remote/proxy-memory-listener.c | 2 --
 hw/riscv/opentitan.c              | 1 -
 hw/riscv/sifive_e.c               | 1 -
 hw/rtc/m48t59.c                   | 1 -
 hw/rtc/mc146818rtc.c              | 1 -
 hw/rx/rx-gdbsim.c                 | 2 --
 hw/rx/rx62n.c                     | 1 -
 hw/s390x/3270-ccw.c               | 1 -
 hw/s390x/css-bridge.c             | 1 -
 hw/s390x/css.c                    | 1 -
 hw/s390x/ipl.c                    | 2 --
 hw/s390x/pv.c                     | 1 -
 hw/s390x/s390-pci-bus.c           | 1 -
 hw/s390x/s390-pci-inst.c          | 1 -
 hw/s390x/s390-stattrib-kvm.c      | 1 -
 hw/s390x/s390-stattrib.c          | 1 -
 hw/s390x/s390-virtio-ccw.c        | 4 ----
 hw/s390x/sclp.c                   | 2 --
 hw/s390x/sclpcpu.c                | 1 -
 hw/scsi/spapr_vscsi.c             | 1 -
 hw/sh4/r2d.c                      | 1 -
 hw/sh4/sh7750.c                   | 1 -
 hw/sh4/shix.c                     | 2 --
 hw/sparc/leon3.c                  | 1 -
 hw/sparc64/niagara.c              | 1 -
 hw/ssi/aspeed_smc.c               | 1 -
 hw/ssi/sifive_spi.c               | 1 -
 hw/tpm/tpm_crb.c                  | 1 -
 hw/tricore/tc27x_soc.c            | 3 ---
 hw/tricore/triboard.c             | 3 ---
 hw/tricore/tricore_testboard.c    | 1 -
 hw/vfio/ap.c                      | 1 -
 hw/vfio/display.c                 | 1 -
 hw/vfio/migration.c               | 1 -
 hw/vfio/pci.c                     | 1 -
 hw/vfio/spapr.c                   | 1 -
 hw/virtio/vhost.c                 | 1 -
 hw/virtio/virtio.c                | 1 -
 hw/xen/xen_pt.c                   | 1 -
 hw/xtensa/sim.c                   | 2 --
 hw/xtensa/virt.c                  | 3 ---
 hw/xtensa/xtensa_memory.c         | 1 -
 hw/xtensa/xtfpga.c                | 1 -
 linux-user/main.c                 | 1 -
 linux-user/semihost.c             | 1 -
 migration/ram.c                   | 2 --
 monitor/misc.c                    | 1 -
 monitor/monitor.c                 | 1 -
 net/net.c                         | 2 --
 net/netmap.c                      | 1 -
 plugins/api.c                     | 2 --
 plugins/core.c                    | 2 --
 plugins/loader.c                  | 1 -
 semihosting/arm-compat-semi.c     | 1 -
 semihosting/config.c              | 1 -
 semihosting/console.c             | 2 --
 softmmu/arch_init.c               | 2 --
 softmmu/device_tree.c             | 1 -
 softmmu/memory.c                  | 2 --
 softmmu/memory_mapping.c          | 1 -
 softmmu/physmem.c                 | 3 ---
 softmmu/qdev-monitor.c            | 1 -
 softmmu/vl.c                      | 1 -
 stubs/semihost.c                  | 1 -
 target/arm/cpu.c                  | 1 -
 target/i386/hvf/hvf.c             | 1 -
 target/i386/hvf/x86_mmu.c         | 1 -
 target/i386/sev.c                 | 1 -
 target/openrisc/sys_helper.c      | 1 -
 target/rx/helper.c                | 1 -
 target/s390x/cpu.c                | 1 -
 target/s390x/diag.c               | 1 -
 target/s390x/excp_helper.c        | 1 -
 target/xtensa/op_helper.c         | 1 -
 tcg/tcg-op-vec.c                  | 1 -
 tcg/tcg-op.c                      | 1 -
 tcg/tcg.c                         | 2 --
 tests/qtest/fuzz/fuzz.c           | 1 -
 tests/qtest/fuzz/generic_fuzz.c   | 2 --
 tests/qtest/fuzz/qos_fuzz.c       | 2 --
 util/oslib-win32.c                | 1 -
 276 files changed, 356 deletions(-)

-- 
2.27.0



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

* [PATCH 1/4] Do not include sysemu/sysemu.h if it's not really necessary
  2021-04-16 17:13 [PATCH for-6.1 0/4] Remove more superfluous include statements Thomas Huth
@ 2021-04-16 17:13 ` Thomas Huth
  2021-04-30 15:59   ` Laurent Vivier
  2021-04-16 17:13 ` [PATCH 2/4] Do not include hw/boards.h " Thomas Huth
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Thomas Huth @ 2021-04-16 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Stop including sysemu/sysemu.h in files that don't need it.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 accel/kvm/kvm-all.c          | 1 -
 accel/tcg/user-exec-stub.c   | 1 -
 backends/hostmem-file.c      | 1 -
 backends/hostmem-memfd.c     | 1 -
 backends/hostmem.c           | 1 -
 block.c                      | 1 -
 block/block-backend.c        | 1 -
 block/nfs.c                  | 1 -
 chardev/char-mux.c           | 1 -
 chardev/char.c               | 1 -
 gdbstub.c                    | 1 -
 hw/alpha/dp264.c             | 1 -
 hw/arm/aspeed.c              | 1 -
 hw/arm/cubieboard.c          | 1 -
 hw/arm/digic_boards.c        | 1 -
 hw/arm/exynos4_boards.c      | 1 -
 hw/arm/mcimx6ul-evk.c        | 1 -
 hw/arm/mcimx7d-sabre.c       | 1 -
 hw/arm/npcm7xx_boards.c      | 1 -
 hw/arm/orangepi.c            | 1 -
 hw/arm/raspi.c               | 1 -
 hw/arm/sabrelite.c           | 1 -
 hw/arm/virt.c                | 1 -
 hw/block/nvme-subsys.c       | 1 -
 hw/core/machine-qmp-cmds.c   | 1 -
 hw/core/null-machine.c       | 1 -
 hw/core/numa.c               | 1 -
 hw/i386/pc_piix.c            | 1 -
 hw/i386/pc_sysfw.c           | 1 -
 hw/input/lasips2.c           | 1 -
 hw/intc/sifive_plic.c        | 1 -
 hw/isa/isa-superio.c         | 1 -
 hw/isa/piix3.c               | 1 -
 hw/m68k/next-kbd.c           | 1 -
 hw/microblaze/boot.c         | 1 -
 hw/mips/malta.c              | 1 -
 hw/misc/macio/macio.c        | 1 -
 hw/net/can/xlnx-zynqmp-can.c | 1 -
 hw/net/i82596.c              | 1 -
 hw/net/lasi_i82596.c         | 1 -
 hw/nios2/boot.c              | 1 -
 hw/ppc/ppc405_boards.c       | 1 -
 hw/ppc/prep.c                | 1 -
 hw/rx/rx-gdbsim.c            | 1 -
 hw/s390x/ipl.c               | 1 -
 hw/s390x/sclp.c              | 1 -
 hw/sh4/shix.c                | 1 -
 hw/ssi/sifive_spi.c          | 1 -
 hw/vfio/display.c            | 1 -
 hw/vfio/pci.c                | 1 -
 hw/xtensa/virt.c             | 1 -
 migration/ram.c              | 1 -
 monitor/monitor.c            | 1 -
 net/net.c                    | 2 --
 net/netmap.c                 | 1 -
 plugins/api.c                | 1 -
 plugins/core.c               | 1 -
 semihosting/config.c         | 1 -
 semihosting/console.c        | 1 -
 softmmu/arch_init.c          | 1 -
 softmmu/device_tree.c        | 1 -
 softmmu/physmem.c            | 1 -
 softmmu/qdev-monitor.c       | 1 -
 stubs/semihost.c             | 1 -
 target/arm/cpu.c             | 1 -
 target/openrisc/sys_helper.c | 1 -
 target/rx/helper.c           | 1 -
 target/s390x/cpu.c           | 1 -
 target/s390x/excp_helper.c   | 1 -
 tcg/tcg.c                    | 1 -
 tests/qtest/fuzz/fuzz.c      | 1 -
 tests/qtest/fuzz/qos_fuzz.c  | 1 -
 util/oslib-win32.c           | 1 -
 73 files changed, 74 deletions(-)

diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index b6d9f92f15..f42b743977 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -30,7 +30,6 @@
 #include "sysemu/kvm_int.h"
 #include "sysemu/runstate.h"
 #include "sysemu/cpus.h"
-#include "sysemu/sysemu.h"
 #include "qemu/bswap.h"
 #include "exec/memory.h"
 #include "exec/ram_addr.h"
diff --git a/accel/tcg/user-exec-stub.c b/accel/tcg/user-exec-stub.c
index b876f5c1e4..968cd3ca60 100644
--- a/accel/tcg/user-exec-stub.c
+++ b/accel/tcg/user-exec-stub.c
@@ -1,7 +1,6 @@
 #include "qemu/osdep.h"
 #include "hw/core/cpu.h"
 #include "sysemu/replay.h"
-#include "sysemu/sysemu.h"
 
 bool enable_cpu_pm = false;
 
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
index b683da9daf..9b1b9f0a56 100644
--- a/backends/hostmem-file.c
+++ b/backends/hostmem-file.c
@@ -15,7 +15,6 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "sysemu/hostmem.h"
-#include "sysemu/sysemu.h"
 #include "qom/object_interfaces.h"
 #include "qom/object.h"
 
diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c
index 69b0ae30bb..da75e27057 100644
--- a/backends/hostmem-memfd.c
+++ b/backends/hostmem-memfd.c
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 #include "sysemu/hostmem.h"
-#include "sysemu/sysemu.h"
 #include "qom/object_interfaces.h"
 #include "qemu/memfd.h"
 #include "qemu/module.h"
diff --git a/backends/hostmem.c b/backends/hostmem.c
index c6c1ff5b99..aab3de8408 100644
--- a/backends/hostmem.c
+++ b/backends/hostmem.c
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 #include "sysemu/hostmem.h"
-#include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "qapi/error.h"
 #include "qapi/qapi-builtin-visit.h"
diff --git a/block.c b/block.c
index c5b887cec1..7261f714bf 100644
--- a/block.c
+++ b/block.c
@@ -41,7 +41,6 @@
 #include "qapi/qobject-output-visitor.h"
 #include "qapi/qapi-visit-block-core.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/sysemu.h"
 #include "qemu/notify.h"
 #include "qemu/option.h"
 #include "qemu/coroutine.h"
diff --git a/block/block-backend.c b/block/block-backend.c
index 413af51f3b..5f43a71a1d 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -18,7 +18,6 @@
 #include "hw/qdev-core.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/runstate.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/replay.h"
 #include "qapi/error.h"
 #include "qapi/qapi-events-block.h"
diff --git a/block/nfs.c b/block/nfs.c
index 8c1968bb41..7dff64f489 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -39,7 +39,6 @@
 #include "qemu/option.h"
 #include "qemu/uri.h"
 #include "qemu/cutils.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/replay.h"
 #include "qapi/qapi-visit-block-core.h"
 #include "qapi/qmp/qdict.h"
diff --git a/chardev/char-mux.c b/chardev/char-mux.c
index 72beef29d2..5baf419010 100644
--- a/chardev/char-mux.c
+++ b/chardev/char-mux.c
@@ -28,7 +28,6 @@
 #include "qemu/option.h"
 #include "chardev/char.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/sysemu.h"
 #include "chardev-internal.h"
 
 /* MUX driver for serial I/O splitting */
diff --git a/chardev/char.c b/chardev/char.c
index 398f09df19..a4ebfcc5ac 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
 #include "monitor/monitor.h"
-#include "sysemu/sysemu.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
 #include "qemu/qemu-print.h"
diff --git a/gdbstub.c b/gdbstub.c
index 054665e93e..9103ffc902 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -37,7 +37,6 @@
 #include "monitor/monitor.h"
 #include "chardev/char.h"
 #include "chardev/char-fe.h"
-#include "sysemu/sysemu.h"
 #include "exec/gdbstub.h"
 #include "hw/cpu/cluster.h"
 #include "hw/boards.h"
diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c
index c8e300d93f..1017ecf330 100644
--- a/hw/alpha/dp264.c
+++ b/hw/alpha/dp264.c
@@ -13,7 +13,6 @@
 #include "hw/loader.h"
 #include "alpha_sys.h"
 #include "qemu/error-report.h"
-#include "sysemu/sysemu.h"
 #include "hw/rtc/mc146818rtc.h"
 #include "hw/ide/pci.h"
 #include "hw/timer/i8254.h"
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index c3345fce53..c4f85dab63 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -23,7 +23,6 @@
 #include "hw/misc/led.h"
 #include "hw/qdev-properties.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/sysemu.h"
 #include "hw/loader.h"
 #include "qemu/error-report.h"
 #include "qemu/units.h"
diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
index 3ec30ca5af..9e872135ae 100644
--- a/hw/arm/cubieboard.c
+++ b/hw/arm/cubieboard.c
@@ -19,7 +19,6 @@
 #include "exec/address-spaces.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
 #include "hw/arm/allwinner-a10.h"
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index 6cdc1d83fc..65d3a9ba74 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -34,7 +34,6 @@
 #include "hw/arm/digic.h"
 #include "hw/block/flash.h"
 #include "hw/loader.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/qtest.h"
 #include "qemu/units.h"
 #include "qemu/cutils.h"
diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
index 56b729141b..8ae136bbdf 100644
--- a/hw/arm/exynos4_boards.c
+++ b/hw/arm/exynos4_boards.c
@@ -26,7 +26,6 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "cpu.h"
-#include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
 #include "net/net.h"
 #include "hw/arm/boot.h"
diff --git a/hw/arm/mcimx6ul-evk.c b/hw/arm/mcimx6ul-evk.c
index ed69a7b037..ce16b6b317 100644
--- a/hw/arm/mcimx6ul-evk.c
+++ b/hw/arm/mcimx6ul-evk.c
@@ -15,7 +15,6 @@
 #include "hw/arm/fsl-imx6ul.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
-#include "sysemu/sysemu.h"
 #include "qemu/error-report.h"
 #include "sysemu/qtest.h"
 
diff --git a/hw/arm/mcimx7d-sabre.c b/hw/arm/mcimx7d-sabre.c
index e57d52b344..e896222c34 100644
--- a/hw/arm/mcimx7d-sabre.c
+++ b/hw/arm/mcimx7d-sabre.c
@@ -17,7 +17,6 @@
 #include "hw/arm/fsl-imx7.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
-#include "sysemu/sysemu.h"
 #include "qemu/error-report.h"
 #include "sysemu/qtest.h"
 
diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index e22fe4bf8f..d91d687700 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -27,7 +27,6 @@
 #include "qemu-common.h"
 #include "qemu/datadir.h"
 #include "qemu/units.h"
-#include "sysemu/sysemu.h"
 
 #define NPCM750_EVB_POWER_ON_STRAPS 0x00001ff7
 #define QUANTA_GSJ_POWER_ON_STRAPS 0x00001fff
diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c
index b8d38c9e8d..6ccb61c149 100644
--- a/hw/arm/orangepi.c
+++ b/hw/arm/orangepi.c
@@ -25,7 +25,6 @@
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
 #include "hw/arm/allwinner-h3.h"
-#include "sysemu/sysemu.h"
 
 static struct arm_boot_info orangepi_binfo = {
     .nb_cpus = AW_H3_NUM_CPUS,
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 990509d385..1b7e9c4cb4 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -23,7 +23,6 @@
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "hw/arm/boot.h"
-#include "sysemu/sysemu.h"
 #include "qom/object.h"
 
 #define SMPBOOT_ADDR    0x300 /* this should leave enough space for ATAGS */
diff --git a/hw/arm/sabrelite.c b/hw/arm/sabrelite.c
index a3dbf85e0e..42348e5cb1 100644
--- a/hw/arm/sabrelite.c
+++ b/hw/arm/sabrelite.c
@@ -15,7 +15,6 @@
 #include "hw/arm/fsl-imx6.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
-#include "sysemu/sysemu.h"
 #include "qemu/error-report.h"
 #include "sysemu/qtest.h"
 
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 9f01d9041b..9c1203183a 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -48,7 +48,6 @@
 #include "sysemu/device_tree.h"
 #include "sysemu/numa.h"
 #include "sysemu/runstate.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/tpm.h"
 #include "sysemu/kvm.h"
 #include "hw/loader.h"
diff --git a/hw/block/nvme-subsys.c b/hw/block/nvme-subsys.c
index 283a97b79d..9604c19117 100644
--- a/hw/block/nvme-subsys.c
+++ b/hw/block/nvme-subsys.c
@@ -17,7 +17,6 @@
 #include "hw/block/block.h"
 #include "block/aio.h"
 #include "block/accounting.h"
-#include "sysemu/sysemu.h"
 #include "hw/pci/pci.h"
 #include "nvme.h"
 #include "nvme-subsys.h"
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index 68a942595a..2ad004430e 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -22,7 +22,6 @@
 #include "sysemu/hw_accel.h"
 #include "sysemu/numa.h"
 #include "sysemu/runstate.h"
-#include "sysemu/sysemu.h"
 
 static void cpustate_to_cpuinfo_s390(CpuInfoS390 *info, const CPUState *cpu)
 {
diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
index 7e693523d7..f586a4bef5 100644
--- a/hw/core/null-machine.c
+++ b/hw/core/null-machine.c
@@ -14,7 +14,6 @@
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
 #include "hw/boards.h"
-#include "sysemu/sysemu.h"
 #include "exec/address-spaces.h"
 #include "hw/core/cpu.h"
 
diff --git a/hw/core/numa.c b/hw/core/numa.c
index 68cee65f61..ac6bed5817 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -26,7 +26,6 @@
 #include "qemu/units.h"
 #include "sysemu/hostmem.h"
 #include "sysemu/numa.h"
-#include "sysemu/sysemu.h"
 #include "exec/cpu-common.h"
 #include "exec/ramlist.h"
 #include "qemu/bitmap.h"
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 46cc951073..541967c1b9 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -42,7 +42,6 @@
 #include "hw/irq.h"
 #include "sysemu/kvm.h"
 #include "hw/kvm/clock.h"
-#include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
 #include "sysemu/arch_init.h"
 #include "hw/i2c/smbus_eeprom.h"
diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
index 9fe72b370e..6ce37a2b05 100644
--- a/hw/i386/pc_sysfw.c
+++ b/hw/i386/pc_sysfw.c
@@ -35,7 +35,6 @@
 #include "hw/i386/pc.h"
 #include "hw/loader.h"
 #include "hw/qdev-properties.h"
-#include "sysemu/sysemu.h"
 #include "hw/block/flash.h"
 #include "sysemu/kvm.h"
 #include "sysemu/sev.h"
diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c
index 275737842e..e7faf24058 100644
--- a/hw/input/lasips2.c
+++ b/hw/input/lasips2.c
@@ -27,7 +27,6 @@
 #include "hw/input/ps2.h"
 #include "hw/input/lasips2.h"
 #include "exec/hwaddr.h"
-#include "sysemu/sysemu.h"
 #include "trace.h"
 #include "exec/address-spaces.h"
 #include "migration/vmstate.h"
diff --git a/hw/intc/sifive_plic.c b/hw/intc/sifive_plic.c
index 97a1a27a9a..6a53e63299 100644
--- a/hw/intc/sifive_plic.c
+++ b/hw/intc/sifive_plic.c
@@ -29,7 +29,6 @@
 #include "hw/qdev-properties.h"
 #include "hw/intc/sifive_plic.h"
 #include "target/riscv/cpu.h"
-#include "sysemu/sysemu.h"
 #include "migration/vmstate.h"
 
 #define RISCV_DEBUG_PLIC 0
diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c
index 179c185695..c81bfe58ef 100644
--- a/hw/isa/isa-superio.c
+++ b/hw/isa/isa-superio.c
@@ -14,7 +14,6 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/blockdev.h"
 #include "chardev/char.h"
 #include "hw/block/fdc.h"
diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c
index f46ccae25c..dab901c9ad 100644
--- a/hw/isa/piix3.c
+++ b/hw/isa/piix3.c
@@ -29,7 +29,6 @@
 #include "hw/isa/isa.h"
 #include "hw/xen/xen.h"
 #include "sysemu/xen.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
 #include "migration/vmstate.h"
diff --git a/hw/m68k/next-kbd.c b/hw/m68k/next-kbd.c
index bee40e25bc..30a8c9fbfa 100644
--- a/hw/m68k/next-kbd.c
+++ b/hw/m68k/next-kbd.c
@@ -33,7 +33,6 @@
 #include "hw/sysbus.h"
 #include "hw/m68k/next-cube.h"
 #include "ui/console.h"
-#include "sysemu/sysemu.h"
 #include "migration/vmstate.h"
 #include "qom/object.h"
 
diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c
index caaba1aa4c..8821d009f1 100644
--- a/hw/microblaze/boot.c
+++ b/hw/microblaze/boot.c
@@ -33,7 +33,6 @@
 #include "qemu/error-report.h"
 #include "sysemu/device_tree.h"
 #include "sysemu/reset.h"
-#include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "elf.h"
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 26e7b1bd9f..5adb67ad2a 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -39,7 +39,6 @@
 #include "hw/mips/mips.h"
 #include "hw/mips/cpudevs.h"
 #include "hw/pci/pci.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/arch_init.h"
 #include "qemu/log.h"
 #include "hw/mips/bios.h"
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index e6eeb575d5..4515296e66 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -35,7 +35,6 @@
 #include "hw/char/escc.h"
 #include "hw/misc/macio/macio.h"
 #include "hw/intc/heathrow_pic.h"
-#include "sysemu/sysemu.h"
 #include "trace.h"
 
 /* Note: this code is strongly inspirated from the corresponding code
diff --git a/hw/net/can/xlnx-zynqmp-can.c b/hw/net/can/xlnx-zynqmp-can.c
index affa21a5ed..22bb8910fa 100644
--- a/hw/net/can/xlnx-zynqmp-can.c
+++ b/hw/net/can/xlnx-zynqmp-can.c
@@ -37,7 +37,6 @@
 #include "qemu/bitops.h"
 #include "qemu/log.h"
 #include "qemu/cutils.h"
-#include "sysemu/sysemu.h"
 #include "migration/vmstate.h"
 #include "hw/qdev-properties.h"
 #include "net/can_emu.h"
diff --git a/hw/net/i82596.c b/hw/net/i82596.c
index 055c3a1470..ec21e2699a 100644
--- a/hw/net/i82596.c
+++ b/hw/net/i82596.c
@@ -12,7 +12,6 @@
 #include "qemu/timer.h"
 #include "net/net.h"
 #include "net/eth.h"
-#include "sysemu/sysemu.h"
 #include "hw/irq.h"
 #include "hw/qdev-properties.h"
 #include "migration/vmstate.h"
diff --git a/hw/net/lasi_i82596.c b/hw/net/lasi_i82596.c
index 820b63f350..e37f7fabe9 100644
--- a/hw/net/lasi_i82596.c
+++ b/hw/net/lasi_i82596.c
@@ -18,7 +18,6 @@
 #include "hw/net/lasi_82596.h"
 #include "hw/net/i82596.h"
 #include "trace.h"
-#include "sysemu/sysemu.h"
 #include "hw/qdev-properties.h"
 #include "migration/vmstate.h"
 
diff --git a/hw/nios2/boot.c b/hw/nios2/boot.c
index d9969ac148..95bdc18052 100644
--- a/hw/nios2/boot.c
+++ b/hw/nios2/boot.c
@@ -38,7 +38,6 @@
 #include "qemu/error-report.h"
 #include "sysemu/device_tree.h"
 #include "sysemu/reset.h"
-#include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "elf.h"
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index f4e804cdb5..8da7bc7af9 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -34,7 +34,6 @@
 #include "ppc405.h"
 #include "hw/rtc/m48t59.h"
 #include "hw/block/flash.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "sysemu/block-backend.h"
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index af4ccb9f43..b41570c747 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -29,7 +29,6 @@
 #include "hw/char/serial.h"
 #include "hw/block/fdc.h"
 #include "net/net.h"
-#include "sysemu/sysemu.h"
 #include "hw/isa/isa.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_host.h"
diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
index 9b82feff52..1f53fdb082 100644
--- a/hw/rx/rx-gdbsim.c
+++ b/hw/rx/rx-gdbsim.c
@@ -24,7 +24,6 @@
 #include "cpu.h"
 #include "hw/loader.h"
 #include "hw/rx/rx62n.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/qtest.h"
 #include "sysemu/device_tree.h"
 #include "hw/boards.h"
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index ff6b55e816..f12af5e35b 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -18,7 +18,6 @@
 #include "qapi/error.h"
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/tcg.h"
 #include "cpu.h"
 #include "elf.h"
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index 0cf2290826..f57340a7d7 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -16,7 +16,6 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/s390x/sclp.h"
 #include "hw/s390x/event-facility.h"
diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
index d9a9fcbc59..1a44378df4 100644
--- a/hw/sh4/shix.c
+++ b/hw/sh4/shix.c
@@ -31,7 +31,6 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "hw/sh4/sh.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/qtest.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
diff --git a/hw/ssi/sifive_spi.c b/hw/ssi/sifive_spi.c
index 0c9ebca3c8..03540cf5ca 100644
--- a/hw/ssi/sifive_spi.c
+++ b/hw/ssi/sifive_spi.c
@@ -24,7 +24,6 @@
 #include "hw/qdev-properties.h"
 #include "hw/sysbus.h"
 #include "hw/ssi/ssi.h"
-#include "sysemu/sysemu.h"
 #include "qemu/fifo8.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
diff --git a/hw/vfio/display.c b/hw/vfio/display.c
index f04473e3ce..89bc90508f 100644
--- a/hw/vfio/display.c
+++ b/hw/vfio/display.c
@@ -14,7 +14,6 @@
 #include <linux/vfio.h>
 #include <sys/ioctl.h>
 
-#include "sysemu/sysemu.h"
 #include "hw/display/edid.h"
 #include "ui/console.h"
 #include "qapi/error.h"
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 5c65aa0a98..ab4077aad2 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -37,7 +37,6 @@
 #include "qemu/units.h"
 #include "sysemu/kvm.h"
 #include "sysemu/runstate.h"
-#include "sysemu/sysemu.h"
 #include "pci.h"
 #include "trace.h"
 #include "qapi/error.h"
diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c
index e47e1de676..bbf6200c49 100644
--- a/hw/xtensa/virt.c
+++ b/hw/xtensa/virt.c
@@ -29,7 +29,6 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "sysemu/reset.h"
-#include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "hw/pci-host/gpex.h"
diff --git a/migration/ram.c b/migration/ram.c
index 4682f3625c..9e9b7380bf 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -51,7 +51,6 @@
 #include "qemu/rcu_queue.h"
 #include "migration/colo.h"
 #include "block.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/cpu-throttle.h"
 #include "savevm.h"
 #include "qemu/iov.h"
diff --git a/monitor/monitor.c b/monitor/monitor.c
index 636bcc81c5..b90c0f4051 100644
--- a/monitor/monitor.c
+++ b/monitor/monitor.c
@@ -32,7 +32,6 @@
 #include "qemu/error-report.h"
 #include "qemu/option.h"
 #include "sysemu/qtest.h"
-#include "sysemu/sysemu.h"
 #include "trace.h"
 
 /*
diff --git a/net/net.c b/net/net.c
index edf9b95418..2a472604ec 100644
--- a/net/net.c
+++ b/net/net.c
@@ -51,9 +51,7 @@
 #include "qemu/option.h"
 #include "qapi/error.h"
 #include "qapi/opts-visitor.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/runstate.h"
-#include "sysemu/sysemu.h"
 #include "net/filter.h"
 #include "qapi/string-output-visitor.h"
 
diff --git a/net/netmap.c b/net/netmap.c
index 350f097f91..9e0cec58d3 100644
--- a/net/netmap.c
+++ b/net/netmap.c
@@ -33,7 +33,6 @@
 #include "net/net.h"
 #include "net/tap.h"
 #include "clients.h"
-#include "sysemu/sysemu.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qemu/iov.h"
diff --git a/plugins/api.c b/plugins/api.c
index b22998cd7c..218e1342cd 100644
--- a/plugins/api.c
+++ b/plugins/api.c
@@ -37,7 +37,6 @@
 #include "qemu/osdep.h"
 #include "qemu/plugin.h"
 #include "cpu.h"
-#include "sysemu/sysemu.h"
 #include "tcg/tcg.h"
 #include "exec/exec-all.h"
 #include "exec/ram_addr.h"
diff --git a/plugins/core.c b/plugins/core.c
index 87b823bbc4..93b595a8d6 100644
--- a/plugins/core.c
+++ b/plugins/core.c
@@ -26,7 +26,6 @@
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
-#include "sysemu/sysemu.h"
 #include "tcg/tcg.h"
 #include "tcg/tcg-op.h"
 #include "trace/mem-internal.h" /* mem_info macros */
diff --git a/semihosting/config.c b/semihosting/config.c
index 3548e0f627..137171b717 100644
--- a/semihosting/config.c
+++ b/semihosting/config.c
@@ -24,7 +24,6 @@
 #include "qemu/error-report.h"
 #include "semihosting/semihost.h"
 #include "chardev/char.h"
-#include "sysemu/sysemu.h"
 
 QemuOptsList qemu_semihosting_config_opts = {
     .name = "semihosting-config",
diff --git a/semihosting/console.c b/semihosting/console.c
index c9ebd6fdd0..a78af69387 100644
--- a/semihosting/console.c
+++ b/semihosting/console.c
@@ -24,7 +24,6 @@
 #include "qemu/log.h"
 #include "chardev/char.h"
 #include "chardev/char-fe.h"
-#include "sysemu/sysemu.h"
 #include "qemu/main-loop.h"
 #include "qapi/error.h"
 #include "qemu/fifo8.h"
diff --git a/softmmu/arch_init.c b/softmmu/arch_init.c
index 7fd5c09b2b..8471711c54 100644
--- a/softmmu/arch_init.c
+++ b/softmmu/arch_init.c
@@ -23,7 +23,6 @@
  */
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/arch_init.h"
 #include "hw/pci/pci.h"
 #include "hw/audio/soundhw.h"
diff --git a/softmmu/device_tree.c b/softmmu/device_tree.c
index 2691c58cf6..b621f63fba 100644
--- a/softmmu/device_tree.c
+++ b/softmmu/device_tree.c
@@ -23,7 +23,6 @@
 #include "qemu/bswap.h"
 #include "qemu/cutils.h"
 #include "sysemu/device_tree.h"
-#include "sysemu/sysemu.h"
 #include "hw/loader.h"
 #include "hw/boards.h"
 #include "qemu/config-file.h"
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 85034d9c11..7ed276b9b5 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -36,7 +36,6 @@
 #include "hw/boards.h"
 #include "hw/xen/xen.h"
 #include "sysemu/kvm.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/tcg.h"
 #include "sysemu/qtest.h"
 #include "qemu/timer.h"
diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c
index a9955b97a0..721dec2d82 100644
--- a/softmmu/qdev-monitor.c
+++ b/softmmu/qdev-monitor.c
@@ -35,7 +35,6 @@
 #include "qemu/qemu-print.h"
 #include "qemu/option_int.h"
 #include "sysemu/block-backend.h"
-#include "sysemu/sysemu.h"
 #include "migration/misc.h"
 #include "migration/migration.h"
 #include "qemu/cutils.h"
diff --git a/stubs/semihost.c b/stubs/semihost.c
index 1b30f38b03..4bf2cf71b9 100644
--- a/stubs/semihost.c
+++ b/stubs/semihost.c
@@ -12,7 +12,6 @@
 #include "qemu/option.h"
 #include "qemu/error-report.h"
 #include "semihosting/semihost.h"
-#include "sysemu/sysemu.h"
 
 /* Empty config */
 QemuOptsList qemu_semihosting_config_opts = {
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 0dd623e590..4eb0d2f85c 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -36,7 +36,6 @@
 #include "hw/loader.h"
 #include "hw/boards.h"
 #endif
-#include "sysemu/sysemu.h"
 #include "sysemu/tcg.h"
 #include "sysemu/hw_accel.h"
 #include "kvm_arm.h"
diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c
index 41390d046f..48674231e7 100644
--- a/target/openrisc/sys_helper.c
+++ b/target/openrisc/sys_helper.c
@@ -23,7 +23,6 @@
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
 #include "exception.h"
-#include "sysemu/sysemu.h"
 #ifndef CONFIG_USER_ONLY
 #include "hw/boards.h"
 #endif
diff --git a/target/rx/helper.c b/target/rx/helper.c
index 3e380a94fe..db6b07e389 100644
--- a/target/rx/helper.c
+++ b/target/rx/helper.c
@@ -21,7 +21,6 @@
 #include "cpu.h"
 #include "exec/log.h"
 #include "exec/cpu_ldst.h"
-#include "sysemu/sysemu.h"
 #include "hw/irq.h"
 
 void rx_cpu_unpack_psw(CPURXState *env, uint32_t psw, int rte)
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index d35eb39a1b..64455cf309 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -40,7 +40,6 @@
 #include "hw/s390x/pv.h"
 #include "hw/boards.h"
 #include "sysemu/arch_init.h"
-#include "sysemu/sysemu.h"
 #include "sysemu/tcg.h"
 #endif
 #include "fpu/softfloat-helpers.h"
diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c
index c48cd6b46f..20625c2c8f 100644
--- a/target/s390x/excp_helper.c
+++ b/target/s390x/excp_helper.c
@@ -29,7 +29,6 @@
 #include "exec/address-spaces.h"
 #include "tcg_s390x.h"
 #ifndef CONFIG_USER_ONLY
-#include "sysemu/sysemu.h"
 #include "hw/s390x/s390_flic.h"
 #include "hw/boards.h"
 #endif
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 1fbe0b686d..cc947bf6f6 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -64,7 +64,6 @@
 
 #include "elf.h"
 #include "exec/log.h"
-#include "sysemu/sysemu.h"
 
 /* Forward declarations for functions declared in tcg-target.c.inc and
    used here. */
diff --git a/tests/qtest/fuzz/fuzz.c b/tests/qtest/fuzz/fuzz.c
index 496d11a231..04b70e114b 100644
--- a/tests/qtest/fuzz/fuzz.c
+++ b/tests/qtest/fuzz/fuzz.c
@@ -18,7 +18,6 @@
 #include "qemu/datadir.h"
 #include "sysemu/qtest.h"
 #include "sysemu/runstate.h"
-#include "sysemu/sysemu.h"
 #include "qemu/main-loop.h"
 #include "qemu/rcu.h"
 #include "tests/qtest/libqos/libqtest.h"
diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c
index cee1a2a60f..2bc474645c 100644
--- a/tests/qtest/fuzz/qos_fuzz.c
+++ b/tests/qtest/fuzz/qos_fuzz.c
@@ -22,7 +22,6 @@
 #include "qemu-common.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
-#include "sysemu/sysemu.h"
 #include "qemu/main-loop.h"
 
 #include "tests/qtest/libqos/libqtest.h"
diff --git a/util/oslib-win32.c b/util/oslib-win32.c
index f68b8012bb..1fc42ec0e3 100644
--- a/util/oslib-win32.c
+++ b/util/oslib-win32.c
@@ -34,7 +34,6 @@
 #include <windows.h>
 #include "qemu-common.h"
 #include "qapi/error.h"
-#include "sysemu/sysemu.h"
 #include "qemu/main-loop.h"
 #include "trace.h"
 #include "qemu/sockets.h"
-- 
2.27.0



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

* [PATCH 2/4] Do not include hw/boards.h if it's not really necessary
  2021-04-16 17:13 [PATCH for-6.1 0/4] Remove more superfluous include statements Thomas Huth
  2021-04-16 17:13 ` [PATCH 1/4] Do not include sysemu/sysemu.h if it's not really necessary Thomas Huth
@ 2021-04-16 17:13 ` Thomas Huth
  2021-04-16 17:53   ` Philippe Mathieu-Daudé
  2021-04-30 15:59   ` Laurent Vivier
  2021-04-16 17:13 ` [PATCH 3/4] Do not include cpu.h " Thomas Huth
  2021-04-16 17:13 ` [PATCH 4/4] Do not include exec/address-spaces.h " Thomas Huth
  3 siblings, 2 replies; 12+ messages in thread
From: Thomas Huth @ 2021-04-16 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Stop including hw/boards.h in files that don't need it.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 accel/tcg/tcg-accel-ops-icount.c | 1 -
 accel/tcg/tcg-accel-ops-rr.c     | 1 -
 accel/tcg/tcg-accel-ops.c        | 1 -
 hw/acpi/cpu.c                    | 1 -
 hw/acpi/memory_hotplug.c         | 1 -
 hw/alpha/typhoon.c               | 1 -
 hw/arm/aspeed.c                  | 1 -
 hw/arm/omap1.c                   | 1 -
 hw/arm/omap2.c                   | 1 -
 hw/arm/strongarm.c               | 1 -
 hw/arm/virt.c                    | 1 -
 hw/avr/arduino.c                 | 1 -
 hw/avr/atmega.c                  | 1 -
 hw/display/next-fb.c             | 1 -
 hw/hppa/machine.c                | 1 -
 hw/i386/acpi-build.c             | 1 -
 hw/i386/acpi-microvm.c           | 1 -
 hw/i386/intel_iommu.c            | 1 -
 hw/i386/pc.c                     | 1 -
 hw/i386/x86-iommu.c              | 1 -
 hw/intc/sifive_plic.c            | 1 -
 hw/mips/loongson3_virt.c         | 1 -
 hw/ppc/e500.c                    | 1 -
 hw/ppc/mac_newworld.c            | 1 -
 hw/ppc/mac_oldworld.c            | 1 -
 hw/ppc/pnv.c                     | 1 -
 hw/ppc/ppc4xx_devs.c             | 1 -
 hw/ppc/rs6000_mc.c               | 1 -
 hw/ppc/spapr.c                   | 1 -
 hw/ppc/spapr_rtas.c              | 1 -
 hw/remote/iohub.c                | 1 -
 hw/s390x/s390-virtio-ccw.c       | 2 --
 hw/tricore/tc27x_soc.c           | 1 -
 hw/tricore/triboard.c            | 1 -
 softmmu/vl.c                     | 1 -
 35 files changed, 36 deletions(-)

diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/tcg-accel-ops-icount.c
index 13b8fbeb69..ea42d1d51b 100644
--- a/accel/tcg/tcg-accel-ops-icount.c
+++ b/accel/tcg/tcg-accel-ops-icount.c
@@ -30,7 +30,6 @@
 #include "qemu/main-loop.h"
 #include "qemu/guest-random.h"
 #include "exec/exec-all.h"
-#include "hw/boards.h"
 
 #include "tcg-accel-ops.h"
 #include "tcg-accel-ops-icount.h"
diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c
index 018b54c508..c02c061ecb 100644
--- a/accel/tcg/tcg-accel-ops-rr.c
+++ b/accel/tcg/tcg-accel-ops-rr.c
@@ -30,7 +30,6 @@
 #include "qemu/main-loop.h"
 #include "qemu/guest-random.h"
 #include "exec/exec-all.h"
-#include "hw/boards.h"
 
 #include "tcg-accel-ops.h"
 #include "tcg-accel-ops-rr.h"
diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c
index 6cdcaa2855..7191315aee 100644
--- a/accel/tcg/tcg-accel-ops.c
+++ b/accel/tcg/tcg-accel-ops.c
@@ -32,7 +32,6 @@
 #include "qemu/main-loop.h"
 #include "qemu/guest-random.h"
 #include "exec/exec-all.h"
-#include "hw/boards.h"
 
 #include "tcg-accel-ops.h"
 #include "tcg-accel-ops-mttcg.h"
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index e2317be546..f82e9512fd 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -1,5 +1,4 @@
 #include "qemu/osdep.h"
-#include "hw/boards.h"
 #include "migration/vmstate.h"
 #include "hw/acpi/cpu.h"
 #include "qapi/error.h"
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index 0bdcf15528..af37889423 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -2,7 +2,6 @@
 #include "hw/acpi/memory_hotplug.h"
 #include "hw/acpi/pc-hotplug.h"
 #include "hw/mem/pc-dimm.h"
-#include "hw/boards.h"
 #include "hw/qdev-core.h"
 #include "migration/vmstate.h"
 #include "trace.h"
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
index a42b319812..96c35c5fdb 100644
--- a/hw/alpha/typhoon.c
+++ b/hw/alpha/typhoon.c
@@ -11,7 +11,6 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/boards.h"
 #include "hw/irq.h"
 #include "alpha_sys.h"
 #include "exec/address-spaces.h"
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index c4f85dab63..b1e5bc76e4 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -16,7 +16,6 @@
 #include "hw/arm/boot.h"
 #include "hw/arm/aspeed.h"
 #include "hw/arm/aspeed_soc.h"
-#include "hw/boards.h"
 #include "hw/i2c/smbus_eeprom.h"
 #include "hw/misc/pca9552.h"
 #include "hw/misc/tmp105.h"
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index 02c0f66431..180d3788f8 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -24,7 +24,6 @@
 #include "qemu-common.h"
 #include "cpu.h"
 #include "exec/address-spaces.h"
-#include "hw/boards.h"
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/qdev-properties.h"
diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c
index 16d388fc79..02b1aa8c97 100644
--- a/hw/arm/omap2.c
+++ b/hw/arm/omap2.c
@@ -27,7 +27,6 @@
 #include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
-#include "hw/boards.h"
 #include "hw/irq.h"
 #include "hw/qdev-properties.h"
 #include "hw/arm/boot.h"
diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c
index c7ca54bcea..4dee791fd2 100644
--- a/hw/arm/strongarm.c
+++ b/hw/arm/strongarm.c
@@ -30,7 +30,6 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "hw/boards.h"
 #include "hw/irq.h"
 #include "hw/qdev-properties.h"
 #include "hw/qdev-properties-system.h"
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 9c1203183a..300b3b18be 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -36,7 +36,6 @@
 #include "monitor/qdev.h"
 #include "qapi/error.h"
 #include "hw/sysbus.h"
-#include "hw/boards.h"
 #include "hw/arm/boot.h"
 #include "hw/arm/primecell.h"
 #include "hw/arm/virt.h"
diff --git a/hw/avr/arduino.c b/hw/avr/arduino.c
index 3ff31492fa..48ef478346 100644
--- a/hw/avr/arduino.c
+++ b/hw/avr/arduino.c
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "hw/boards.h"
 #include "atmega.h"
 #include "boot.h"
 #include "qom/object.h"
diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c
index 44c6afebbb..80b8a41cb5 100644
--- a/hw/avr/atmega.c
+++ b/hw/avr/atmega.c
@@ -18,7 +18,6 @@
 #include "hw/qdev-properties.h"
 #include "hw/sysbus.h"
 #include "qom/object.h"
-#include "hw/boards.h" /* FIXME memory_region_allocate_system_memory for sram */
 #include "hw/misc/unimp.h"
 #include "atmega.h"
 
diff --git a/hw/display/next-fb.c b/hw/display/next-fb.c
index cc134c2d5b..dd6a1aa8ae 100644
--- a/hw/display/next-fb.c
+++ b/hw/display/next-fb.c
@@ -24,7 +24,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "ui/console.h"
-#include "hw/boards.h"
 #include "hw/loader.h"
 #include "framebuffer.h"
 #include "ui/pixel_ops.h"
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index f2b71db9bd..2a46af5bc9 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -9,7 +9,6 @@
 #include "cpu.h"
 #include "elf.h"
 #include "hw/loader.h"
-#include "hw/boards.h"
 #include "qemu/error-report.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index de98750aef..bfecb0038c 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -43,7 +43,6 @@
 #include "sysemu/tpm.h"
 #include "hw/acpi/tpm.h"
 #include "hw/acpi/vmgenid.h"
-#include "hw/boards.h"
 #include "sysemu/tpm_backend.h"
 #include "hw/rtc/mc146818rtc_regs.h"
 #include "migration/vmstate.h"
diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c
index ccd3303aac..1a0f77b911 100644
--- a/hw/i386/acpi-microvm.c
+++ b/hw/i386/acpi-microvm.c
@@ -30,7 +30,6 @@
 #include "hw/acpi/bios-linker-loader.h"
 #include "hw/acpi/generic_event_device.h"
 #include "hw/acpi/utils.h"
-#include "hw/boards.h"
 #include "hw/i386/fw_cfg.h"
 #include "hw/i386/microvm.h"
 #include "hw/pci/pci.h"
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 6be8f32918..1c10643432 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -31,7 +31,6 @@
 #include "hw/qdev-properties.h"
 #include "hw/i386/pc.h"
 #include "hw/i386/apic-msidef.h"
-#include "hw/boards.h"
 #include "hw/i386/x86-iommu.h"
 #include "hw/pci-host/q35.h"
 #include "sysemu/kvm.h"
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 8a84b25a03..b5ce3835e7 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -74,7 +74,6 @@
 #include "qemu/cutils.h"
 #include "hw/acpi/acpi.h"
 #include "hw/acpi/cpu_hotplug.h"
-#include "hw/boards.h"
 #include "acpi-build.h"
 #include "hw/mem/pc-dimm.h"
 #include "hw/mem/nvdimm.h"
diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
index 5f4301639c..86ad03972e 100644
--- a/hw/i386/x86-iommu.c
+++ b/hw/i386/x86-iommu.c
@@ -19,7 +19,6 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
-#include "hw/boards.h"
 #include "hw/i386/x86-iommu.h"
 #include "hw/qdev-properties.h"
 #include "hw/i386/pc.h"
diff --git a/hw/intc/sifive_plic.c b/hw/intc/sifive_plic.c
index 6a53e63299..78903beb06 100644
--- a/hw/intc/sifive_plic.c
+++ b/hw/intc/sifive_plic.c
@@ -25,7 +25,6 @@
 #include "qemu/error-report.h"
 #include "hw/sysbus.h"
 #include "hw/pci/msi.h"
-#include "hw/boards.h"
 #include "hw/qdev-properties.h"
 #include "hw/intc/sifive_plic.h"
 #include "target/riscv/cpu.h"
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index f9c0873a98..1d6573bc63 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -32,7 +32,6 @@
 #include "cpu.h"
 #include "elf.h"
 #include "kvm_mips.h"
-#include "hw/boards.h"
 #include "hw/char/serial.h"
 #include "hw/intc/loongson_liointc.h"
 #include "hw/mips/mips.h"
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 79467ac512..03b3bd322f 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -25,7 +25,6 @@
 #include "qemu/config-file.h"
 #include "hw/char/serial.h"
 #include "hw/pci/pci.h"
-#include "hw/boards.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
 #include "sysemu/reset.h"
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 2175962846..9659857dba 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -58,7 +58,6 @@
 #include "hw/pci/pci.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
-#include "hw/boards.h"
 #include "hw/nvram/fw_cfg.h"
 #include "hw/char/escc.h"
 #include "hw/misc/macio/macio.h"
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 963d247f5f..95d3d95158 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -38,7 +38,6 @@
 #include "hw/isa/isa.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_host.h"
-#include "hw/boards.h"
 #include "hw/nvram/fw_cfg.h"
 #include "hw/char/escc.h"
 #include "hw/misc/macio/macio.h"
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 6faf1fe473..22b1c4f1f3 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -52,7 +52,6 @@
 #include "hw/ppc/pnv_pnor.h"
 
 #include "hw/isa/isa.h"
-#include "hw/boards.h"
 #include "hw/char/serial.h"
 #include "hw/rtc/mc146818rtc.h"
 
diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c
index fe9d4f7155..980c48944f 100644
--- a/hw/ppc/ppc4xx_devs.c
+++ b/hw/ppc/ppc4xx_devs.c
@@ -29,7 +29,6 @@
 #include "hw/irq.h"
 #include "hw/ppc/ppc.h"
 #include "hw/ppc/ppc4xx.h"
-#include "hw/boards.h"
 #include "hw/intc/ppc-uic.h"
 #include "hw/qdev-properties.h"
 #include "qemu/log.h"
diff --git a/hw/ppc/rs6000_mc.c b/hw/ppc/rs6000_mc.c
index 4db5b51a2d..c0bc212e92 100644
--- a/hw/ppc/rs6000_mc.c
+++ b/hw/ppc/rs6000_mc.c
@@ -23,7 +23,6 @@
 #include "hw/qdev-properties.h"
 #include "migration/vmstate.h"
 #include "exec/address-spaces.h"
-#include "hw/boards.h"
 #include "qapi/error.h"
 #include "trace.h"
 #include "qom/object.h"
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index e4be00b732..89e0e60446 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -54,7 +54,6 @@
 #include "cpu-models.h"
 #include "hw/core/cpu.h"
 
-#include "hw/boards.h"
 #include "hw/ppc/ppc.h"
 #include "hw/loader.h"
 
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index 8a79f9c628..fb64be1150 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -41,7 +41,6 @@
 #include "hw/ppc/spapr_rtas.h"
 #include "hw/ppc/spapr_cpu_core.h"
 #include "hw/ppc/ppc.h"
-#include "hw/boards.h"
 
 #include <libfdt.h>
 #include "hw/ppc/spapr_drc.h"
diff --git a/hw/remote/iohub.c b/hw/remote/iohub.c
index e4ff131a6b..547d597f0f 100644
--- a/hw/remote/iohub.c
+++ b/hw/remote/iohub.c
@@ -15,7 +15,6 @@
 #include "hw/pci/pci_ids.h"
 #include "hw/pci/pci_bus.h"
 #include "qemu/thread.h"
-#include "hw/boards.h"
 #include "hw/remote/machine.h"
 #include "hw/remote/iohub.h"
 #include "qemu/main-loop.h"
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 2972b607f3..f0dbbc9f4c 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -14,10 +14,8 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/boards.h"
 #include "exec/address-spaces.h"
 #include "exec/ram_addr.h"
-#include "hw/boards.h"
 #include "hw/s390x/s390-virtio-hcall.h"
 #include "hw/s390x/sclp.h"
 #include "hw/s390x/s390_flic.h"
diff --git a/hw/tricore/tc27x_soc.c b/hw/tricore/tc27x_soc.c
index dea9ba3cca..dcccdba786 100644
--- a/hw/tricore/tc27x_soc.c
+++ b/hw/tricore/tc27x_soc.c
@@ -21,7 +21,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/sysbus.h"
-#include "hw/boards.h"
 #include "hw/loader.h"
 #include "qemu/units.h"
 #include "hw/misc/unimp.h"
diff --git a/hw/tricore/triboard.c b/hw/tricore/triboard.c
index 16e2fd7e27..f8d5f7a787 100644
--- a/hw/tricore/triboard.c
+++ b/hw/tricore/triboard.c
@@ -24,7 +24,6 @@
 #include "hw/qdev-properties.h"
 #include "cpu.h"
 #include "net/net.h"
-#include "hw/boards.h"
 #include "hw/loader.h"
 #include "exec/address-spaces.h"
 #include "elf.h"
diff --git a/softmmu/vl.c b/softmmu/vl.c
index aadb526138..307944aef3 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -27,7 +27,6 @@
 #include "qemu/datadir.h"
 #include "qemu/units.h"
 #include "exec/cpu-common.h"
-#include "hw/boards.h"
 #include "hw/qdev-properties.h"
 #include "qapi/compat-policy.h"
 #include "qapi/error.h"
-- 
2.27.0



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

* [PATCH 3/4] Do not include cpu.h if it's not really necessary
  2021-04-16 17:13 [PATCH for-6.1 0/4] Remove more superfluous include statements Thomas Huth
  2021-04-16 17:13 ` [PATCH 1/4] Do not include sysemu/sysemu.h if it's not really necessary Thomas Huth
  2021-04-16 17:13 ` [PATCH 2/4] Do not include hw/boards.h " Thomas Huth
@ 2021-04-16 17:13 ` Thomas Huth
  2021-04-30 15:59   ` Laurent Vivier
  2021-04-16 17:13 ` [PATCH 4/4] Do not include exec/address-spaces.h " Thomas Huth
  3 siblings, 1 reply; 12+ messages in thread
From: Thomas Huth @ 2021-04-16 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Stop including cpu.h in files that don't need it.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 accel/stubs/kvm-stub.c            | 1 -
 accel/stubs/tcg-stub.c            | 1 -
 accel/tcg/cpu-exec-common.c       | 1 -
 accel/tcg/cpu-exec.c              | 1 -
 accel/tcg/cputlb.c                | 1 -
 accel/tcg/plugin-gen.c            | 1 -
 accel/tcg/translate-all.c         | 1 -
 accel/tcg/translator.c            | 1 -
 accel/tcg/user-exec.c             | 1 -
 bsd-user/main.c                   | 1 -
 disas.c                           | 1 -
 dump/dump.c                       | 1 -
 dump/win_dump.c                   | 1 -
 hw/arm/allwinner-a10.c            | 1 -
 hw/arm/allwinner-h3.c             | 1 -
 hw/arm/armv7m.c                   | 1 -
 hw/arm/aspeed.c                   | 1 -
 hw/arm/aspeed_ast2600.c           | 1 -
 hw/arm/aspeed_soc.c               | 1 -
 hw/arm/bcm2836.c                  | 1 -
 hw/arm/cubieboard.c               | 1 -
 hw/arm/digic_boards.c             | 1 -
 hw/arm/exynos4_boards.c           | 1 -
 hw/arm/fsl-imx25.c                | 1 -
 hw/arm/fsl-imx31.c                | 1 -
 hw/arm/imx25_pdk.c                | 1 -
 hw/arm/kzm.c                      | 1 -
 hw/arm/msf2-som.c                 | 1 -
 hw/arm/nrf51_soc.c                | 1 -
 hw/arm/orangepi.c                 | 1 -
 hw/arm/raspi.c                    | 1 -
 hw/arm/stellaris.c                | 1 -
 hw/arm/xlnx-zcu102.c              | 1 -
 hw/arm/xlnx-zynqmp.c              | 1 -
 hw/char/spapr_vty.c               | 1 -
 hw/core/machine-qmp-cmds.c        | 1 -
 hw/hppa/dino.c                    | 1 -
 hw/hppa/lasi.c                    | 1 -
 hw/i386/kvm/apic.c                | 1 -
 hw/i386/kvm/clock.c               | 1 -
 hw/i386/kvmvapic.c                | 1 -
 hw/i386/microvm.c                 | 1 -
 hw/i386/pc_piix.c                 | 1 -
 hw/i386/vmport.c                  | 1 -
 hw/intc/apic.c                    | 1 -
 hw/intc/apic_common.c             | 1 -
 hw/intc/arm_gic_kvm.c             | 1 -
 hw/intc/armv7m_nvic.c             | 1 -
 hw/intc/grlib_irqmp.c             | 1 -
 hw/intc/openpic_kvm.c             | 1 -
 hw/intc/s390_flic.c               | 1 -
 hw/intc/s390_flic_kvm.c           | 1 -
 hw/intc/xics.c                    | 1 -
 hw/intc/xics_kvm.c                | 1 -
 hw/intc/xics_spapr.c              | 1 -
 hw/m68k/next-cube.c               | 1 -
 hw/mips/loongson3_virt.c          | 1 -
 hw/mips/malta.c                   | 1 -
 hw/mips/mips_int.c                | 1 -
 hw/mips/mipssim.c                 | 1 -
 hw/misc/mips_itu.c                | 1 -
 hw/net/spapr_llan.c               | 1 -
 hw/nios2/10m50_devboard.c         | 1 -
 hw/nios2/boot.c                   | 1 -
 hw/nios2/generic_nommu.c          | 1 -
 hw/nvram/spapr_nvram.c            | 1 -
 hw/ppc/ppc.c                      | 1 -
 hw/ppc/ppc440_uc.c                | 1 -
 hw/ppc/prep.c                     | 1 -
 hw/ppc/spapr_drc.c                | 1 -
 hw/ppc/spapr_events.c             | 1 -
 hw/ppc/spapr_hcall.c              | 1 -
 hw/ppc/spapr_pci.c                | 1 -
 hw/ppc/spapr_pci_vfio.c           | 1 -
 hw/ppc/spapr_rng.c                | 1 -
 hw/ppc/spapr_rtas.c               | 1 -
 hw/ppc/spapr_rtas_ddw.c           | 1 -
 hw/ppc/spapr_rtc.c                | 1 -
 hw/ppc/spapr_tpm_proxy.c          | 1 -
 hw/remote/proxy-memory-listener.c | 1 -
 hw/rx/rx-gdbsim.c                 | 1 -
 hw/rx/rx62n.c                     | 1 -
 hw/s390x/3270-ccw.c               | 1 -
 hw/s390x/css-bridge.c             | 1 -
 hw/s390x/css.c                    | 1 -
 hw/s390x/ipl.c                    | 1 -
 hw/s390x/pv.c                     | 1 -
 hw/s390x/s390-pci-bus.c           | 1 -
 hw/s390x/s390-pci-inst.c          | 1 -
 hw/s390x/s390-stattrib-kvm.c      | 1 -
 hw/s390x/s390-stattrib.c          | 1 -
 hw/s390x/s390-virtio-ccw.c        | 1 -
 hw/s390x/sclp.c                   | 1 -
 hw/s390x/sclpcpu.c                | 1 -
 hw/scsi/spapr_vscsi.c             | 1 -
 hw/sh4/sh7750.c                   | 1 -
 hw/tricore/tc27x_soc.c            | 1 -
 hw/tricore/triboard.c             | 1 -
 hw/vfio/ap.c                      | 1 -
 hw/vfio/migration.c               | 1 -
 hw/vfio/spapr.c                   | 1 -
 hw/xtensa/sim.c                   | 1 -
 hw/xtensa/virt.c                  | 1 -
 hw/xtensa/xtensa_memory.c         | 1 -
 linux-user/main.c                 | 1 -
 linux-user/semihost.c             | 1 -
 migration/ram.c                   | 1 -
 monitor/misc.c                    | 1 -
 plugins/api.c                     | 1 -
 plugins/core.c                    | 1 -
 plugins/loader.c                  | 1 -
 semihosting/arm-compat-semi.c     | 1 -
 semihosting/console.c             | 1 -
 softmmu/arch_init.c               | 1 -
 softmmu/memory.c                  | 1 -
 softmmu/memory_mapping.c          | 1 -
 softmmu/physmem.c                 | 1 -
 tcg/tcg-op-vec.c                  | 1 -
 tcg/tcg-op.c                      | 1 -
 tcg/tcg.c                         | 1 -
 120 files changed, 120 deletions(-)

diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c
index 0f17acfac0..5b1d00a222 100644
--- a/accel/stubs/kvm-stub.c
+++ b/accel/stubs/kvm-stub.c
@@ -11,7 +11,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "sysemu/kvm.h"
 
 #ifndef CONFIG_USER_ONLY
diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index 2304606f8e..d8162673ae 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -11,7 +11,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "exec/exec-all.h"
 
 void tb_flush(CPUState *cpu)
diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c
index 12c1e3e974..be6fe45aa5 100644
--- a/accel/tcg/cpu-exec-common.c
+++ b/accel/tcg/cpu-exec-common.c
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "sysemu/cpus.h"
 #include "sysemu/tcg.h"
 #include "exec/exec-all.h"
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index f62f12e717..0dc5271715 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -20,7 +20,6 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu/qemu-print.h"
-#include "cpu.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "trace.h"
 #include "disas/disas.h"
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 8a7b779270..502f803e5e 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -19,7 +19,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/main-loop.h"
-#include "cpu.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "exec/exec-all.h"
 #include "exec/memory.h"
diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c
index c3dc3effe7..7627225aef 100644
--- a/accel/tcg/plugin-gen.c
+++ b/accel/tcg/plugin-gen.c
@@ -43,7 +43,6 @@
  * CPU's index into a TCG temp, since the first callback did it already.
  */
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "tcg/tcg.h"
 #include "tcg/tcg-op.h"
 #include "trace/mem.h"
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index ba6ab09790..36057b22ce 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -22,7 +22,6 @@
 #include "qemu-common.h"
 
 #define NO_CPU_IO_DEFS
-#include "cpu.h"
 #include "trace.h"
 #include "disas/disas.h"
 #include "exec/exec-all.h"
diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c
index 2dfc27102f..1d32732198 100644
--- a/accel/tcg/translator.c
+++ b/accel/tcg/translator.c
@@ -9,7 +9,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
-#include "cpu.h"
 #include "tcg/tcg.h"
 #include "tcg/tcg-op.h"
 #include "exec/exec-all.h"
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 0d8cc27b21..fb2d43e6a9 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -17,7 +17,6 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "hw/core/tcg-cpu-ops.h"
 #include "disas/disas.h"
 #include "exec/exec-all.h"
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 798aba512c..36a889d084 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -32,7 +32,6 @@
 #include "qemu/path.h"
 #include "qemu/help_option.h"
 #include "qemu/module.h"
-#include "cpu.h"
 #include "exec/exec-all.h"
 #include "tcg/tcg.h"
 #include "qemu/timer.h"
diff --git a/disas.c b/disas.c
index a61f95b580..3dab4482d1 100644
--- a/disas.c
+++ b/disas.c
@@ -4,7 +4,6 @@
 #include "elf.h"
 #include "qemu/qemu-print.h"
 
-#include "cpu.h"
 #include "disas/disas.h"
 #include "disas/capstone.h"
 
diff --git a/dump/dump.c b/dump/dump.c
index 929138e91d..ab625909f3 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -15,7 +15,6 @@
 #include "qemu-common.h"
 #include "qemu/cutils.h"
 #include "elf.h"
-#include "cpu.h"
 #include "exec/hwaddr.h"
 #include "monitor/monitor.h"
 #include "sysemu/kvm.h"
diff --git a/dump/win_dump.c b/dump/win_dump.c
index 652c7bad99..c5eb5a9aac 100644
--- a/dump/win_dump.c
+++ b/dump/win_dump.c
@@ -12,7 +12,6 @@
 #include "qemu-common.h"
 #include "qemu/cutils.h"
 #include "elf.h"
-#include "cpu.h"
 #include "exec/hwaddr.h"
 #include "monitor/monitor.h"
 #include "sysemu/kvm.h"
diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
index d404f31e02..0844a65641 100644
--- a/hw/arm/allwinner-a10.c
+++ b/hw/arm/allwinner-a10.c
@@ -19,7 +19,6 @@
 #include "exec/address-spaces.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "cpu.h"
 #include "hw/sysbus.h"
 #include "hw/arm/allwinner-a10.h"
 #include "hw/misc/unimp.h"
diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c
index 88259a9c0d..bbe65d1860 100644
--- a/hw/arm/allwinner-h3.c
+++ b/hw/arm/allwinner-h3.c
@@ -24,7 +24,6 @@
 #include "qemu/module.h"
 #include "qemu/units.h"
 #include "hw/qdev-core.h"
-#include "cpu.h"
 #include "hw/sysbus.h"
 #include "hw/char/serial.h"
 #include "hw/misc/unimp.h"
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index 6dd10d8470..caeed29670 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -10,7 +10,6 @@
 #include "qemu/osdep.h"
 #include "hw/arm/armv7m.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/sysbus.h"
 #include "hw/arm/boot.h"
 #include "hw/loader.h"
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index b1e5bc76e4..7480533cb7 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -11,7 +11,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "exec/address-spaces.h"
 #include "hw/arm/boot.h"
 #include "hw/arm/aspeed.h"
diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
index 504aabf173..8e4ef07b14 100644
--- a/hw/arm/aspeed_ast2600.c
+++ b/hw/arm/aspeed_ast2600.c
@@ -9,7 +9,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "exec/address-spaces.h"
 #include "hw/misc/unimp.h"
 #include "hw/arm/aspeed_soc.h"
diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
index 516277800c..fc270daa57 100644
--- a/hw/arm/aspeed_soc.c
+++ b/hw/arm/aspeed_soc.c
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "exec/address-spaces.h"
 #include "hw/misc/unimp.h"
 #include "hw/arm/aspeed_soc.h"
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
index de7ade2878..24354338ca 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -12,7 +12,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "cpu.h"
 #include "hw/arm/bcm2836.h"
 #include "hw/arm/raspi_platform.h"
 #include "hw/sysbus.h"
diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
index 9e872135ae..d7184e5ec2 100644
--- a/hw/arm/cubieboard.c
+++ b/hw/arm/cubieboard.c
@@ -18,7 +18,6 @@
 #include "qemu/osdep.h"
 #include "exec/address-spaces.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
 #include "hw/arm/allwinner-a10.h"
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index 65d3a9ba74..fdb6781567 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -27,7 +27,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "qemu/datadir.h"
-#include "cpu.h"
 #include "hw/boards.h"
 #include "exec/address-spaces.h"
 #include "qemu/error-report.h"
diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
index 8ae136bbdf..35dd9875da 100644
--- a/hw/arm/exynos4_boards.c
+++ b/hw/arm/exynos4_boards.c
@@ -25,7 +25,6 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
-#include "cpu.h"
 #include "hw/sysbus.h"
 #include "net/net.h"
 #include "hw/arm/boot.h"
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index 08a98f828f..dafc0bef47 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/arm/fsl-imx25.h"
 #include "sysemu/sysemu.h"
 #include "exec/address-spaces.h"
diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c
index 0983998bb4..def27bb913 100644
--- a/hw/arm/fsl-imx31.c
+++ b/hw/arm/fsl-imx31.c
@@ -21,7 +21,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/arm/fsl-imx31.h"
 #include "sysemu/sysemu.h"
 #include "exec/address-spaces.h"
diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c
index 1c201d0d8e..9c58fbde57 100644
--- a/hw/arm/imx25_pdk.c
+++ b/hw/arm/imx25_pdk.c
@@ -25,7 +25,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/qdev-properties.h"
 #include "hw/arm/fsl-imx25.h"
 #include "hw/boards.h"
diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c
index e3f7d4ead2..39559c44c2 100644
--- a/hw/arm/kzm.c
+++ b/hw/arm/kzm.c
@@ -15,7 +15,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/arm/fsl-imx31.h"
 #include "hw/boards.h"
 #include "qemu/error-report.h"
diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c
index f9b61c36dd..343ec977c0 100644
--- a/hw/arm/msf2-som.c
+++ b/hw/arm/msf2-som.c
@@ -31,7 +31,6 @@
 #include "hw/arm/boot.h"
 #include "exec/address-spaces.h"
 #include "hw/arm/msf2-soc.h"
-#include "cpu.h"
 
 #define DDR_BASE_ADDRESS      0xA0000000
 #define DDR_SIZE              (64 * MiB)
diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c
index e15981e019..71bdcf06b4 100644
--- a/hw/arm/nrf51_soc.c
+++ b/hw/arm/nrf51_soc.c
@@ -15,7 +15,6 @@
 #include "hw/misc/unimp.h"
 #include "exec/address-spaces.h"
 #include "qemu/log.h"
-#include "cpu.h"
 
 #include "hw/arm/nrf51.h"
 #include "hw/arm/nrf51_soc.h"
diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c
index 6ccb61c149..0cf9895ce7 100644
--- a/hw/arm/orangepi.c
+++ b/hw/arm/orangepi.c
@@ -21,7 +21,6 @@
 #include "qemu/units.h"
 #include "exec/address-spaces.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
 #include "hw/arm/allwinner-h3.h"
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 1b7e9c4cb4..b30a17871f 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -16,7 +16,6 @@
 #include "qemu/units.h"
 #include "qemu/cutils.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/arm/bcm2836.h"
 #include "hw/registerfields.h"
 #include "qemu/error-report.h"
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index 27292ec411..8b4dab9b79 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -27,7 +27,6 @@
 #include "migration/vmstate.h"
 #include "hw/misc/unimp.h"
 #include "hw/qdev-clock.h"
-#include "cpu.h"
 #include "qom/object.h"
 
 #define GPIO_A 0
diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c
index a9db25eb99..6c6cb02e86 100644
--- a/hw/arm/xlnx-zcu102.c
+++ b/hw/arm/xlnx-zcu102.c
@@ -17,7 +17,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/arm/xlnx-zynqmp.h"
 #include "hw/boards.h"
 #include "qemu/error-report.h"
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index 7f01284a5c..6c93dcb820 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -18,7 +18,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "cpu.h"
 #include "hw/arm/xlnx-zynqmp.h"
 #include "hw/intc/arm_gic_common.h"
 #include "hw/boards.h"
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
index 79eaa2fa52..91eae1a598 100644
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -2,7 +2,6 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "migration/vmstate.h"
 #include "chardev/char-fe.h"
 #include "hw/ppc/spapr.h"
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index 2ad004430e..a36c96608f 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -8,7 +8,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "hw/boards.h"
 #include "qapi/error.h"
 #include "qapi/qapi-builtin-visit.h"
diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
index 5b82c9440d..bd97e0c51d 100644
--- a/hw/hppa/dino.c
+++ b/hw/hppa/dino.c
@@ -14,7 +14,6 @@
 #include "qemu/module.h"
 #include "qemu/units.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
index a8f5defcd0..408af9ccb7 100644
--- a/hw/hppa/lasi.c
+++ b/hw/hppa/lasi.c
@@ -13,7 +13,6 @@
 #include "qemu/units.h"
 #include "qemu/log.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "trace.h"
 #include "hw/irq.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/i386/kvm/apic.c b/hw/i386/kvm/apic.c
index 3dbff2be2e..52ff490910 100644
--- a/hw/i386/kvm/apic.c
+++ b/hw/i386/kvm/apic.c
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/module.h"
-#include "cpu.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/pci/msi.h"
 #include "sysemu/hw_accel.h"
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 51872dd84c..efbc1e0d12 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -14,7 +14,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "qemu/host-utils.h"
 #include "qemu/module.h"
 #include "sysemu/kvm.h"
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 46315445d2..43f8a8f679 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -11,7 +11,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/module.h"
-#include "cpu.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/cpus.h"
 #include "sysemu/hw_accel.h"
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index edf2b0f061..aba0c83219 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -49,7 +49,6 @@
 #include "hw/pci-host/gpex.h"
 #include "hw/usb/xhci.h"
 
-#include "cpu.h"
 #include "elf.h"
 #include "kvm/kvm_i386.h"
 #include "hw/xen/start_info.h"
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 541967c1b9..6d6cd65dcd 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -49,7 +49,6 @@
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
 #include "hw/acpi/acpi.h"
-#include "cpu.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "sysemu/xen.h"
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index 490a57f52c..7cc75dbc6d 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -37,7 +37,6 @@
 #include "sysemu/hw_accel.h"
 #include "sysemu/qtest.h"
 #include "qemu/log.h"
-#include "cpu.h"
 #include "trace.h"
 #include "qom/object.h"
 
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
index f4f50f974e..3df11c34d6 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
@@ -17,7 +17,6 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>
  */
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "qemu/thread.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/i386/apic.h"
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index 97dd96dffa..2a20982066 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -22,7 +22,6 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "qapi/visitor.h"
 #include "hw/i386/apic.h"
 #include "hw/i386/apic_internal.h"
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
index 49f79a8674..7d2a13273a 100644
--- a/hw/intc/arm_gic_kvm.c
+++ b/hw/intc/arm_gic_kvm.c
@@ -22,7 +22,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "cpu.h"
 #include "migration/blocker.h"
 #include "sysemu/kvm.h"
 #include "kvm_arm.h"
diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index 0d8426dafc..c4287d82d8 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
 #include "qemu/timer.h"
diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c
index 984334fa7b..3bfe2544b7 100644
--- a/hw/intc/grlib_irqmp.c
+++ b/hw/intc/grlib_irqmp.c
@@ -27,7 +27,6 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
-#include "cpu.h"
 
 #include "hw/qdev-properties.h"
 #include "hw/sparc/grlib.h"
diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
index e1a39e33cb..16badace8b 100644
--- a/hw/intc/openpic_kvm.c
+++ b/hw/intc/openpic_kvm.c
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include <sys/ioctl.h>
 #include "exec/address-spaces.h"
 #include "hw/ppc/openpic.h"
diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
index aacdb1bbc2..74e02858d4 100644
--- a/hw/intc/s390_flic.c
+++ b/hw/intc/s390_flic.c
@@ -20,7 +20,6 @@
 #include "hw/qdev-properties.h"
 #include "hw/s390x/css.h"
 #include "trace.h"
-#include "cpu.h"
 #include "qapi/error.h"
 #include "hw/s390x/s390-virtio-ccw.h"
 
diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
index d1c8fb8016..929cfa3a68 100644
--- a/hw/intc/s390_flic_kvm.c
+++ b/hw/intc/s390_flic_kvm.c
@@ -11,7 +11,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "kvm_s390x.h"
 #include <sys/ioctl.h>
 #include "qemu/error-report.h"
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 68f9d44feb..48a835eab7 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "trace.h"
 #include "qemu/timer.h"
 #include "hw/ppc/xics.h"
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index 570d635bcc..f5bfc501bc 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -28,7 +28,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu-common.h"
-#include "cpu.h"
 #include "trace.h"
 #include "sysemu/kvm.h"
 #include "hw/ppc/spapr.h"
diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c
index 8ae4f41459..37b2d99977 100644
--- a/hw/intc/xics_spapr.c
+++ b/hw/intc/xics_spapr.c
@@ -26,7 +26,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "trace.h"
 #include "qemu/timer.h"
 #include "hw/ppc/spapr.h"
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index 92b45d760f..5bd4f2d832 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -10,7 +10,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "exec/hwaddr.h"
 #include "exec/address-spaces.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index 1d6573bc63..16f7f84d34 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -29,7 +29,6 @@
 #include "qemu/cutils.h"
 #include "qemu/datadir.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "elf.h"
 #include "kvm_mips.h"
 #include "hw/char/serial.h"
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 5adb67ad2a..459791414a 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -27,7 +27,6 @@
 #include "qemu/bitops.h"
 #include "qemu-common.h"
 #include "qemu/datadir.h"
-#include "cpu.h"
 #include "hw/clock.h"
 #include "hw/southbridge/piix.h"
 #include "hw/isa/superio.h"
diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c
index 0f9c6f07c1..2db5e10fe0 100644
--- a/hw/mips/mips_int.c
+++ b/hw/mips/mips_int.c
@@ -24,7 +24,6 @@
 #include "qemu/main-loop.h"
 #include "hw/irq.h"
 #include "hw/mips/cpudevs.h"
-#include "cpu.h"
 #include "sysemu/kvm.h"
 #include "kvm_mips.h"
 
diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c
index f5d0da05aa..2e0d4aceed 100644
--- a/hw/mips/mipssim.c
+++ b/hw/mips/mipssim.c
@@ -29,7 +29,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "qemu/datadir.h"
-#include "cpu.h"
 #include "hw/clock.h"
 #include "hw/mips/mips.h"
 #include "hw/mips/cpudevs.h"
diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c
index 133399598f..80683fed31 100644
--- a/hw/misc/mips_itu.c
+++ b/hw/misc/mips_itu.c
@@ -22,7 +22,6 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "exec/exec-all.h"
 #include "hw/misc/mips_itu.h"
 #include "hw/qdev-properties.h"
diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
index 10e85a4556..a6876a936d 100644
--- a/hw/net/spapr_llan.c
+++ b/hw/net/spapr_llan.c
@@ -26,7 +26,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "net/net.h"
diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c
index a14fc31e86..3d1205b8bd 100644
--- a/hw/nios2/10m50_devboard.c
+++ b/hw/nios2/10m50_devboard.c
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 
 #include "hw/sysbus.h"
 #include "hw/char/serial.h"
diff --git a/hw/nios2/boot.c b/hw/nios2/boot.c
index 95bdc18052..5b3e4efed5 100644
--- a/hw/nios2/boot.c
+++ b/hw/nios2/boot.c
@@ -32,7 +32,6 @@
 #include "qemu/units.h"
 #include "qemu-common.h"
 #include "qemu/datadir.h"
-#include "cpu.h"
 #include "qemu/option.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
diff --git a/hw/nios2/generic_nommu.c b/hw/nios2/generic_nommu.c
index b70a42dc2f..fbc18dbd04 100644
--- a/hw/nios2/generic_nommu.c
+++ b/hw/nios2/generic_nommu.c
@@ -29,7 +29,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu-common.h"
-#include "cpu.h"
 
 #include "hw/char/serial.h"
 #include "hw/boards.h"
diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c
index 3bb4654c58..fbfdf47e26 100644
--- a/hw/nvram/spapr_nvram.c
+++ b/hw/nvram/spapr_nvram.c
@@ -26,7 +26,6 @@
 #include "qemu/module.h"
 #include "qemu/units.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include <libfdt.h>
 
 #include "sysemu/block-backend.h"
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
index bf28d6bfc8..7375bf4fa9 100644
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "hw/irq.h"
 #include "hw/ppc/ppc.h"
 #include "hw/ppc/ppc_e500.h"
diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c
index f6f89058ab..96a1fe06c3 100644
--- a/hw/ppc/ppc440_uc.c
+++ b/hw/ppc/ppc440_uc.c
@@ -14,7 +14,6 @@
 #include "qapi/error.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
-#include "cpu.h"
 #include "hw/irq.h"
 #include "exec/address-spaces.h"
 #include "exec/memory.h"
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index b41570c747..e8dc128308 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "hw/rtc/m48t59.h"
 #include "hw/char/serial.h"
 #include "hw/block/fdc.h"
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index 9e16505fa1..b8c2f3daf7 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -13,7 +13,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qnull.h"
-#include "cpu.h"
 #include "qemu/cutils.h"
 #include "hw/ppc/spapr_drc.h"
 #include "qom/object.h"
diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
index d51daedfa6..0cfc19be19 100644
--- a/hw/ppc/spapr_events.c
+++ b/hw/ppc/spapr_events.c
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "sysemu/device_tree.h"
 #include "sysemu/runstate.h"
 
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 7b5cd3553c..2a464a42e6 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -7,7 +7,6 @@
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/error-report.h"
-#include "cpu.h"
 #include "exec/exec-all.h"
 #include "helper_regs.h"
 #include "hw/ppc/spapr.h"
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index feba18cb12..4effe23a18 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -25,7 +25,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c
index e0547b1740..7817cf72ee 100644
--- a/hw/ppc/spapr_pci_vfio.c
+++ b/hw/ppc/spapr_pci_vfio.c
@@ -19,7 +19,6 @@
 
 #include "qemu/osdep.h"
 #include <linux/vfio.h>
-#include "cpu.h"
 #include "hw/ppc/spapr.h"
 #include "hw/pci-host/spapr.h"
 #include "hw/pci/msix.h"
diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c
index d14800e9de..df5c4b9687 100644
--- a/hw/ppc/spapr_rng.c
+++ b/hw/ppc/spapr_rng.c
@@ -19,7 +19,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "qemu/error-report.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
index fb64be1150..59dbea4e22 100644
--- a/hw/ppc/spapr_rtas.c
+++ b/hw/ppc/spapr_rtas.c
@@ -26,7 +26,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "qemu/log.h"
 #include "qemu/error-report.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/ppc/spapr_rtas_ddw.c b/hw/ppc/spapr_rtas_ddw.c
index 3501b05819..3e826e1308 100644
--- a/hw/ppc/spapr_rtas_ddw.c
+++ b/hw/ppc/spapr_rtas_ddw.c
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "hw/ppc/spapr.h"
diff --git a/hw/ppc/spapr_rtc.c b/hw/ppc/spapr_rtc.c
index 68cfc578a3..fba4dfca35 100644
--- a/hw/ppc/spapr_rtc.c
+++ b/hw/ppc/spapr_rtc.c
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "cpu.h"
 #include "qemu/timer.h"
 #include "sysemu/sysemu.h"
 #include "hw/ppc/spapr.h"
diff --git a/hw/ppc/spapr_tpm_proxy.c b/hw/ppc/spapr_tpm_proxy.c
index a01f81f9e0..2454086744 100644
--- a/hw/ppc/spapr_tpm_proxy.c
+++ b/hw/ppc/spapr_tpm_proxy.c
@@ -15,7 +15,6 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "sysemu/reset.h"
-#include "cpu.h"
 #include "hw/ppc/spapr.h"
 #include "hw/qdev-properties.h"
 #include "trace.h"
diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c
index af1fa6f5aa..3649919f66 100644
--- a/hw/remote/proxy-memory-listener.c
+++ b/hw/remote/proxy-memory-listener.c
@@ -14,7 +14,6 @@
 #include "qemu/range.h"
 #include "exec/memory.h"
 #include "exec/cpu-common.h"
-#include "cpu.h"
 #include "exec/ram_addr.h"
 #include "exec/address-spaces.h"
 #include "qapi/error.h"
diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
index 1f53fdb082..b52d76b9b6 100644
--- a/hw/rx/rx-gdbsim.c
+++ b/hw/rx/rx-gdbsim.c
@@ -21,7 +21,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qemu-common.h"
-#include "cpu.h"
 #include "hw/loader.h"
 #include "hw/rx/rx62n.h"
 #include "sysemu/qtest.h"
diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c
index 31ddccf2cd..fa5add9f9d 100644
--- a/hw/rx/rx62n.c
+++ b/hw/rx/rx62n.c
@@ -28,7 +28,6 @@
 #include "hw/sysbus.h"
 #include "hw/qdev-properties.h"
 #include "sysemu/sysemu.h"
-#include "cpu.h"
 #include "qom/object.h"
 
 /*
diff --git a/hw/s390x/3270-ccw.c b/hw/s390x/3270-ccw.c
index f3e7342b1e..25e628f575 100644
--- a/hw/s390x/3270-ccw.c
+++ b/hw/s390x/3270-ccw.c
@@ -13,7 +13,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "cpu.h"
 #include "hw/s390x/css.h"
 #include "hw/s390x/css-bridge.h"
 #include "hw/qdev-properties.h"
diff --git a/hw/s390x/css-bridge.c b/hw/s390x/css-bridge.c
index 9d793d671e..191b29f077 100644
--- a/hw/s390x/css-bridge.c
+++ b/hw/s390x/css-bridge.c
@@ -20,7 +20,6 @@
 #include "hw/s390x/css.h"
 #include "ccw-device.h"
 #include "hw/s390x/css-bridge.h"
-#include "cpu.h"
 
 /*
  * Invoke device-specific unplug handler, disable the subchannel
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 4149b8e5a7..bed46f5ec3 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -15,7 +15,6 @@
 #include "qemu/bitops.h"
 #include "qemu/error-report.h"
 #include "exec/address-spaces.h"
-#include "cpu.h"
 #include "hw/s390x/ioinst.h"
 #include "hw/qdev-properties.h"
 #include "hw/s390x/css.h"
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index f12af5e35b..8c863cf386 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -19,7 +19,6 @@
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
 #include "sysemu/tcg.h"
-#include "cpu.h"
 #include "elf.h"
 #include "hw/loader.h"
 #include "hw/qdev-properties.h"
diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c
index 93eccfc05d..401b63d6cb 100644
--- a/hw/s390x/pv.c
+++ b/hw/s390x/pv.c
@@ -13,7 +13,6 @@
 
 #include <linux/kvm.h>
 
-#include "cpu.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "sysemu/kvm.h"
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index dd138dae94..7db1c5943f 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -14,7 +14,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
-#include "cpu.h"
 #include "hw/s390x/s390-pci-bus.h"
 #include "hw/s390x/s390-pci-inst.h"
 #include "hw/s390x/s390-pci-vfio.h"
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index 4b8326afa4..9ec277d50e 100644
--- a/hw/s390x/s390-pci-inst.c
+++ b/hw/s390x/s390-pci-inst.c
@@ -12,7 +12,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "exec/memop.h"
 #include "exec/memory-internal.h"
 #include "qemu/error-report.h"
diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c
index f89d8d9d16..f0b11a74e4 100644
--- a/hw/s390x/s390-stattrib-kvm.c
+++ b/hw/s390x/s390-stattrib-kvm.c
@@ -16,7 +16,6 @@
 #include "qemu/error-report.h"
 #include "sysemu/kvm.h"
 #include "exec/ram_addr.h"
-#include "cpu.h"
 #include "kvm_s390x.h"
 
 Object *kvm_s390_stattrib_create(void)
diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c
index 4441e1d331..9eda1c3b2a 100644
--- a/hw/s390x/s390-stattrib.c
+++ b/hw/s390x/s390-stattrib.c
@@ -11,7 +11,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/units.h"
-#include "cpu.h"
 #include "migration/qemu-file.h"
 #include "migration/register.h"
 #include "hw/s390x/storage-attributes.h"
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index f0dbbc9f4c..41f10e3ff5 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -13,7 +13,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "exec/address-spaces.h"
 #include "exec/ram_addr.h"
 #include "hw/s390x/s390-virtio-hcall.h"
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index f57340a7d7..edb6e3ea01 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -15,7 +15,6 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "hw/boards.h"
 #include "hw/s390x/sclp.h"
 #include "hw/s390x/event-facility.h"
diff --git a/hw/s390x/sclpcpu.c b/hw/s390x/sclpcpu.c
index 62806d3273..f2b1a4b037 100644
--- a/hw/s390x/sclpcpu.c
+++ b/hw/s390x/sclpcpu.c
@@ -17,7 +17,6 @@
 #include "hw/s390x/sclp.h"
 #include "qemu/module.h"
 #include "hw/s390x/event-facility.h"
-#include "cpu.h"
 #include "sysemu/cpus.h"
 
 typedef struct ConfigMgtData {
diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
index ca5c13c4a8..c210262484 100644
--- a/hw/scsi/spapr_vscsi.c
+++ b/hw/scsi/spapr_vscsi.c
@@ -34,7 +34,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/module.h"
-#include "cpu.h"
 #include "hw/scsi/scsi.h"
 #include "migration/vmstate.h"
 #include "scsi/constants.h"
diff --git a/hw/sh4/sh7750.c b/hw/sh4/sh7750.c
index f8ac3ec6e3..d53a436d8c 100644
--- a/hw/sh4/sh7750.c
+++ b/hw/sh4/sh7750.c
@@ -31,7 +31,6 @@
 #include "sh7750_regnames.h"
 #include "hw/sh4/sh_intc.h"
 #include "hw/timer/tmu012.h"
-#include "cpu.h"
 #include "exec/exec-all.h"
 
 #define NB_DEVICES 4
diff --git a/hw/tricore/tc27x_soc.c b/hw/tricore/tc27x_soc.c
index dcccdba786..d66d6980c3 100644
--- a/hw/tricore/tc27x_soc.c
+++ b/hw/tricore/tc27x_soc.c
@@ -25,7 +25,6 @@
 #include "qemu/units.h"
 #include "hw/misc/unimp.h"
 #include "exec/address-spaces.h"
-#include "cpu.h"
 
 #include "hw/tricore/tc27x_soc.h"
 #include "hw/tricore/triboard.h"
diff --git a/hw/tricore/triboard.c b/hw/tricore/triboard.c
index f8d5f7a787..943f706989 100644
--- a/hw/tricore/triboard.c
+++ b/hw/tricore/triboard.c
@@ -22,7 +22,6 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 #include "hw/qdev-properties.h"
-#include "cpu.h"
 #include "net/net.h"
 #include "hw/loader.h"
 #include "exec/address-spaces.h"
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index f9dbec37da..4b32aca1a0 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -21,7 +21,6 @@
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "qemu/config-file.h"
-#include "cpu.h"
 #include "kvm_s390x.h"
 #include "migration/vmstate.h"
 #include "hw/qdev-properties.h"
diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
index 384576cfc0..201642d75e 100644
--- a/hw/vfio/migration.c
+++ b/hw/vfio/migration.c
@@ -15,7 +15,6 @@
 
 #include "sysemu/runstate.h"
 #include "hw/vfio/vfio-common.h"
-#include "cpu.h"
 #include "migration/migration.h"
 #include "migration/vmstate.h"
 #include "migration/qemu-file.h"
diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c
index 2900bd1941..ea3f70bd2f 100644
--- a/hw/vfio/spapr.c
+++ b/hw/vfio/spapr.c
@@ -9,7 +9,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include <sys/ioctl.h>
 #include <linux/vfio.h>
 
diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
index cbac50db2d..c38e522b02 100644
--- a/hw/xtensa/sim.c
+++ b/hw/xtensa/sim.c
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c
index bbf6200c49..18d3c3cdb2 100644
--- a/hw/xtensa/virt.c
+++ b/hw/xtensa/virt.c
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "sysemu/reset.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
diff --git a/hw/xtensa/xtensa_memory.c b/hw/xtensa/xtensa_memory.c
index 1c5f62b014..2c1095f017 100644
--- a/hw/xtensa/xtensa_memory.c
+++ b/hw/xtensa/xtensa_memory.c
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "exec/memory.h"
 #include "qemu/error-report.h"
 #include "xtensa_memory.h"
diff --git a/linux-user/main.c b/linux-user/main.c
index f956afccab..57ba1b45ab 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -38,7 +38,6 @@
 #include "qemu/help_option.h"
 #include "qemu/module.h"
 #include "qemu/plugin.h"
-#include "cpu.h"
 #include "exec/exec-all.h"
 #include "tcg/tcg.h"
 #include "qemu/timer.h"
diff --git a/linux-user/semihost.c b/linux-user/semihost.c
index 82013b8b48..f53ab526fb 100644
--- a/linux-user/semihost.c
+++ b/linux-user/semihost.c
@@ -11,7 +11,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "semihosting/console.h"
 #include "qemu.h"
 #include <termios.h>
diff --git a/migration/ram.c b/migration/ram.c
index 9e9b7380bf..ace8ad431c 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -27,7 +27,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "qemu/cutils.h"
 #include "qemu/bitops.h"
 #include "qemu/bitmap.h"
diff --git a/monitor/misc.c b/monitor/misc.c
index 55f3744053..f3a393ea59 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "monitor-internal.h"
-#include "cpu.h"
 #include "monitor/qdev.h"
 #include "hw/usb.h"
 #include "hw/pci/pci.h"
diff --git a/plugins/api.c b/plugins/api.c
index 218e1342cd..817c9b6b69 100644
--- a/plugins/api.c
+++ b/plugins/api.c
@@ -36,7 +36,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/plugin.h"
-#include "cpu.h"
 #include "tcg/tcg.h"
 #include "exec/exec-all.h"
 #include "exec/ram_addr.h"
diff --git a/plugins/core.c b/plugins/core.c
index 93b595a8d6..55d188af51 100644
--- a/plugins/core.c
+++ b/plugins/core.c
@@ -23,7 +23,6 @@
 #include "hw/core/cpu.h"
 #include "exec/cpu-common.h"
 
-#include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
 #include "tcg/tcg.h"
diff --git a/plugins/loader.c b/plugins/loader.c
index 8550e61184..05df40398d 100644
--- a/plugins/loader.c
+++ b/plugins/loader.c
@@ -27,7 +27,6 @@
 #include "qemu/xxhash.h"
 #include "qemu/plugin.h"
 #include "hw/core/cpu.h"
-#include "cpu.h"
 #include "exec/exec-all.h"
 #ifndef CONFIG_USER_ONLY
 #include "hw/boards.h"
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c
index f9c87245b8..1c29146dcf 100644
--- a/semihosting/arm-compat-semi.c
+++ b/semihosting/arm-compat-semi.c
@@ -33,7 +33,6 @@
 
 #include "qemu/osdep.h"
 
-#include "cpu.h"
 #include "semihosting/semihost.h"
 #include "semihosting/console.h"
 #include "semihosting/common-semi.h"
diff --git a/semihosting/console.c b/semihosting/console.c
index a78af69387..ef6958d844 100644
--- a/semihosting/console.c
+++ b/semihosting/console.c
@@ -16,7 +16,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "semihosting/semihost.h"
 #include "semihosting/console.h"
 #include "exec/gdbstub.h"
diff --git a/softmmu/arch_init.c b/softmmu/arch_init.c
index 8471711c54..f09bab830c 100644
--- a/softmmu/arch_init.c
+++ b/softmmu/arch_init.c
@@ -22,7 +22,6 @@
  * THE SOFTWARE.
  */
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "sysemu/arch_init.h"
 #include "hw/pci/pci.h"
 #include "hw/audio/soundhw.h"
diff --git a/softmmu/memory.c b/softmmu/memory.c
index d4493ef9e4..a62816647b 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -16,7 +16,6 @@
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "qapi/error.h"
-#include "cpu.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
 #include "qapi/visitor.h"
diff --git a/softmmu/memory_mapping.c b/softmmu/memory_mapping.c
index 18d0b8067c..e7af276546 100644
--- a/softmmu/memory_mapping.c
+++ b/softmmu/memory_mapping.c
@@ -14,7 +14,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 
-#include "cpu.h"
 #include "sysemu/memory_mapping.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 7ed276b9b5..1821882614 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -23,7 +23,6 @@
 
 #include "qemu/cutils.h"
 #include "qemu/cacheflush.h"
-#include "cpu.h"
 
 #ifdef CONFIG_TCG
 #include "hw/core/tcg-cpu-ops.h"
diff --git a/tcg/tcg-op-vec.c b/tcg/tcg-op-vec.c
index d19aa7373e..15e026ae49 100644
--- a/tcg/tcg-op-vec.c
+++ b/tcg/tcg-op-vec.c
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "tcg/tcg.h"
 #include "tcg/tcg-op.h"
 #include "tcg/tcg-mo.h"
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index 70475773f4..dcc2ed0bbc 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "cpu.h"
 #include "exec/exec-all.h"
 #include "tcg/tcg.h"
 #include "tcg/tcg-op.h"
diff --git a/tcg/tcg.c b/tcg/tcg.c
index cc947bf6f6..db806a6658 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -41,7 +41,6 @@
    CPU definitions. Currently they are used for qemu_ld/st
    instructions */
 #define NO_CPU_IO_DEFS
-#include "cpu.h"
 
 #include "exec/exec-all.h"
 
-- 
2.27.0



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

* [PATCH 4/4] Do not include exec/address-spaces.h if it's not really necessary
  2021-04-16 17:13 [PATCH for-6.1 0/4] Remove more superfluous include statements Thomas Huth
                   ` (2 preceding siblings ...)
  2021-04-16 17:13 ` [PATCH 3/4] Do not include cpu.h " Thomas Huth
@ 2021-04-16 17:13 ` Thomas Huth
  2021-04-30 15:59   ` Laurent Vivier
  3 siblings, 1 reply; 12+ messages in thread
From: Thomas Huth @ 2021-04-16 17:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Stop including exec/address-spaces.h in files that don't need it.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 accel/kvm/kvm-all.c               | 1 -
 accel/tcg/cputlb.c                | 1 -
 hw/acpi/generic_event_device.c    | 1 -
 hw/acpi/ich9.c                    | 1 -
 hw/acpi/pcihp.c                   | 1 -
 hw/acpi/piix4.c                   | 1 -
 hw/alpha/typhoon.c                | 1 -
 hw/arm/allwinner-a10.c            | 1 -
 hw/arm/allwinner-h3.c             | 1 -
 hw/arm/armv7m.c                   | 1 -
 hw/arm/aspeed.c                   | 1 -
 hw/arm/aspeed_ast2600.c           | 1 -
 hw/arm/aspeed_soc.c               | 1 -
 hw/arm/boot.c                     | 1 -
 hw/arm/cubieboard.c               | 1 -
 hw/arm/digic_boards.c             | 1 -
 hw/arm/fsl-imx25.c                | 1 -
 hw/arm/highbank.c                 | 1 -
 hw/arm/imx25_pdk.c                | 1 -
 hw/arm/musicpal.c                 | 1 -
 hw/arm/npcm7xx.c                  | 1 -
 hw/arm/npcm7xx_boards.c           | 1 -
 hw/arm/nrf51_soc.c                | 1 -
 hw/arm/nseries.c                  | 1 -
 hw/arm/palm.c                     | 1 -
 hw/arm/realview.c                 | 1 -
 hw/arm/sbsa-ref.c                 | 1 -
 hw/arm/smmu-common.c              | 1 -
 hw/arm/smmuv3.c                   | 1 -
 hw/arm/versatilepb.c              | 1 -
 hw/arm/vexpress.c                 | 1 -
 hw/arm/virt.c                     | 1 -
 hw/arm/xilinx_zynq.c              | 1 -
 hw/arm/xlnx-versal-virt.c         | 1 -
 hw/arm/xlnx-zynqmp.c              | 1 -
 hw/char/mchp_pfsoc_mmuart.c       | 1 -
 hw/core/loader.c                  | 1 -
 hw/cris/axis_dev88.c              | 1 -
 hw/dma/pl080.c                    | 1 -
 hw/hppa/dino.c                    | 1 -
 hw/hppa/lasi.c                    | 1 -
 hw/i386/intel_iommu.c             | 1 -
 hw/i386/pc.c                      | 1 -
 hw/i386/pc_piix.c                 | 1 -
 hw/i386/pc_q35.c                  | 1 -
 hw/i386/xen/xen-hvm.c             | 1 -
 hw/i386/xen/xen_platform.c        | 1 -
 hw/intc/openpic_kvm.c             | 1 -
 hw/isa/lpc_ich9.c                 | 1 -
 hw/isa/vt82c686.c                 | 1 -
 hw/lm32/lm32_boards.c             | 1 -
 hw/lm32/milkymist.c               | 1 -
 hw/m68k/an5206.c                  | 1 -
 hw/m68k/mcf5208.c                 | 1 -
 hw/m68k/next-cube.c               | 1 -
 hw/m68k/next-kbd.c                | 1 -
 hw/m68k/q800.c                    | 1 -
 hw/m68k/virt.c                    | 1 -
 hw/mem/sparse-mem.c               | 1 -
 hw/mips/boston.c                  | 1 -
 hw/mips/fuloong2e.c               | 1 -
 hw/mips/gt64xxx_pci.c             | 1 -
 hw/mips/jazz.c                    | 1 -
 hw/mips/loongson3_virt.c          | 1 -
 hw/mips/malta.c                   | 1 -
 hw/mips/mipssim.c                 | 1 -
 hw/moxie/moxiesim.c               | 1 -
 hw/net/msf2-emac.c                | 1 -
 hw/nvram/nrf51_nvm.c              | 1 -
 hw/openrisc/openrisc_sim.c        | 1 -
 hw/pci-host/bonito.c              | 1 -
 hw/pci-host/ppce500.c             | 1 -
 hw/pci-host/prep.c                | 1 -
 hw/pci-host/sabre.c               | 1 -
 hw/pci-host/sh_pci.c              | 1 -
 hw/pci/pci.c                      | 1 -
 hw/pci/pcie_host.c                | 1 -
 hw/ppc/e500.c                     | 1 -
 hw/ppc/mac_newworld.c             | 1 -
 hw/ppc/mac_oldworld.c             | 1 -
 hw/ppc/pnv.c                      | 1 -
 hw/ppc/pnv_psi.c                  | 1 -
 hw/ppc/ppc405_boards.c            | 1 -
 hw/ppc/ppc440_bamboo.c            | 1 -
 hw/ppc/ppc440_pcix.c              | 1 -
 hw/ppc/ppc440_uc.c                | 1 -
 hw/ppc/ppc4xx_pci.c               | 1 -
 hw/ppc/prep.c                     | 1 -
 hw/ppc/sam460ex.c                 | 1 -
 hw/ppc/spapr.c                    | 1 -
 hw/ppc/spapr_iommu.c              | 1 -
 hw/ppc/spapr_pci.c                | 1 -
 hw/ppc/virtex_ml507.c             | 1 -
 hw/remote/machine.c               | 1 -
 hw/remote/memory.c                | 1 -
 hw/remote/proxy-memory-listener.c | 1 -
 hw/riscv/opentitan.c              | 1 -
 hw/riscv/sifive_e.c               | 1 -
 hw/rtc/m48t59.c                   | 1 -
 hw/rtc/mc146818rtc.c              | 1 -
 hw/s390x/s390-virtio-ccw.c        | 1 -
 hw/sh4/r2d.c                      | 1 -
 hw/sh4/shix.c                     | 1 -
 hw/sparc/leon3.c                  | 1 -
 hw/sparc64/niagara.c              | 1 -
 hw/ssi/aspeed_smc.c               | 1 -
 hw/tpm/tpm_crb.c                  | 1 -
 hw/tricore/tc27x_soc.c            | 1 -
 hw/tricore/triboard.c             | 1 -
 hw/tricore/tricore_testboard.c    | 1 -
 hw/virtio/vhost.c                 | 1 -
 hw/virtio/virtio.c                | 1 -
 hw/xen/xen_pt.c                   | 1 -
 hw/xtensa/sim.c                   | 1 -
 hw/xtensa/virt.c                  | 1 -
 hw/xtensa/xtfpga.c                | 1 -
 softmmu/memory.c                  | 1 -
 softmmu/physmem.c                 | 1 -
 target/i386/hvf/hvf.c             | 1 -
 target/i386/hvf/x86_mmu.c         | 1 -
 target/i386/sev.c                 | 1 -
 target/s390x/diag.c               | 1 -
 target/xtensa/op_helper.c         | 1 -
 tests/qtest/fuzz/generic_fuzz.c   | 2 --
 tests/qtest/fuzz/qos_fuzz.c       | 1 -
 125 files changed, 126 deletions(-)

diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index f42b743977..e51ff2f611 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -33,7 +33,6 @@
 #include "qemu/bswap.h"
 #include "exec/memory.h"
 #include "exec/ram_addr.h"
-#include "exec/address-spaces.h"
 #include "qemu/event_notifier.h"
 #include "qemu/main-loop.h"
 #include "trace.h"
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 502f803e5e..84e7d91a5c 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -22,7 +22,6 @@
 #include "hw/core/tcg-cpu-ops.h"
 #include "exec/exec-all.h"
 #include "exec/memory.h"
-#include "exec/address-spaces.h"
 #include "exec/cpu_ldst.h"
 #include "exec/cputlb.h"
 #include "exec/tb-hash.h"
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
index 5454be67d5..39c825763a 100644
--- a/hw/acpi/generic_event_device.c
+++ b/hw/acpi/generic_event_device.c
@@ -11,7 +11,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "exec/address-spaces.h"
 #include "hw/acpi/acpi.h"
 #include "hw/acpi/generic_event_device.h"
 #include "hw/irq.h"
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 853447cf9d..4daa79ec8d 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -35,7 +35,6 @@
 #include "sysemu/runstate.h"
 #include "hw/acpi/acpi.h"
 #include "hw/acpi/tco.h"
-#include "exec/address-spaces.h"
 
 #include "hw/i386/ich9.h"
 #include "hw/mem/pc-dimm.h"
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
index f4cb3c979d..4999277d57 100644
--- a/hw/acpi/pcihp.c
+++ b/hw/acpi/pcihp.c
@@ -31,7 +31,6 @@
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bridge.h"
 #include "hw/acpi/acpi.h"
-#include "exec/address-spaces.h"
 #include "hw/pci/pci_bus.h"
 #include "migration/vmstate.h"
 #include "qapi/error.h"
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 8f8b0e95e5..0bd23d74e2 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -33,7 +33,6 @@
 #include "sysemu/xen.h"
 #include "qapi/error.h"
 #include "qemu/range.h"
-#include "exec/address-spaces.h"
 #include "hw/acpi/pcihp.h"
 #include "hw/acpi/cpu_hotplug.h"
 #include "hw/acpi/cpu.h"
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
index 96c35c5fdb..87020cbe0d 100644
--- a/hw/alpha/typhoon.c
+++ b/hw/alpha/typhoon.c
@@ -13,7 +13,6 @@
 #include "cpu.h"
 #include "hw/irq.h"
 #include "alpha_sys.h"
-#include "exec/address-spaces.h"
 #include "qom/object.h"
 
 
diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
index 0844a65641..05e84728cb 100644
--- a/hw/arm/allwinner-a10.c
+++ b/hw/arm/allwinner-a10.c
@@ -16,7 +16,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "exec/address-spaces.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
 #include "hw/sysbus.h"
diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c
index bbe65d1860..27f1070145 100644
--- a/hw/arm/allwinner-h3.c
+++ b/hw/arm/allwinner-h3.c
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "exec/address-spaces.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index caeed29670..af0d935bf7 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -18,7 +18,6 @@
 #include "sysemu/reset.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
-#include "exec/address-spaces.h"
 #include "target/arm/idau.h"
 
 /* Bitbanded IO.  Each word corresponds to a single bit.  */
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
index 7480533cb7..b623226cdf 100644
--- a/hw/arm/aspeed.c
+++ b/hw/arm/aspeed.c
@@ -11,7 +11,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "exec/address-spaces.h"
 #include "hw/arm/boot.h"
 #include "hw/arm/aspeed.h"
 #include "hw/arm/aspeed_soc.h"
diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
index 8e4ef07b14..8202b4f174 100644
--- a/hw/arm/aspeed_ast2600.c
+++ b/hw/arm/aspeed_ast2600.c
@@ -9,7 +9,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "exec/address-spaces.h"
 #include "hw/misc/unimp.h"
 #include "hw/arm/aspeed_soc.h"
 #include "hw/char/serial.h"
diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
index fc270daa57..abc90ed8ec 100644
--- a/hw/arm/aspeed_soc.c
+++ b/hw/arm/aspeed_soc.c
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "exec/address-spaces.h"
 #include "hw/misc/unimp.h"
 #include "hw/arm/aspeed_soc.h"
 #include "hw/char/serial.h"
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index e56c42ac22..d7b059225e 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -25,7 +25,6 @@
 #include "sysemu/device_tree.h"
 #include "qemu/config-file.h"
 #include "qemu/option.h"
-#include "exec/address-spaces.h"
 #include "qemu/units.h"
 
 /* Kernel boot protocol is specified in the kernel docs
diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
index d7184e5ec2..294ba5de6e 100644
--- a/hw/arm/cubieboard.c
+++ b/hw/arm/cubieboard.c
@@ -16,7 +16,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "exec/address-spaces.h"
 #include "qapi/error.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index fdb6781567..b771a3d8b7 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -28,7 +28,6 @@
 #include "qemu-common.h"
 #include "qemu/datadir.h"
 #include "hw/boards.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 #include "hw/arm/digic.h"
 #include "hw/block/flash.h"
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index dafc0bef47..24c4374590 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -26,7 +26,6 @@
 #include "qapi/error.h"
 #include "hw/arm/fsl-imx25.h"
 #include "sysemu/sysemu.h"
-#include "exec/address-spaces.h"
 #include "hw/qdev-properties.h"
 #include "chardev/char.h"
 
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index bf886268c5..7a85a34a39 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -29,7 +29,6 @@
 #include "sysemu/runstate.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 #include "hw/char/pl011.h"
 #include "hw/ide/ahci.h"
diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c
index 9c58fbde57..11426e5ec0 100644
--- a/hw/arm/imx25_pdk.c
+++ b/hw/arm/imx25_pdk.c
@@ -29,7 +29,6 @@
 #include "hw/arm/fsl-imx25.h"
 #include "hw/boards.h"
 #include "qemu/error-report.h"
-#include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
 #include "hw/i2c/i2c.h"
 #include "qemu/cutils.h"
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index 7d67dc7254..2d612cc0c9 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -31,7 +31,6 @@
 #include "sysemu/block-backend.h"
 #include "sysemu/runstate.h"
 #include "sysemu/dma.h"
-#include "exec/address-spaces.h"
 #include "ui/pixel_ops.h"
 #include "qemu/cutils.h"
 #include "qom/object.h"
diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c
index 495b0f8e91..2ab0080e0b 100644
--- a/hw/arm/npcm7xx.c
+++ b/hw/arm/npcm7xx.c
@@ -16,7 +16,6 @@
 
 #include "qemu/osdep.h"
 
-#include "exec/address-spaces.h"
 #include "hw/arm/boot.h"
 #include "hw/arm/npcm7xx.h"
 #include "hw/char/serial.h"
diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
index d91d687700..d4553e3786 100644
--- a/hw/arm/npcm7xx_boards.c
+++ b/hw/arm/npcm7xx_boards.c
@@ -16,7 +16,6 @@
 
 #include "qemu/osdep.h"
 
-#include "exec/address-spaces.h"
 #include "hw/arm/npcm7xx.h"
 #include "hw/core/cpu.h"
 #include "hw/i2c/smbus_eeprom.h"
diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c
index 71bdcf06b4..9407c2f268 100644
--- a/hw/arm/nrf51_soc.c
+++ b/hw/arm/nrf51_soc.c
@@ -13,7 +13,6 @@
 #include "hw/arm/boot.h"
 #include "hw/sysbus.h"
 #include "hw/misc/unimp.h"
-#include "exec/address-spaces.h"
 #include "qemu/log.h"
 
 #include "hw/arm/nrf51.h"
diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
index 387eea4d44..0aefa5d0f3 100644
--- a/hw/arm/nseries.c
+++ b/hw/arm/nseries.c
@@ -43,7 +43,6 @@
 #include "hw/loader.h"
 #include "hw/sysbus.h"
 #include "qemu/log.h"
-#include "exec/address-spaces.h"
 
 /* Nokia N8x0 support */
 struct n800_s {
diff --git a/hw/arm/palm.c b/hw/arm/palm.c
index 4e3dc5fbbf..68e11dd1ec 100644
--- a/hw/arm/palm.c
+++ b/hw/arm/palm.c
@@ -29,7 +29,6 @@
 #include "hw/input/tsc2xxx.h"
 #include "hw/irq.h"
 #include "hw/loader.h"
-#include "exec/address-spaces.h"
 #include "cpu.h"
 #include "qemu/cutils.h"
 #include "qom/object.h"
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index 0831159d15..1c54316ba3 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -20,7 +20,6 @@
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/i2c/i2c.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 #include "hw/char/pl011.h"
 #include "hw/cpu/a9mpcore.h"
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 88dfb2284c..43c19b4923 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -27,7 +27,6 @@
 #include "sysemu/numa.h"
 #include "sysemu/runstate.h"
 #include "sysemu/sysemu.h"
-#include "exec/address-spaces.h"
 #include "exec/hwaddr.h"
 #include "kvm_arm.h"
 #include "hw/arm/boot.h"
diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
index 84d2c62c26..0459850a93 100644
--- a/hw/arm/smmu-common.c
+++ b/hw/arm/smmu-common.c
@@ -17,7 +17,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "exec/address-spaces.h"
 #include "trace.h"
 #include "exec/target_page.h"
 #include "hw/core/cpu.h"
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index 8705612535..5b51ca2dd6 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -23,7 +23,6 @@
 #include "migration/vmstate.h"
 #include "hw/qdev-core.h"
 #include "hw/pci/pci.h"
-#include "exec/address-spaces.h"
 #include "cpu.h"
 #include "trace.h"
 #include "qemu/log.h"
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index 1ea5534626..575399c4fc 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -21,7 +21,6 @@
 #include "hw/i2c/arm_sbcon_i2c.h"
 #include "hw/irq.h"
 #include "hw/boards.h"
-#include "exec/address-spaces.h"
 #include "hw/block/flash.h"
 #include "qemu/error-report.h"
 #include "hw/char/pl011.h"
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index 326a1a6db5..58481c0762 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -35,7 +35,6 @@
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
-#include "exec/address-spaces.h"
 #include "hw/block/flash.h"
 #include "sysemu/device_tree.h"
 #include "qemu/error-report.h"
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 300b3b18be..3415d55c99 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -50,7 +50,6 @@
 #include "sysemu/tpm.h"
 #include "sysemu/kvm.h"
 #include "hw/loader.h"
-#include "exec/address-spaces.h"
 #include "qemu/bitops.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index 8db6cfd47f..85f25d15db 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -22,7 +22,6 @@
 #include "hw/sysbus.h"
 #include "hw/arm/boot.h"
 #include "net/net.h"
-#include "exec/address-spaces.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/block/flash.h"
diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c
index 73e8268b35..5bca360dce 100644
--- a/hw/arm/xlnx-versal-virt.c
+++ b/hw/arm/xlnx-versal-virt.c
@@ -13,7 +13,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "sysemu/device_tree.h"
-#include "exec/address-spaces.h"
 #include "hw/boards.h"
 #include "hw/sysbus.h"
 #include "hw/arm/sysbus-fdt.h"
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index 6c93dcb820..3597e8db4d 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -21,7 +21,6 @@
 #include "hw/arm/xlnx-zynqmp.h"
 #include "hw/intc/arm_gic_common.h"
 #include "hw/boards.h"
-#include "exec/address-spaces.h"
 #include "sysemu/kvm.h"
 #include "sysemu/sysemu.h"
 #include "kvm_arm.h"
diff --git a/hw/char/mchp_pfsoc_mmuart.c b/hw/char/mchp_pfsoc_mmuart.c
index 8a002b0a19..2facf85c2d 100644
--- a/hw/char/mchp_pfsoc_mmuart.c
+++ b/hw/char/mchp_pfsoc_mmuart.c
@@ -23,7 +23,6 @@
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "chardev/char.h"
-#include "exec/address-spaces.h"
 #include "hw/char/mchp_pfsoc_mmuart.h"
 
 static uint64_t mchp_pfsoc_mmuart_read(void *opaque, hwaddr addr, unsigned size)
diff --git a/hw/core/loader.c b/hw/core/loader.c
index d3e5f3b423..5b34869a54 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -57,7 +57,6 @@
 #include "hw/loader.h"
 #include "hw/nvram/fw_cfg.h"
 #include "exec/memory.h"
-#include "exec/address-spaces.h"
 #include "hw/boards.h"
 #include "qemu/cutils.h"
 #include "sysemu/runstate.h"
diff --git a/hw/cris/axis_dev88.c b/hw/cris/axis_dev88.c
index af5a0e3517..d82050d927 100644
--- a/hw/cris/axis_dev88.c
+++ b/hw/cris/axis_dev88.c
@@ -34,7 +34,6 @@
 #include "hw/loader.h"
 #include "elf.h"
 #include "boot.h"
-#include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
 #include "sysemu/sysemu.h"
 
diff --git a/hw/dma/pl080.c b/hw/dma/pl080.c
index f1a586b1d7..2627307cc8 100644
--- a/hw/dma/pl080.c
+++ b/hw/dma/pl080.c
@@ -10,7 +10,6 @@
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
-#include "exec/address-spaces.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/dma/pl080.h"
diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
index bd97e0c51d..eab96dd84e 100644
--- a/hw/hppa/dino.c
+++ b/hw/hppa/dino.c
@@ -19,7 +19,6 @@
 #include "hw/pci/pci_bus.h"
 #include "migration/vmstate.h"
 #include "hppa_sys.h"
-#include "exec/address-spaces.h"
 #include "trace.h"
 #include "qom/object.h"
 
diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
index 408af9ccb7..88c3791eb6 100644
--- a/hw/hppa/lasi.c
+++ b/hw/hppa/lasi.c
@@ -22,7 +22,6 @@
 #include "hw/char/parallel.h"
 #include "hw/char/serial.h"
 #include "hw/input/lasips2.h"
-#include "exec/address-spaces.h"
 #include "migration/vmstate.h"
 #include "qom/object.h"
 
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 1c10643432..209b3f5553 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -24,7 +24,6 @@
 #include "qemu/main-loop.h"
 #include "qapi/error.h"
 #include "hw/sysbus.h"
-#include "exec/address-spaces.h"
 #include "intel_iommu_internal.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index b5ce3835e7..7d80c505a9 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -65,7 +65,6 @@
 #include "hw/xen/start_info.h"
 #include "ui/qemu-spice.h"
 #include "exec/memory.h"
-#include "exec/address-spaces.h"
 #include "sysemu/arch_init.h"
 #include "qemu/bitmap.h"
 #include "qemu/config-file.h"
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 6d6cd65dcd..8404d9803e 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -47,7 +47,6 @@
 #include "hw/i2c/smbus_eeprom.h"
 #include "hw/xen/xen-x86.h"
 #include "exec/memory.h"
-#include "exec/address-spaces.h"
 #include "hw/acpi/acpi.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 53450190f5..b76969fc25 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -38,7 +38,6 @@
 #include "hw/kvm/clock.h"
 #include "hw/pci-host/q35.h"
 #include "hw/qdev-properties.h"
-#include "exec/address-spaces.h"
 #include "hw/i386/x86.h"
 #include "hw/i386/pc.h"
 #include "hw/i386/ich9.h"
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
index 7ce672e5a5..c53fa17c50 100644
--- a/hw/i386/xen/xen-hvm.c
+++ b/hw/i386/xen/xen-hvm.c
@@ -33,7 +33,6 @@
 #include "sysemu/xen.h"
 #include "sysemu/xen-mapcache.h"
 #include "trace.h"
-#include "exec/address-spaces.h"
 
 #include <xen/hvm/ioreq.h>
 #include <xen/hvm/e820.h>
diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
index bf4f20e92b..72028449ba 100644
--- a/hw/i386/xen/xen_platform.c
+++ b/hw/i386/xen/xen_platform.c
@@ -31,7 +31,6 @@
 #include "migration/vmstate.h"
 #include "hw/xen/xen-legacy-backend.h"
 #include "trace.h"
-#include "exec/address-spaces.h"
 #include "sysemu/xen.h"
 #include "sysemu/block-backend.h"
 #include "qemu/error-report.h"
diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
index 16badace8b..21da680389 100644
--- a/hw/intc/openpic_kvm.c
+++ b/hw/intc/openpic_kvm.c
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include <sys/ioctl.h>
-#include "exec/address-spaces.h"
 #include "hw/ppc/openpic.h"
 #include "hw/ppc/openpic_kvm.h"
 #include "hw/pci/msi.h"
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 160bea447a..5f9de0239c 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -44,7 +44,6 @@
 #include "hw/acpi/ich9.h"
 #include "hw/pci/pci_bus.h"
 #include "hw/qdev-properties.h"
-#include "exec/address-spaces.h"
 #include "sysemu/runstate.h"
 #include "sysemu/sysemu.h"
 #include "hw/core/cpu.h"
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 98325bb32b..31b1818b21 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -30,7 +30,6 @@
 #include "qemu/module.h"
 #include "qemu/range.h"
 #include "qemu/timer.h"
-#include "exec/address-spaces.h"
 #include "trace.h"
 
 #define TYPE_VIA_PM "via-pm"
diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
index b5d97dd53e..2961e4c2b4 100644
--- a/hw/lm32/lm32_boards.c
+++ b/hw/lm32/lm32_boards.c
@@ -30,7 +30,6 @@
 #include "elf.h"
 #include "lm32_hwsetup.h"
 #include "lm32.h"
-#include "exec/address-spaces.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
 
diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
index 72d1326531..bef7855328 100644
--- a/hw/lm32/milkymist.c
+++ b/hw/lm32/milkymist.c
@@ -37,7 +37,6 @@
 #include "hw/display/milkymist_tmu2.h"
 #include "hw/sd/sd.h"
 #include "lm32.h"
-#include "exec/address-spaces.h"
 #include "qemu/cutils.h"
 
 #define BIOS_FILENAME    "mmone-bios.bin"
diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
index 673898b0ea..11ae4c9795 100644
--- a/hw/m68k/an5206.c
+++ b/hw/m68k/an5206.c
@@ -13,7 +13,6 @@
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "elf.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 #include "sysemu/qtest.h"
 
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index 7a03c71059..93812ee206 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -26,7 +26,6 @@
 #include "hw/loader.h"
 #include "hw/sysbus.h"
 #include "elf.h"
-#include "exec/address-spaces.h"
 
 #define SYS_FREQ 166666666
 
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index 5bd4f2d832..de951ffe5d 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -11,7 +11,6 @@
 
 #include "qemu/osdep.h"
 #include "exec/hwaddr.h"
-#include "exec/address-spaces.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/qtest.h"
 #include "hw/irq.h"
diff --git a/hw/m68k/next-kbd.c b/hw/m68k/next-kbd.c
index 30a8c9fbfa..0544160e91 100644
--- a/hw/m68k/next-kbd.c
+++ b/hw/m68k/next-kbd.c
@@ -29,7 +29,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
-#include "exec/address-spaces.h"
 #include "hw/sysbus.h"
 #include "hw/m68k/next-cube.h"
 #include "ui/console.h"
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index d1ab1ff77d..11376daa85 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -31,7 +31,6 @@
 #include "elf.h"
 #include "hw/loader.h"
 #include "ui/console.h"
-#include "exec/address-spaces.h"
 #include "hw/char/escc.h"
 #include "hw/sysbus.h"
 #include "hw/scsi/esp.h"
diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c
index 9469f82800..4e8bce5aa6 100644
--- a/hw/m68k/virt.c
+++ b/hw/m68k/virt.c
@@ -17,7 +17,6 @@
 #include "elf.h"
 #include "hw/loader.h"
 #include "ui/console.h"
-#include "exec/address-spaces.h"
 #include "hw/sysbus.h"
 #include "standard-headers/asm-m68k/bootinfo.h"
 #include "standard-headers/asm-m68k/bootinfo-virt.h"
diff --git a/hw/mem/sparse-mem.c b/hw/mem/sparse-mem.c
index a13ac74dd9..e6640eb8e7 100644
--- a/hw/mem/sparse-mem.c
+++ b/hw/mem/sparse-mem.c
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 
-#include "exec/address-spaces.h"
 #include "hw/qdev-properties.h"
 #include "hw/sysbus.h"
 #include "qapi/error.h"
diff --git a/hw/mips/boston.c b/hw/mips/boston.c
index ac2e93a05a..20b06865b2 100644
--- a/hw/mips/boston.c
+++ b/hw/mips/boston.c
@@ -20,7 +20,6 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 
-#include "exec/address-spaces.h"
 #include "hw/boards.h"
 #include "hw/char/serial.h"
 #include "hw/ide/pci.h"
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index 1851eb0944..c1b8066a13 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -38,7 +38,6 @@
 #include "hw/qdev-properties.h"
 #include "elf.h"
 #include "hw/isa/vt82c686.h"
-#include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c
index 43349d6837..c7480bd019 100644
--- a/hw/mips/gt64xxx_pci.c
+++ b/hw/mips/gt64xxx_pci.c
@@ -33,7 +33,6 @@
 #include "migration/vmstate.h"
 #include "hw/intc/i8259.h"
 #include "hw/irq.h"
-#include "exec/address-spaces.h"
 #include "trace.h"
 #include "qom/object.h"
 
diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
index 1a0888a0fd..dba2088ed1 100644
--- a/hw/mips/jazz.c
+++ b/hw/mips/jazz.c
@@ -47,7 +47,6 @@
 #include "hw/audio/pcspk.h"
 #include "hw/input/i8042.h"
 #include "hw/sysbus.h"
-#include "exec/address-spaces.h"
 #include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "qapi/error.h"
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index 16f7f84d34..ae192db0c8 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -47,7 +47,6 @@
 #include "hw/pci-host/gpex.h"
 #include "hw/usb.h"
 #include "net/net.h"
-#include "exec/address-spaces.h"
 #include "sysemu/kvm.h"
 #include "sysemu/qtest.h"
 #include "sysemu/reset.h"
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 459791414a..7dcf175d72 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -45,7 +45,6 @@
 #include "hw/irq.h"
 #include "hw/loader.h"
 #include "elf.h"
-#include "exec/address-spaces.h"
 #include "qom/object.h"
 #include "hw/sysbus.h"             /* SysBusDevice */
 #include "qemu/host-utils.h"
diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c
index 2e0d4aceed..2325e7e05a 100644
--- a/hw/mips/mipssim.c
+++ b/hw/mips/mipssim.c
@@ -42,7 +42,6 @@
 #include "elf.h"
 #include "hw/sysbus.h"
 #include "hw/qdev-properties.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 #include "sysemu/qtest.h"
 #include "sysemu/reset.h"
diff --git a/hw/moxie/moxiesim.c b/hw/moxie/moxiesim.c
index 196b730589..3d255d4879 100644
--- a/hw/moxie/moxiesim.c
+++ b/hw/moxie/moxiesim.c
@@ -35,7 +35,6 @@
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "hw/char/serial.h"
-#include "exec/address-spaces.h"
 #include "elf.h"
 
 #define PHYS_MEM_BASE 0x80000000
diff --git a/hw/net/msf2-emac.c b/hw/net/msf2-emac.c
index 3e6206044f..9278fdce0b 100644
--- a/hw/net/msf2-emac.c
+++ b/hw/net/msf2-emac.c
@@ -32,7 +32,6 @@
 #include "qemu-common.h"
 #include "qemu/log.h"
 #include "qapi/error.h"
-#include "exec/address-spaces.h"
 #include "hw/registerfields.h"
 #include "hw/net/msf2-emac.h"
 #include "hw/net/mii.h"
diff --git a/hw/nvram/nrf51_nvm.c b/hw/nvram/nrf51_nvm.c
index 7b3460d52d..7f1db8c423 100644
--- a/hw/nvram/nrf51_nvm.c
+++ b/hw/nvram/nrf51_nvm.c
@@ -21,7 +21,6 @@
 #include "qapi/error.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
-#include "exec/address-spaces.h"
 #include "hw/arm/nrf51.h"
 #include "hw/nvram/nrf51_nvm.h"
 #include "hw/qdev-properties.h"
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index 39f1d344ae..73fe383c2d 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -29,7 +29,6 @@
 #include "net/net.h"
 #include "hw/loader.h"
 #include "hw/qdev-properties.h"
-#include "exec/address-spaces.h"
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
 #include "sysemu/qtest.h"
diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
index 2a2db7cea6..afb3d1f81d 100644
--- a/hw/pci-host/bonito.c
+++ b/hw/pci-host/bonito.c
@@ -49,7 +49,6 @@
 #include "migration/vmstate.h"
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
-#include "exec/address-spaces.h"
 #include "hw/misc/unimp.h"
 #include "hw/registerfields.h"
 #include "qom/object.h"
diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c
index 5ad1424b31..89c1b53dd7 100644
--- a/hw/pci-host/ppce500.c
+++ b/hw/pci-host/ppce500.c
@@ -415,7 +415,6 @@ static const VMStateDescription vmstate_ppce500_pci = {
     }
 };
 
-#include "exec/address-spaces.h"
 
 static void e500_pcihost_bridge_realize(PCIDevice *d, Error **errp)
 {
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 0a9162fba9..9fef74fc56 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -38,7 +38,6 @@
 #include "hw/irq.h"
 #include "hw/loader.h"
 #include "hw/or-irq.h"
-#include "exec/address-spaces.h"
 #include "elf.h"
 #include "qom/object.h"
 
diff --git a/hw/pci-host/sabre.c b/hw/pci-host/sabre.c
index f41a0cc301..949ecc21f2 100644
--- a/hw/pci-host/sabre.c
+++ b/hw/pci-host/sabre.c
@@ -34,7 +34,6 @@
 #include "hw/irq.h"
 #include "hw/pci-bridge/simba.h"
 #include "hw/pci-host/sabre.h"
-#include "exec/address-spaces.h"
 #include "qapi/error.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
diff --git a/hw/pci-host/sh_pci.c b/hw/pci-host/sh_pci.c
index 734892f47c..08c1562e22 100644
--- a/hw/pci-host/sh_pci.c
+++ b/hw/pci-host/sh_pci.c
@@ -30,7 +30,6 @@
 #include "hw/pci/pci_host.h"
 #include "qemu/bswap.h"
 #include "qemu/module.h"
-#include "exec/address-spaces.h"
 #include "qom/object.h"
 
 #define TYPE_SH_PCI_HOST_BRIDGE "sh_pci"
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 8f35e13a0c..377084f1a8 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -45,7 +45,6 @@
 #include "trace.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
-#include "exec/address-spaces.h"
 #include "hw/hotplug.h"
 #include "hw/boards.h"
 #include "qapi/error.h"
diff --git a/hw/pci/pcie_host.c b/hw/pci/pcie_host.c
index 3534006f99..5abbe83220 100644
--- a/hw/pci/pcie_host.c
+++ b/hw/pci/pcie_host.c
@@ -23,7 +23,6 @@
 #include "hw/pci/pci.h"
 #include "hw/pci/pcie_host.h"
 #include "qemu/module.h"
-#include "exec/address-spaces.h"
 
 /* a helper function to get a PCIDevice for a given mmconfig address */
 static inline PCIDevice *pcie_dev_find_by_mmcfg_addr(PCIBus *s,
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 03b3bd322f..95451414dd 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -38,7 +38,6 @@
 #include "hw/loader.h"
 #include "elf.h"
 #include "hw/sysbus.h"
-#include "exec/address-spaces.h"
 #include "qemu/host-utils.h"
 #include "qemu/option.h"
 #include "hw/pci-host/ppce500.h"
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 9659857dba..f24abf71af 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -70,7 +70,6 @@
 #include "sysemu/reset.h"
 #include "kvm_ppc.h"
 #include "hw/usb.h"
-#include "exec/address-spaces.h"
 #include "hw/sysbus.h"
 #include "trace.h"
 
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 95d3d95158..de2be960e6 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -48,7 +48,6 @@
 #include "sysemu/kvm.h"
 #include "sysemu/reset.h"
 #include "kvm_ppc.h"
-#include "exec/address-spaces.h"
 
 #define MAX_IDE_BUS 2
 #define CFG_ADDR 0xf0000510
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 22b1c4f1f3..ffe01977cd 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -38,7 +38,6 @@
 #include "hw/ppc/pnv_core.h"
 #include "hw/loader.h"
 #include "hw/nmi.h"
-#include "exec/address-spaces.h"
 #include "qapi/visitor.h"
 #include "monitor/monitor.h"
 #include "hw/intc/intc.h"
diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
index 3e868c8c8d..382ac20fa6 100644
--- a/hw/ppc/pnv_psi.c
+++ b/hw/ppc/pnv_psi.c
@@ -26,7 +26,6 @@
 #include "qapi/error.h"
 #include "monitor/monitor.h"
 
-#include "exec/address-spaces.h"
 
 #include "hw/ppc/fdt.h"
 #include "hw/ppc/pnv.h"
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index 8da7bc7af9..972a7a4a3e 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -40,7 +40,6 @@
 #include "hw/boards.h"
 #include "qemu/error-report.h"
 #include "hw/loader.h"
-#include "exec/address-spaces.h"
 #include "qemu/cutils.h"
 
 #define BIOS_FILENAME "ppc405_rom.bin"
diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
index b7539aa721..7fb620b9a0 100644
--- a/hw/ppc/ppc440_bamboo.c
+++ b/hw/ppc/ppc440_bamboo.c
@@ -25,7 +25,6 @@
 #include "sysemu/device_tree.h"
 #include "hw/loader.h"
 #include "elf.h"
-#include "exec/address-spaces.h"
 #include "hw/char/serial.h"
 #include "hw/ppc/ppc.h"
 #include "ppc405.h"
diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
index 91cbcd0504..788d25514a 100644
--- a/hw/ppc/ppc440_pcix.c
+++ b/hw/ppc/ppc440_pcix.c
@@ -28,7 +28,6 @@
 #include "hw/ppc/ppc4xx.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_host.h"
-#include "exec/address-spaces.h"
 #include "trace.h"
 #include "qom/object.h"
 
diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c
index 96a1fe06c3..993e3ba955 100644
--- a/hw/ppc/ppc440_uc.c
+++ b/hw/ppc/ppc440_uc.c
@@ -15,7 +15,6 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/irq.h"
-#include "exec/address-spaces.h"
 #include "exec/memory.h"
 #include "hw/ppc/ppc.h"
 #include "hw/qdev-properties.h"
diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
index e8789f64e8..8147ba6f94 100644
--- a/hw/ppc/ppc4xx_pci.c
+++ b/hw/ppc/ppc4xx_pci.c
@@ -28,7 +28,6 @@
 #include "sysemu/reset.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_host.h"
-#include "exec/address-spaces.h"
 #include "trace.h"
 #include "qom/object.h"
 
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index e8dc128308..acfc2a91d8 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -43,7 +43,6 @@
 #include "sysemu/arch_init.h"
 #include "sysemu/kvm.h"
 #include "sysemu/reset.h"
-#include "exec/address-spaces.h"
 #include "trace.h"
 #include "elf.h"
 #include "qemu/units.h"
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index 0c6baf77e8..0737234d66 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -24,7 +24,6 @@
 #include "sysemu/block-backend.h"
 #include "hw/loader.h"
 #include "elf.h"
-#include "exec/address-spaces.h"
 #include "exec/memory.h"
 #include "ppc440.h"
 #include "ppc405.h"
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 89e0e60446..7aaa6f3c8a 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -69,7 +69,6 @@
 #include "hw/virtio/virtio-scsi.h"
 #include "hw/virtio/vhost-scsi-common.h"
 
-#include "exec/address-spaces.h"
 #include "exec/ram_addr.h"
 #include "hw/usb.h"
 #include "qemu/config-file.h"
diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index 24537ffcbd..db01071858 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -25,7 +25,6 @@
 #include "kvm_ppc.h"
 #include "migration/vmstate.h"
 #include "sysemu/dma.h"
-#include "exec/address-spaces.h"
 #include "trace.h"
 
 #include "hw/ppc/spapr.h"
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 4effe23a18..7a725855f9 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -34,7 +34,6 @@
 #include "hw/pci/pci_host.h"
 #include "hw/ppc/spapr.h"
 #include "hw/pci-host/spapr.h"
-#include "exec/address-spaces.h"
 #include "exec/ram_addr.h"
 #include <libfdt.h>
 #include "trace.h"
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index 3a57604ac0..9c575403b8 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -39,7 +39,6 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/option.h"
-#include "exec/address-spaces.h"
 
 #include "hw/intc/ppc-uic.h"
 #include "hw/ppc/ppc.h"
diff --git a/hw/remote/machine.c b/hw/remote/machine.c
index c0ab4f528a..952105eab5 100644
--- a/hw/remote/machine.c
+++ b/hw/remote/machine.c
@@ -17,7 +17,6 @@
 #include "qemu-common.h"
 
 #include "hw/remote/machine.h"
-#include "exec/address-spaces.h"
 #include "exec/memory.h"
 #include "qapi/error.h"
 #include "hw/pci/pci_host.h"
diff --git a/hw/remote/memory.c b/hw/remote/memory.c
index 32085b1e05..2d4174614a 100644
--- a/hw/remote/memory.c
+++ b/hw/remote/memory.c
@@ -12,7 +12,6 @@
 #include "qemu-common.h"
 
 #include "hw/remote/memory.h"
-#include "exec/address-spaces.h"
 #include "exec/ram_addr.h"
 #include "qapi/error.h"
 
diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c
index 3649919f66..901dbf1357 100644
--- a/hw/remote/proxy-memory-listener.c
+++ b/hw/remote/proxy-memory-listener.c
@@ -15,7 +15,6 @@
 #include "exec/memory.h"
 #include "exec/cpu-common.h"
 #include "exec/ram_addr.h"
-#include "exec/address-spaces.h"
 #include "qapi/error.h"
 #include "hw/remote/mpqemu-link.h"
 #include "hw/remote/proxy-memory-listener.h"
diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
index e168bffe69..dc9dea117e 100644
--- a/hw/riscv/opentitan.c
+++ b/hw/riscv/opentitan.c
@@ -24,7 +24,6 @@
 #include "hw/boards.h"
 #include "hw/misc/unimp.h"
 #include "hw/riscv/boot.h"
-#include "exec/address-spaces.h"
 #include "qemu/units.h"
 #include "sysemu/sysemu.h"
 
diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c
index 97e8b0b0a2..3e8b44b2c0 100644
--- a/hw/riscv/sifive_e.c
+++ b/hw/riscv/sifive_e.c
@@ -47,7 +47,6 @@
 #include "chardev/char.h"
 #include "sysemu/arch_init.h"
 #include "sysemu/sysemu.h"
-#include "exec/address-spaces.h"
 
 static MemMapEntry sifive_e_memmap[] = {
     [SIFIVE_E_DEV_DEBUG] =    {        0x0,     0x1000 },
diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c
index d54929e861..690f4e071a 100644
--- a/hw/rtc/m48t59.c
+++ b/hw/rtc/m48t59.c
@@ -32,7 +32,6 @@
 #include "sysemu/runstate.h"
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
-#include "exec/address-spaces.h"
 #include "qapi/error.h"
 #include "qemu/bcd.h"
 #include "qemu/module.h"
diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
index 5d0fcacd0c..36a2dbf62f 100644
--- a/hw/rtc/mc146818rtc.c
+++ b/hw/rtc/mc146818rtc.c
@@ -42,7 +42,6 @@
 #include "qapi/error.h"
 #include "qapi/qapi-events-misc-target.h"
 #include "qapi/visitor.h"
-#include "exec/address-spaces.h"
 #include "hw/rtc/mc146818rtc_regs.h"
 
 #ifdef TARGET_I386
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 41f10e3ff5..8002308a11 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -13,7 +13,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "exec/address-spaces.h"
 #include "exec/ram_addr.h"
 #include "hw/s390x/s390-virtio-hcall.h"
 #include "hw/s390x/sclp.h"
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index 443820901d..006010f30a 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -42,7 +42,6 @@
 #include "hw/loader.h"
 #include "hw/usb.h"
 #include "hw/block/flash.h"
-#include "exec/address-spaces.h"
 
 #define FLASH_BASE 0x00000000
 #define FLASH_SIZE (16 * MiB)
diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
index 1a44378df4..b0579aa0f1 100644
--- a/hw/sh4/shix.c
+++ b/hw/sh4/shix.c
@@ -34,7 +34,6 @@
 #include "sysemu/qtest.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 
 #define BIOS_FILENAME "shix_bios.bin"
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index 7e16eea9e6..eb5d2a6792 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -40,7 +40,6 @@
 #include "hw/loader.h"
 #include "elf.h"
 #include "trace.h"
-#include "exec/address-spaces.h"
 
 #include "hw/sparc/grlib.h"
 #include "hw/misc/grlib_ahb_apb_pnp.h"
diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
index a87d55f6bb..f3e42d0326 100644
--- a/hw/sparc64/niagara.c
+++ b/hw/sparc64/niagara.c
@@ -31,7 +31,6 @@
 #include "hw/loader.h"
 #include "hw/sparc/sparc64.h"
 #include "hw/rtc/sun4v-rtc.h"
-#include "exec/address-spaces.h"
 #include "sysemu/block-backend.h"
 #include "qemu/error-report.h"
 #include "sysemu/qtest.h"
diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
index 16addee4dc..72cb2175c5 100644
--- a/hw/ssi/aspeed_smc.c
+++ b/hw/ssi/aspeed_smc.c
@@ -29,7 +29,6 @@
 #include "qemu/module.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "exec/address-spaces.h"
 #include "qemu/units.h"
 #include "trace.h"
 
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index aa9c00aad3..58ebd1469c 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -18,7 +18,6 @@
 
 #include "qemu/module.h"
 #include "qapi/error.h"
-#include "exec/address-spaces.h"
 #include "hw/qdev-properties.h"
 #include "hw/pci/pci_ids.h"
 #include "hw/acpi/tpm.h"
diff --git a/hw/tricore/tc27x_soc.c b/hw/tricore/tc27x_soc.c
index d66d6980c3..ecd92717b5 100644
--- a/hw/tricore/tc27x_soc.c
+++ b/hw/tricore/tc27x_soc.c
@@ -24,7 +24,6 @@
 #include "hw/loader.h"
 #include "qemu/units.h"
 #include "hw/misc/unimp.h"
-#include "exec/address-spaces.h"
 
 #include "hw/tricore/tc27x_soc.h"
 #include "hw/tricore/triboard.h"
diff --git a/hw/tricore/triboard.c b/hw/tricore/triboard.c
index 943f706989..4dba0259cd 100644
--- a/hw/tricore/triboard.c
+++ b/hw/tricore/triboard.c
@@ -24,7 +24,6 @@
 #include "hw/qdev-properties.h"
 #include "net/net.h"
 #include "hw/loader.h"
-#include "exec/address-spaces.h"
 #include "elf.h"
 #include "hw/tricore/tricore.h"
 #include "qemu/error-report.h"
diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c
index 12ea1490fd..51658d9e37 100644
--- a/hw/tricore/tricore_testboard.c
+++ b/hw/tricore/tricore_testboard.c
@@ -25,7 +25,6 @@
 #include "net/net.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
-#include "exec/address-spaces.h"
 #include "elf.h"
 #include "hw/tricore/tricore.h"
 #include "qemu/error-report.h"
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index e2163a0d63..7b7bde7657 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -21,7 +21,6 @@
 #include "qemu/error-report.h"
 #include "qemu/memfd.h"
 #include "standard-headers/linux/vhost_types.h"
-#include "exec/address-spaces.h"
 #include "hw/virtio/virtio-bus.h"
 #include "hw/virtio/virtio-access.h"
 #include "migration/blocker.h"
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 07f4e60b30..9e13cb9e3a 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -15,7 +15,6 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "trace.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 #include "qemu/log.h"
 #include "qemu/main-loop.h"
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index a513fdd62d..232482d65f 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -64,7 +64,6 @@
 #include "hw/xen/xen-legacy-backend.h"
 #include "xen_pt.h"
 #include "qemu/range.h"
-#include "exec/address-spaces.h"
 
 static bool has_igd_gfx_passthru;
 
diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
index c38e522b02..2028fe793d 100644
--- a/hw/xtensa/sim.c
+++ b/hw/xtensa/sim.c
@@ -33,7 +33,6 @@
 #include "hw/loader.h"
 #include "elf.h"
 #include "exec/memory.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 #include "xtensa_memory.h"
 #include "xtensa_sim.h"
diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c
index 18d3c3cdb2..a18e3fc910 100644
--- a/hw/xtensa/virt.c
+++ b/hw/xtensa/virt.c
@@ -34,7 +34,6 @@
 #include "net/net.h"
 #include "elf.h"
 #include "exec/memory.h"
-#include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 #include "xtensa_memory.h"
 #include "xtensa_sim.h"
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 7be53f1895..17f087b395 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -35,7 +35,6 @@
 #include "hw/qdev-properties.h"
 #include "elf.h"
 #include "exec/memory.h"
-#include "exec/address-spaces.h"
 #include "hw/char/serial.h"
 #include "net/net.h"
 #include "hw/sysbus.h"
diff --git a/softmmu/memory.c b/softmmu/memory.c
index a62816647b..3bb533c0bc 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -17,7 +17,6 @@
 #include "qemu/log.h"
 #include "qapi/error.h"
 #include "exec/memory.h"
-#include "exec/address-spaces.h"
 #include "qapi/visitor.h"
 #include "qemu/bitops.h"
 #include "qemu/error-report.h"
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 1821882614..5232696571 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -46,7 +46,6 @@
 #include "sysemu/dma.h"
 #include "sysemu/hostmem.h"
 #include "sysemu/hw_accel.h"
-#include "exec/address-spaces.h"
 #include "sysemu/xen-mapcache.h"
 #include "trace/trace-root.h"
 
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 15f14ac69e..f044181d06 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -67,7 +67,6 @@
 #include <Hypervisor/hv_vmx.h>
 #include <sys/sysctl.h>
 
-#include "exec/address-spaces.h"
 #include "hw/i386/apic_internal.h"
 #include "qemu/main-loop.h"
 #include "qemu/accel.h"
diff --git a/target/i386/hvf/x86_mmu.c b/target/i386/hvf/x86_mmu.c
index 882a6237ee..78fff04684 100644
--- a/target/i386/hvf/x86_mmu.c
+++ b/target/i386/hvf/x86_mmu.c
@@ -24,7 +24,6 @@
 #include "x86_mmu.h"
 #include "vmcs.h"
 #include "vmx.h"
-#include "exec/address-spaces.h"
 
 #define pte_present(pte) (pte & PT_PRESENT)
 #define pte_write_access(pte) (pte & PT_WRITE)
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 72b9e2ab40..9a43be11cb 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -30,7 +30,6 @@
 #include "trace.h"
 #include "migration/blocker.h"
 #include "qom/object.h"
-#include "exec/address-spaces.h"
 #include "monitor/monitor.h"
 #include "exec/confidential-guest-support.h"
 #include "hw/i386/pc.h"
diff --git a/target/s390x/diag.c b/target/s390x/diag.c
index 1a48429564..d620cd4bd4 100644
--- a/target/s390x/diag.c
+++ b/target/s390x/diag.c
@@ -15,7 +15,6 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "internal.h"
-#include "exec/address-spaces.h"
 #include "hw/watchdog/wdt_diag288.h"
 #include "sysemu/cpus.h"
 #include "hw/s390x/ipl.h"
diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c
index 143476849f..d85d3516d6 100644
--- a/target/xtensa/op_helper.c
+++ b/target/xtensa/op_helper.c
@@ -32,7 +32,6 @@
 #include "qemu/host-utils.h"
 #include "exec/exec-all.h"
 #include "exec/cpu_ldst.h"
-#include "exec/address-spaces.h"
 #include "qemu/timer.h"
 
 #ifndef CONFIG_USER_ONLY
diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c
index ae219540b4..cea7d4058e 100644
--- a/tests/qtest/fuzz/generic_fuzz.c
+++ b/tests/qtest/fuzz/generic_fuzz.c
@@ -19,11 +19,9 @@
 #include "tests/qtest/libqos/pci-pc.h"
 #include "fuzz.h"
 #include "fork_fuzz.h"
-#include "exec/address-spaces.h"
 #include "string.h"
 #include "exec/memory.h"
 #include "exec/ramblock.h"
-#include "exec/address-spaces.h"
 #include "hw/qdev-core.h"
 #include "hw/pci/pci.h"
 #include "hw/boards.h"
diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c
index 2bc474645c..7a244c951e 100644
--- a/tests/qtest/fuzz/qos_fuzz.c
+++ b/tests/qtest/fuzz/qos_fuzz.c
@@ -21,7 +21,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "exec/memory.h"
-#include "exec/address-spaces.h"
 #include "qemu/main-loop.h"
 
 #include "tests/qtest/libqos/libqtest.h"
-- 
2.27.0



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

* Re: [PATCH 2/4] Do not include hw/boards.h if it's not really necessary
  2021-04-16 17:13 ` [PATCH 2/4] Do not include hw/boards.h " Thomas Huth
@ 2021-04-16 17:53   ` Philippe Mathieu-Daudé
  2021-04-16 18:04     ` Thomas Huth
  2021-04-30 15:59   ` Laurent Vivier
  1 sibling, 1 reply; 12+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-04-16 17:53 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: qemu-trivial

Hi Thomas,

On 4/16/21 7:13 PM, Thomas Huth wrote:
> Stop including hw/boards.h in files that don't need it.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  accel/tcg/tcg-accel-ops-icount.c | 1 -
>  accel/tcg/tcg-accel-ops-rr.c     | 1 -
>  accel/tcg/tcg-accel-ops.c        | 1 -
>  hw/acpi/cpu.c                    | 1 -
>  hw/acpi/memory_hotplug.c         | 1 -
>  hw/alpha/typhoon.c               | 1 -
>  hw/arm/aspeed.c                  | 1 -

It requires the macros declared by:

OBJECT_DECLARE_TYPE(MachineState, MachineClass, MACHINE)

>  hw/arm/omap1.c                   | 1 -
>  hw/arm/omap2.c                   | 1 -
>  hw/arm/strongarm.c               | 1 -
>  hw/arm/virt.c                    | 1 -

Ditto.

>  hw/avr/arduino.c                 | 1 -

Ditto.

>  hw/avr/atmega.c                  | 1 -
>  hw/display/next-fb.c             | 1 -
>  hw/hppa/machine.c                | 1 -

Ditto.

>  hw/i386/acpi-build.c             | 1 -
>  hw/i386/acpi-microvm.c           | 1 -
>  hw/i386/intel_iommu.c            | 1 -
>  hw/i386/pc.c                     | 1 -

Ditto (MACHINE_CLASS macro).

>  hw/i386/x86-iommu.c              | 1 -
>  hw/intc/sifive_plic.c            | 1 -
>  hw/mips/loongson3_virt.c         | 1 -

Ditto.

(skipping the rest).

>  hw/ppc/e500.c                    | 1 -
>  hw/ppc/mac_newworld.c            | 1 -
>  hw/ppc/mac_oldworld.c            | 1 -
>  hw/ppc/pnv.c                     | 1 -
>  hw/ppc/ppc4xx_devs.c             | 1 -
>  hw/ppc/rs6000_mc.c               | 1 -
>  hw/ppc/spapr.c                   | 1 -
>  hw/ppc/spapr_rtas.c              | 1 -
>  hw/remote/iohub.c                | 1 -
>  hw/s390x/s390-virtio-ccw.c       | 2 --
>  hw/tricore/tc27x_soc.c           | 1 -
>  hw/tricore/triboard.c            | 1 -
>  softmmu/vl.c                     | 1 -
>  35 files changed, 36 deletions(-)



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

* Re: [PATCH 2/4] Do not include hw/boards.h if it's not really necessary
  2021-04-16 17:53   ` Philippe Mathieu-Daudé
@ 2021-04-16 18:04     ` Thomas Huth
  2021-04-17  9:50       ` Markus Armbruster
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Huth @ 2021-04-16 18:04 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: qemu-trivial, Markus Armbruster

On 16/04/2021 19.53, Philippe Mathieu-Daudé wrote:
> Hi Thomas,
> 
> On 4/16/21 7:13 PM, Thomas Huth wrote:
>> Stop including hw/boards.h in files that don't need it.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   accel/tcg/tcg-accel-ops-icount.c | 1 -
>>   accel/tcg/tcg-accel-ops-rr.c     | 1 -
>>   accel/tcg/tcg-accel-ops.c        | 1 -
>>   hw/acpi/cpu.c                    | 1 -
>>   hw/acpi/memory_hotplug.c         | 1 -
>>   hw/alpha/typhoon.c               | 1 -
>>   hw/arm/aspeed.c                  | 1 -
> 
> It requires the macros declared by:
> 
> OBJECT_DECLARE_TYPE(MachineState, MachineClass, MACHINE)

"hw/boards.h" is already included in include/hw/arm/aspeed.h, that's why 
it's working ... Hmm, do we have a policy whether a header should be 
included again in the .c file if it's already included by a .h file?

>>   hw/arm/omap1.c                   | 1 -
>>   hw/arm/omap2.c                   | 1 -
>>   hw/arm/strongarm.c               | 1 -
>>   hw/arm/virt.c                    | 1 -
> 
> Ditto.

See include/hw/arm/virt.h

>>   hw/avr/arduino.c                 | 1 -
> 
> Ditto.

See hw/avr/boot.h

>>   hw/avr/atmega.c                  | 1 -
>>   hw/display/next-fb.c             | 1 -
>>   hw/hppa/machine.c                | 1 -
> 
> Ditto.

See hw/hppa/hppa_sys.h

>>   hw/i386/acpi-build.c             | 1 -
>>   hw/i386/acpi-microvm.c           | 1 -
>>   hw/i386/intel_iommu.c            | 1 -
>>   hw/i386/pc.c                     | 1 -
> 
> Ditto (MACHINE_CLASS macro).

See include/hw/i386/pc.h

>>   hw/i386/x86-iommu.c              | 1 -
>>   hw/intc/sifive_plic.c            | 1 -
>>   hw/mips/loongson3_virt.c         | 1 -
> 
> Ditto.

See hw/mips/fw_cfg.h

  Thomas



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

* Re: [PATCH 2/4] Do not include hw/boards.h if it's not really necessary
  2021-04-16 18:04     ` Thomas Huth
@ 2021-04-17  9:50       ` Markus Armbruster
  0 siblings, 0 replies; 12+ messages in thread
From: Markus Armbruster @ 2021-04-17  9:50 UTC (permalink / raw)
  To: Thomas Huth; +Cc: qemu-trivial, Philippe Mathieu-Daudé, qemu-devel

Thomas Huth <thuth@redhat.com> writes:

> On 16/04/2021 19.53, Philippe Mathieu-Daudé wrote:
>> Hi Thomas,
>> On 4/16/21 7:13 PM, Thomas Huth wrote:
>>> Stop including hw/boards.h in files that don't need it.
>>>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>> ---
>>>   accel/tcg/tcg-accel-ops-icount.c | 1 -
>>>   accel/tcg/tcg-accel-ops-rr.c     | 1 -
>>>   accel/tcg/tcg-accel-ops.c        | 1 -
>>>   hw/acpi/cpu.c                    | 1 -
>>>   hw/acpi/memory_hotplug.c         | 1 -
>>>   hw/alpha/typhoon.c               | 1 -
>>>   hw/arm/aspeed.c                  | 1 -
>> It requires the macros declared by:
>> OBJECT_DECLARE_TYPE(MachineState, MachineClass, MACHINE)
>
> "hw/boards.h" is already included in include/hw/arm/aspeed.h, that's
> why it's working ... Hmm, do we have a policy whether a header should
> be included again in the .c file if it's already included by a .h
> file?

I'm not aware of a formal policy.

The most common "method" for dealing with #include is probably "when the
compiler demands declarations, throw #include at it until it shuts up".

This "method" only ever adds, never deletes.  It can easily lead to
including headers many times, and to including headers unnecessarily.

Including many times isn't much of a problem in practice.  A
sufficiently smart C compiler should be able to skip #include of a
"safe" header it has already seen, so redundant #include should not slow
down the build noticeably.  I prefer to avoid / delete obviously
duplicate inclusions anyway.

Including unnecessarily *is* a problem.  A massive one.  But it's not
what you asked about.

[...]



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

* Re: [PATCH 1/4] Do not include sysemu/sysemu.h if it's not really necessary
  2021-04-16 17:13 ` [PATCH 1/4] Do not include sysemu/sysemu.h if it's not really necessary Thomas Huth
@ 2021-04-30 15:59   ` Laurent Vivier
  0 siblings, 0 replies; 12+ messages in thread
From: Laurent Vivier @ 2021-04-30 15:59 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: qemu-trivial

Le 16/04/2021 à 19:13, Thomas Huth a écrit :
> Stop including sysemu/sysemu.h in files that don't need it.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  accel/kvm/kvm-all.c          | 1 -
>  accel/tcg/user-exec-stub.c   | 1 -
>  backends/hostmem-file.c      | 1 -
>  backends/hostmem-memfd.c     | 1 -
>  backends/hostmem.c           | 1 -
>  block.c                      | 1 -
>  block/block-backend.c        | 1 -
>  block/nfs.c                  | 1 -
>  chardev/char-mux.c           | 1 -
>  chardev/char.c               | 1 -
>  gdbstub.c                    | 1 -
>  hw/alpha/dp264.c             | 1 -
>  hw/arm/aspeed.c              | 1 -
>  hw/arm/cubieboard.c          | 1 -
>  hw/arm/digic_boards.c        | 1 -
>  hw/arm/exynos4_boards.c      | 1 -
>  hw/arm/mcimx6ul-evk.c        | 1 -
>  hw/arm/mcimx7d-sabre.c       | 1 -
>  hw/arm/npcm7xx_boards.c      | 1 -
>  hw/arm/orangepi.c            | 1 -
>  hw/arm/raspi.c               | 1 -
>  hw/arm/sabrelite.c           | 1 -
>  hw/arm/virt.c                | 1 -
>  hw/block/nvme-subsys.c       | 1 -
>  hw/core/machine-qmp-cmds.c   | 1 -
>  hw/core/null-machine.c       | 1 -
>  hw/core/numa.c               | 1 -
>  hw/i386/pc_piix.c            | 1 -
>  hw/i386/pc_sysfw.c           | 1 -
>  hw/input/lasips2.c           | 1 -
>  hw/intc/sifive_plic.c        | 1 -
>  hw/isa/isa-superio.c         | 1 -
>  hw/isa/piix3.c               | 1 -
>  hw/m68k/next-kbd.c           | 1 -
>  hw/microblaze/boot.c         | 1 -
>  hw/mips/malta.c              | 1 -
>  hw/misc/macio/macio.c        | 1 -
>  hw/net/can/xlnx-zynqmp-can.c | 1 -
>  hw/net/i82596.c              | 1 -
>  hw/net/lasi_i82596.c         | 1 -
>  hw/nios2/boot.c              | 1 -
>  hw/ppc/ppc405_boards.c       | 1 -
>  hw/ppc/prep.c                | 1 -
>  hw/rx/rx-gdbsim.c            | 1 -
>  hw/s390x/ipl.c               | 1 -
>  hw/s390x/sclp.c              | 1 -
>  hw/sh4/shix.c                | 1 -
>  hw/ssi/sifive_spi.c          | 1 -
>  hw/vfio/display.c            | 1 -
>  hw/vfio/pci.c                | 1 -
>  hw/xtensa/virt.c             | 1 -
>  migration/ram.c              | 1 -
>  monitor/monitor.c            | 1 -
>  net/net.c                    | 2 --
>  net/netmap.c                 | 1 -
>  plugins/api.c                | 1 -
>  plugins/core.c               | 1 -
>  semihosting/config.c         | 1 -
>  semihosting/console.c        | 1 -
>  softmmu/arch_init.c          | 1 -
>  softmmu/device_tree.c        | 1 -
>  softmmu/physmem.c            | 1 -
>  softmmu/qdev-monitor.c       | 1 -
>  stubs/semihost.c             | 1 -
>  target/arm/cpu.c             | 1 -
>  target/openrisc/sys_helper.c | 1 -
>  target/rx/helper.c           | 1 -
>  target/s390x/cpu.c           | 1 -
>  target/s390x/excp_helper.c   | 1 -
>  tcg/tcg.c                    | 1 -
>  tests/qtest/fuzz/fuzz.c      | 1 -
>  tests/qtest/fuzz/qos_fuzz.c  | 1 -
>  util/oslib-win32.c           | 1 -
>  73 files changed, 74 deletions(-)
> 
> diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
> index b6d9f92f15..f42b743977 100644
> --- a/accel/kvm/kvm-all.c
> +++ b/accel/kvm/kvm-all.c
> @@ -30,7 +30,6 @@
>  #include "sysemu/kvm_int.h"
>  #include "sysemu/runstate.h"
>  #include "sysemu/cpus.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/bswap.h"
>  #include "exec/memory.h"
>  #include "exec/ram_addr.h"
> diff --git a/accel/tcg/user-exec-stub.c b/accel/tcg/user-exec-stub.c
> index b876f5c1e4..968cd3ca60 100644
> --- a/accel/tcg/user-exec-stub.c
> +++ b/accel/tcg/user-exec-stub.c
> @@ -1,7 +1,6 @@
>  #include "qemu/osdep.h"
>  #include "hw/core/cpu.h"
>  #include "sysemu/replay.h"
> -#include "sysemu/sysemu.h"
>  
>  bool enable_cpu_pm = false;
>  
> diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
> index b683da9daf..9b1b9f0a56 100644
> --- a/backends/hostmem-file.c
> +++ b/backends/hostmem-file.c
> @@ -15,7 +15,6 @@
>  #include "qemu/error-report.h"
>  #include "qemu/module.h"
>  #include "sysemu/hostmem.h"
> -#include "sysemu/sysemu.h"
>  #include "qom/object_interfaces.h"
>  #include "qom/object.h"
>  
> diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c
> index 69b0ae30bb..da75e27057 100644
> --- a/backends/hostmem-memfd.c
> +++ b/backends/hostmem-memfd.c
> @@ -12,7 +12,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "sysemu/hostmem.h"
> -#include "sysemu/sysemu.h"
>  #include "qom/object_interfaces.h"
>  #include "qemu/memfd.h"
>  #include "qemu/module.h"
> diff --git a/backends/hostmem.c b/backends/hostmem.c
> index c6c1ff5b99..aab3de8408 100644
> --- a/backends/hostmem.c
> +++ b/backends/hostmem.c
> @@ -12,7 +12,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "sysemu/hostmem.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/boards.h"
>  #include "qapi/error.h"
>  #include "qapi/qapi-builtin-visit.h"
> diff --git a/block.c b/block.c
> index c5b887cec1..7261f714bf 100644
> --- a/block.c
> +++ b/block.c
> @@ -41,7 +41,6 @@
>  #include "qapi/qobject-output-visitor.h"
>  #include "qapi/qapi-visit-block-core.h"
>  #include "sysemu/block-backend.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/notify.h"
>  #include "qemu/option.h"
>  #include "qemu/coroutine.h"
> diff --git a/block/block-backend.c b/block/block-backend.c
> index 413af51f3b..5f43a71a1d 100644
> --- a/block/block-backend.c
> +++ b/block/block-backend.c
> @@ -18,7 +18,6 @@
>  #include "hw/qdev-core.h"
>  #include "sysemu/blockdev.h"
>  #include "sysemu/runstate.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/replay.h"
>  #include "qapi/error.h"
>  #include "qapi/qapi-events-block.h"
> diff --git a/block/nfs.c b/block/nfs.c
> index 8c1968bb41..7dff64f489 100644
> --- a/block/nfs.c
> +++ b/block/nfs.c
> @@ -39,7 +39,6 @@
>  #include "qemu/option.h"
>  #include "qemu/uri.h"
>  #include "qemu/cutils.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/replay.h"
>  #include "qapi/qapi-visit-block-core.h"
>  #include "qapi/qmp/qdict.h"
> diff --git a/chardev/char-mux.c b/chardev/char-mux.c
> index 72beef29d2..5baf419010 100644
> --- a/chardev/char-mux.c
> +++ b/chardev/char-mux.c
> @@ -28,7 +28,6 @@
>  #include "qemu/option.h"
>  #include "chardev/char.h"
>  #include "sysemu/block-backend.h"
> -#include "sysemu/sysemu.h"
>  #include "chardev-internal.h"
>  
>  /* MUX driver for serial I/O splitting */
> diff --git a/chardev/char.c b/chardev/char.c
> index 398f09df19..a4ebfcc5ac 100644
> --- a/chardev/char.c
> +++ b/chardev/char.c
> @@ -25,7 +25,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu/cutils.h"
>  #include "monitor/monitor.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/config-file.h"
>  #include "qemu/error-report.h"
>  #include "qemu/qemu-print.h"
> diff --git a/gdbstub.c b/gdbstub.c
> index 054665e93e..9103ffc902 100644
> --- a/gdbstub.c
> +++ b/gdbstub.c
> @@ -37,7 +37,6 @@
>  #include "monitor/monitor.h"
>  #include "chardev/char.h"
>  #include "chardev/char-fe.h"
> -#include "sysemu/sysemu.h"
>  #include "exec/gdbstub.h"
>  #include "hw/cpu/cluster.h"
>  #include "hw/boards.h"
> diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c
> index c8e300d93f..1017ecf330 100644
> --- a/hw/alpha/dp264.c
> +++ b/hw/alpha/dp264.c
> @@ -13,7 +13,6 @@
>  #include "hw/loader.h"
>  #include "alpha_sys.h"
>  #include "qemu/error-report.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/rtc/mc146818rtc.h"
>  #include "hw/ide/pci.h"
>  #include "hw/timer/i8254.h"
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index c3345fce53..c4f85dab63 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -23,7 +23,6 @@
>  #include "hw/misc/led.h"
>  #include "hw/qdev-properties.h"
>  #include "sysemu/block-backend.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/loader.h"
>  #include "qemu/error-report.h"
>  #include "qemu/units.h"
> diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
> index 3ec30ca5af..9e872135ae 100644
> --- a/hw/arm/cubieboard.c
> +++ b/hw/arm/cubieboard.c
> @@ -19,7 +19,6 @@
>  #include "exec/address-spaces.h"
>  #include "qapi/error.h"
>  #include "cpu.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/boards.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/arm/allwinner-a10.h"
> diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
> index 6cdc1d83fc..65d3a9ba74 100644
> --- a/hw/arm/digic_boards.c
> +++ b/hw/arm/digic_boards.c
> @@ -34,7 +34,6 @@
>  #include "hw/arm/digic.h"
>  #include "hw/block/flash.h"
>  #include "hw/loader.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/qtest.h"
>  #include "qemu/units.h"
>  #include "qemu/cutils.h"
> diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
> index 56b729141b..8ae136bbdf 100644
> --- a/hw/arm/exynos4_boards.c
> +++ b/hw/arm/exynos4_boards.c
> @@ -26,7 +26,6 @@
>  #include "qapi/error.h"
>  #include "qemu/error-report.h"
>  #include "cpu.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/sysbus.h"
>  #include "net/net.h"
>  #include "hw/arm/boot.h"
> diff --git a/hw/arm/mcimx6ul-evk.c b/hw/arm/mcimx6ul-evk.c
> index ed69a7b037..ce16b6b317 100644
> --- a/hw/arm/mcimx6ul-evk.c
> +++ b/hw/arm/mcimx6ul-evk.c
> @@ -15,7 +15,6 @@
>  #include "hw/arm/fsl-imx6ul.h"
>  #include "hw/boards.h"
>  #include "hw/qdev-properties.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/qtest.h"
>  
> diff --git a/hw/arm/mcimx7d-sabre.c b/hw/arm/mcimx7d-sabre.c
> index e57d52b344..e896222c34 100644
> --- a/hw/arm/mcimx7d-sabre.c
> +++ b/hw/arm/mcimx7d-sabre.c
> @@ -17,7 +17,6 @@
>  #include "hw/arm/fsl-imx7.h"
>  #include "hw/boards.h"
>  #include "hw/qdev-properties.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/qtest.h"
>  
> diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
> index e22fe4bf8f..d91d687700 100644
> --- a/hw/arm/npcm7xx_boards.c
> +++ b/hw/arm/npcm7xx_boards.c
> @@ -27,7 +27,6 @@
>  #include "qemu-common.h"
>  #include "qemu/datadir.h"
>  #include "qemu/units.h"
> -#include "sysemu/sysemu.h"
>  
>  #define NPCM750_EVB_POWER_ON_STRAPS 0x00001ff7
>  #define QUANTA_GSJ_POWER_ON_STRAPS 0x00001fff
> diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c
> index b8d38c9e8d..6ccb61c149 100644
> --- a/hw/arm/orangepi.c
> +++ b/hw/arm/orangepi.c
> @@ -25,7 +25,6 @@
>  #include "hw/boards.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/arm/allwinner-h3.h"
> -#include "sysemu/sysemu.h"
>  
>  static struct arm_boot_info orangepi_binfo = {
>      .nb_cpus = AW_H3_NUM_CPUS,
> diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
> index 990509d385..1b7e9c4cb4 100644
> --- a/hw/arm/raspi.c
> +++ b/hw/arm/raspi.c
> @@ -23,7 +23,6 @@
>  #include "hw/boards.h"
>  #include "hw/loader.h"
>  #include "hw/arm/boot.h"
> -#include "sysemu/sysemu.h"
>  #include "qom/object.h"
>  
>  #define SMPBOOT_ADDR    0x300 /* this should leave enough space for ATAGS */
> diff --git a/hw/arm/sabrelite.c b/hw/arm/sabrelite.c
> index a3dbf85e0e..42348e5cb1 100644
> --- a/hw/arm/sabrelite.c
> +++ b/hw/arm/sabrelite.c
> @@ -15,7 +15,6 @@
>  #include "hw/arm/fsl-imx6.h"
>  #include "hw/boards.h"
>  #include "hw/qdev-properties.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/qtest.h"
>  
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 9f01d9041b..9c1203183a 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -48,7 +48,6 @@
>  #include "sysemu/device_tree.h"
>  #include "sysemu/numa.h"
>  #include "sysemu/runstate.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/tpm.h"
>  #include "sysemu/kvm.h"
>  #include "hw/loader.h"
> diff --git a/hw/block/nvme-subsys.c b/hw/block/nvme-subsys.c
> index 283a97b79d..9604c19117 100644
> --- a/hw/block/nvme-subsys.c
> +++ b/hw/block/nvme-subsys.c
> @@ -17,7 +17,6 @@
>  #include "hw/block/block.h"
>  #include "block/aio.h"
>  #include "block/accounting.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/pci/pci.h"
>  #include "nvme.h"
>  #include "nvme-subsys.h"
> diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
> index 68a942595a..2ad004430e 100644
> --- a/hw/core/machine-qmp-cmds.c
> +++ b/hw/core/machine-qmp-cmds.c
> @@ -22,7 +22,6 @@
>  #include "sysemu/hw_accel.h"
>  #include "sysemu/numa.h"
>  #include "sysemu/runstate.h"
> -#include "sysemu/sysemu.h"
>  
>  static void cpustate_to_cpuinfo_s390(CpuInfoS390 *info, const CPUState *cpu)
>  {
> diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
> index 7e693523d7..f586a4bef5 100644
> --- a/hw/core/null-machine.c
> +++ b/hw/core/null-machine.c
> @@ -14,7 +14,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu/error-report.h"
>  #include "hw/boards.h"
> -#include "sysemu/sysemu.h"
>  #include "exec/address-spaces.h"
>  #include "hw/core/cpu.h"
>  
> diff --git a/hw/core/numa.c b/hw/core/numa.c
> index 68cee65f61..ac6bed5817 100644
> --- a/hw/core/numa.c
> +++ b/hw/core/numa.c
> @@ -26,7 +26,6 @@
>  #include "qemu/units.h"
>  #include "sysemu/hostmem.h"
>  #include "sysemu/numa.h"
> -#include "sysemu/sysemu.h"
>  #include "exec/cpu-common.h"
>  #include "exec/ramlist.h"
>  #include "qemu/bitmap.h"
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 46cc951073..541967c1b9 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -42,7 +42,6 @@
>  #include "hw/irq.h"
>  #include "sysemu/kvm.h"
>  #include "hw/kvm/clock.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/sysbus.h"
>  #include "sysemu/arch_init.h"
>  #include "hw/i2c/smbus_eeprom.h"
> diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
> index 9fe72b370e..6ce37a2b05 100644
> --- a/hw/i386/pc_sysfw.c
> +++ b/hw/i386/pc_sysfw.c
> @@ -35,7 +35,6 @@
>  #include "hw/i386/pc.h"
>  #include "hw/loader.h"
>  #include "hw/qdev-properties.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/block/flash.h"
>  #include "sysemu/kvm.h"
>  #include "sysemu/sev.h"
> diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c
> index 275737842e..e7faf24058 100644
> --- a/hw/input/lasips2.c
> +++ b/hw/input/lasips2.c
> @@ -27,7 +27,6 @@
>  #include "hw/input/ps2.h"
>  #include "hw/input/lasips2.h"
>  #include "exec/hwaddr.h"
> -#include "sysemu/sysemu.h"
>  #include "trace.h"
>  #include "exec/address-spaces.h"
>  #include "migration/vmstate.h"
> diff --git a/hw/intc/sifive_plic.c b/hw/intc/sifive_plic.c
> index 97a1a27a9a..6a53e63299 100644
> --- a/hw/intc/sifive_plic.c
> +++ b/hw/intc/sifive_plic.c
> @@ -29,7 +29,6 @@
>  #include "hw/qdev-properties.h"
>  #include "hw/intc/sifive_plic.h"
>  #include "target/riscv/cpu.h"
> -#include "sysemu/sysemu.h"
>  #include "migration/vmstate.h"
>  
>  #define RISCV_DEBUG_PLIC 0
> diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c
> index 179c185695..c81bfe58ef 100644
> --- a/hw/isa/isa-superio.c
> +++ b/hw/isa/isa-superio.c
> @@ -14,7 +14,6 @@
>  #include "qemu/error-report.h"
>  #include "qemu/module.h"
>  #include "qapi/error.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/blockdev.h"
>  #include "chardev/char.h"
>  #include "hw/block/fdc.h"
> diff --git a/hw/isa/piix3.c b/hw/isa/piix3.c
> index f46ccae25c..dab901c9ad 100644
> --- a/hw/isa/piix3.c
> +++ b/hw/isa/piix3.c
> @@ -29,7 +29,6 @@
>  #include "hw/isa/isa.h"
>  #include "hw/xen/xen.h"
>  #include "sysemu/xen.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/reset.h"
>  #include "sysemu/runstate.h"
>  #include "migration/vmstate.h"
> diff --git a/hw/m68k/next-kbd.c b/hw/m68k/next-kbd.c
> index bee40e25bc..30a8c9fbfa 100644
> --- a/hw/m68k/next-kbd.c
> +++ b/hw/m68k/next-kbd.c
> @@ -33,7 +33,6 @@
>  #include "hw/sysbus.h"
>  #include "hw/m68k/next-cube.h"
>  #include "ui/console.h"
> -#include "sysemu/sysemu.h"
>  #include "migration/vmstate.h"
>  #include "qom/object.h"
>  
> diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c
> index caaba1aa4c..8821d009f1 100644
> --- a/hw/microblaze/boot.c
> +++ b/hw/microblaze/boot.c
> @@ -33,7 +33,6 @@
>  #include "qemu/error-report.h"
>  #include "sysemu/device_tree.h"
>  #include "sysemu/reset.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/boards.h"
>  #include "hw/loader.h"
>  #include "elf.h"
> diff --git a/hw/mips/malta.c b/hw/mips/malta.c
> index 26e7b1bd9f..5adb67ad2a 100644
> --- a/hw/mips/malta.c
> +++ b/hw/mips/malta.c
> @@ -39,7 +39,6 @@
>  #include "hw/mips/mips.h"
>  #include "hw/mips/cpudevs.h"
>  #include "hw/pci/pci.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/arch_init.h"
>  #include "qemu/log.h"
>  #include "hw/mips/bios.h"
> diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
> index e6eeb575d5..4515296e66 100644
> --- a/hw/misc/macio/macio.c
> +++ b/hw/misc/macio/macio.c
> @@ -35,7 +35,6 @@
>  #include "hw/char/escc.h"
>  #include "hw/misc/macio/macio.h"
>  #include "hw/intc/heathrow_pic.h"
> -#include "sysemu/sysemu.h"
>  #include "trace.h"
>  
>  /* Note: this code is strongly inspirated from the corresponding code
> diff --git a/hw/net/can/xlnx-zynqmp-can.c b/hw/net/can/xlnx-zynqmp-can.c
> index affa21a5ed..22bb8910fa 100644
> --- a/hw/net/can/xlnx-zynqmp-can.c
> +++ b/hw/net/can/xlnx-zynqmp-can.c
> @@ -37,7 +37,6 @@
>  #include "qemu/bitops.h"
>  #include "qemu/log.h"
>  #include "qemu/cutils.h"
> -#include "sysemu/sysemu.h"
>  #include "migration/vmstate.h"
>  #include "hw/qdev-properties.h"
>  #include "net/can_emu.h"
> diff --git a/hw/net/i82596.c b/hw/net/i82596.c
> index 055c3a1470..ec21e2699a 100644
> --- a/hw/net/i82596.c
> +++ b/hw/net/i82596.c
> @@ -12,7 +12,6 @@
>  #include "qemu/timer.h"
>  #include "net/net.h"
>  #include "net/eth.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/irq.h"
>  #include "hw/qdev-properties.h"
>  #include "migration/vmstate.h"
> diff --git a/hw/net/lasi_i82596.c b/hw/net/lasi_i82596.c
> index 820b63f350..e37f7fabe9 100644
> --- a/hw/net/lasi_i82596.c
> +++ b/hw/net/lasi_i82596.c
> @@ -18,7 +18,6 @@
>  #include "hw/net/lasi_82596.h"
>  #include "hw/net/i82596.h"
>  #include "trace.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/qdev-properties.h"
>  #include "migration/vmstate.h"
>  
> diff --git a/hw/nios2/boot.c b/hw/nios2/boot.c
> index d9969ac148..95bdc18052 100644
> --- a/hw/nios2/boot.c
> +++ b/hw/nios2/boot.c
> @@ -38,7 +38,6 @@
>  #include "qemu/error-report.h"
>  #include "sysemu/device_tree.h"
>  #include "sysemu/reset.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/boards.h"
>  #include "hw/loader.h"
>  #include "elf.h"
> diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
> index f4e804cdb5..8da7bc7af9 100644
> --- a/hw/ppc/ppc405_boards.c
> +++ b/hw/ppc/ppc405_boards.c
> @@ -34,7 +34,6 @@
>  #include "ppc405.h"
>  #include "hw/rtc/m48t59.h"
>  #include "hw/block/flash.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/qtest.h"
>  #include "sysemu/reset.h"
>  #include "sysemu/block-backend.h"
> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
> index af4ccb9f43..b41570c747 100644
> --- a/hw/ppc/prep.c
> +++ b/hw/ppc/prep.c
> @@ -29,7 +29,6 @@
>  #include "hw/char/serial.h"
>  #include "hw/block/fdc.h"
>  #include "net/net.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/isa/isa.h"
>  #include "hw/pci/pci.h"
>  #include "hw/pci/pci_host.h"
> diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
> index 9b82feff52..1f53fdb082 100644
> --- a/hw/rx/rx-gdbsim.c
> +++ b/hw/rx/rx-gdbsim.c
> @@ -24,7 +24,6 @@
>  #include "cpu.h"
>  #include "hw/loader.h"
>  #include "hw/rx/rx62n.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/qtest.h"
>  #include "sysemu/device_tree.h"
>  #include "hw/boards.h"
> diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
> index ff6b55e816..f12af5e35b 100644
> --- a/hw/s390x/ipl.c
> +++ b/hw/s390x/ipl.c
> @@ -18,7 +18,6 @@
>  #include "qapi/error.h"
>  #include "sysemu/reset.h"
>  #include "sysemu/runstate.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/tcg.h"
>  #include "cpu.h"
>  #include "elf.h"
> diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
> index 0cf2290826..f57340a7d7 100644
> --- a/hw/s390x/sclp.c
> +++ b/hw/s390x/sclp.c
> @@ -16,7 +16,6 @@
>  #include "qemu/units.h"
>  #include "qapi/error.h"
>  #include "cpu.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/boards.h"
>  #include "hw/s390x/sclp.h"
>  #include "hw/s390x/event-facility.h"
> diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
> index d9a9fcbc59..1a44378df4 100644
> --- a/hw/sh4/shix.c
> +++ b/hw/sh4/shix.c
> @@ -31,7 +31,6 @@
>  #include "qapi/error.h"
>  #include "cpu.h"
>  #include "hw/sh4/sh.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/qtest.h"
>  #include "hw/boards.h"
>  #include "hw/loader.h"
> diff --git a/hw/ssi/sifive_spi.c b/hw/ssi/sifive_spi.c
> index 0c9ebca3c8..03540cf5ca 100644
> --- a/hw/ssi/sifive_spi.c
> +++ b/hw/ssi/sifive_spi.c
> @@ -24,7 +24,6 @@
>  #include "hw/qdev-properties.h"
>  #include "hw/sysbus.h"
>  #include "hw/ssi/ssi.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/fifo8.h"
>  #include "qemu/log.h"
>  #include "qemu/module.h"
> diff --git a/hw/vfio/display.c b/hw/vfio/display.c
> index f04473e3ce..89bc90508f 100644
> --- a/hw/vfio/display.c
> +++ b/hw/vfio/display.c
> @@ -14,7 +14,6 @@
>  #include <linux/vfio.h>
>  #include <sys/ioctl.h>
>  
> -#include "sysemu/sysemu.h"
>  #include "hw/display/edid.h"
>  #include "ui/console.h"
>  #include "qapi/error.h"
> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> index 5c65aa0a98..ab4077aad2 100644
> --- a/hw/vfio/pci.c
> +++ b/hw/vfio/pci.c
> @@ -37,7 +37,6 @@
>  #include "qemu/units.h"
>  #include "sysemu/kvm.h"
>  #include "sysemu/runstate.h"
> -#include "sysemu/sysemu.h"
>  #include "pci.h"
>  #include "trace.h"
>  #include "qapi/error.h"
> diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c
> index e47e1de676..bbf6200c49 100644
> --- a/hw/xtensa/virt.c
> +++ b/hw/xtensa/virt.c
> @@ -29,7 +29,6 @@
>  #include "qapi/error.h"
>  #include "cpu.h"
>  #include "sysemu/reset.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/boards.h"
>  #include "hw/loader.h"
>  #include "hw/pci-host/gpex.h"
> diff --git a/migration/ram.c b/migration/ram.c
> index 4682f3625c..9e9b7380bf 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -51,7 +51,6 @@
>  #include "qemu/rcu_queue.h"
>  #include "migration/colo.h"
>  #include "block.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/cpu-throttle.h"
>  #include "savevm.h"
>  #include "qemu/iov.h"
> diff --git a/monitor/monitor.c b/monitor/monitor.c
> index 636bcc81c5..b90c0f4051 100644
> --- a/monitor/monitor.c
> +++ b/monitor/monitor.c
> @@ -32,7 +32,6 @@
>  #include "qemu/error-report.h"
>  #include "qemu/option.h"
>  #include "sysemu/qtest.h"
> -#include "sysemu/sysemu.h"
>  #include "trace.h"
>  
>  /*
> diff --git a/net/net.c b/net/net.c
> index edf9b95418..2a472604ec 100644
> --- a/net/net.c
> +++ b/net/net.c
> @@ -51,9 +51,7 @@
>  #include "qemu/option.h"
>  #include "qapi/error.h"
>  #include "qapi/opts-visitor.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/runstate.h"
> -#include "sysemu/sysemu.h"
>  #include "net/filter.h"
>  #include "qapi/string-output-visitor.h"
>  
> diff --git a/net/netmap.c b/net/netmap.c
> index 350f097f91..9e0cec58d3 100644
> --- a/net/netmap.c
> +++ b/net/netmap.c
> @@ -33,7 +33,6 @@
>  #include "net/net.h"
>  #include "net/tap.h"
>  #include "clients.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/error-report.h"
>  #include "qapi/error.h"
>  #include "qemu/iov.h"
> diff --git a/plugins/api.c b/plugins/api.c
> index b22998cd7c..218e1342cd 100644
> --- a/plugins/api.c
> +++ b/plugins/api.c
> @@ -37,7 +37,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu/plugin.h"
>  #include "cpu.h"
> -#include "sysemu/sysemu.h"
>  #include "tcg/tcg.h"
>  #include "exec/exec-all.h"
>  #include "exec/ram_addr.h"
> diff --git a/plugins/core.c b/plugins/core.c
> index 87b823bbc4..93b595a8d6 100644
> --- a/plugins/core.c
> +++ b/plugins/core.c
> @@ -26,7 +26,6 @@
>  #include "cpu.h"
>  #include "exec/exec-all.h"
>  #include "exec/helper-proto.h"
> -#include "sysemu/sysemu.h"
>  #include "tcg/tcg.h"
>  #include "tcg/tcg-op.h"
>  #include "trace/mem-internal.h" /* mem_info macros */
> diff --git a/semihosting/config.c b/semihosting/config.c
> index 3548e0f627..137171b717 100644
> --- a/semihosting/config.c
> +++ b/semihosting/config.c
> @@ -24,7 +24,6 @@
>  #include "qemu/error-report.h"
>  #include "semihosting/semihost.h"
>  #include "chardev/char.h"
> -#include "sysemu/sysemu.h"
>  
>  QemuOptsList qemu_semihosting_config_opts = {
>      .name = "semihosting-config",
> diff --git a/semihosting/console.c b/semihosting/console.c
> index c9ebd6fdd0..a78af69387 100644
> --- a/semihosting/console.c
> +++ b/semihosting/console.c
> @@ -24,7 +24,6 @@
>  #include "qemu/log.h"
>  #include "chardev/char.h"
>  #include "chardev/char-fe.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/main-loop.h"
>  #include "qapi/error.h"
>  #include "qemu/fifo8.h"
> diff --git a/softmmu/arch_init.c b/softmmu/arch_init.c
> index 7fd5c09b2b..8471711c54 100644
> --- a/softmmu/arch_init.c
> +++ b/softmmu/arch_init.c
> @@ -23,7 +23,6 @@
>   */
>  #include "qemu/osdep.h"
>  #include "cpu.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/arch_init.h"
>  #include "hw/pci/pci.h"
>  #include "hw/audio/soundhw.h"
> diff --git a/softmmu/device_tree.c b/softmmu/device_tree.c
> index 2691c58cf6..b621f63fba 100644
> --- a/softmmu/device_tree.c
> +++ b/softmmu/device_tree.c
> @@ -23,7 +23,6 @@
>  #include "qemu/bswap.h"
>  #include "qemu/cutils.h"
>  #include "sysemu/device_tree.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/loader.h"
>  #include "hw/boards.h"
>  #include "qemu/config-file.h"
> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
> index 85034d9c11..7ed276b9b5 100644
> --- a/softmmu/physmem.c
> +++ b/softmmu/physmem.c
> @@ -36,7 +36,6 @@
>  #include "hw/boards.h"
>  #include "hw/xen/xen.h"
>  #include "sysemu/kvm.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/tcg.h"
>  #include "sysemu/qtest.h"
>  #include "qemu/timer.h"
> diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c
> index a9955b97a0..721dec2d82 100644
> --- a/softmmu/qdev-monitor.c
> +++ b/softmmu/qdev-monitor.c
> @@ -35,7 +35,6 @@
>  #include "qemu/qemu-print.h"
>  #include "qemu/option_int.h"
>  #include "sysemu/block-backend.h"
> -#include "sysemu/sysemu.h"
>  #include "migration/misc.h"
>  #include "migration/migration.h"
>  #include "qemu/cutils.h"
> diff --git a/stubs/semihost.c b/stubs/semihost.c
> index 1b30f38b03..4bf2cf71b9 100644
> --- a/stubs/semihost.c
> +++ b/stubs/semihost.c
> @@ -12,7 +12,6 @@
>  #include "qemu/option.h"
>  #include "qemu/error-report.h"
>  #include "semihosting/semihost.h"
> -#include "sysemu/sysemu.h"
>  
>  /* Empty config */
>  QemuOptsList qemu_semihosting_config_opts = {
> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> index 0dd623e590..4eb0d2f85c 100644
> --- a/target/arm/cpu.c
> +++ b/target/arm/cpu.c
> @@ -36,7 +36,6 @@
>  #include "hw/loader.h"
>  #include "hw/boards.h"
>  #endif
> -#include "sysemu/sysemu.h"
>  #include "sysemu/tcg.h"
>  #include "sysemu/hw_accel.h"
>  #include "kvm_arm.h"
> diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c
> index 41390d046f..48674231e7 100644
> --- a/target/openrisc/sys_helper.c
> +++ b/target/openrisc/sys_helper.c
> @@ -23,7 +23,6 @@
>  #include "exec/exec-all.h"
>  #include "exec/helper-proto.h"
>  #include "exception.h"
> -#include "sysemu/sysemu.h"
>  #ifndef CONFIG_USER_ONLY
>  #include "hw/boards.h"
>  #endif
> diff --git a/target/rx/helper.c b/target/rx/helper.c
> index 3e380a94fe..db6b07e389 100644
> --- a/target/rx/helper.c
> +++ b/target/rx/helper.c
> @@ -21,7 +21,6 @@
>  #include "cpu.h"
>  #include "exec/log.h"
>  #include "exec/cpu_ldst.h"
> -#include "sysemu/sysemu.h"
>  #include "hw/irq.h"
>  
>  void rx_cpu_unpack_psw(CPURXState *env, uint32_t psw, int rte)
> diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
> index d35eb39a1b..64455cf309 100644
> --- a/target/s390x/cpu.c
> +++ b/target/s390x/cpu.c
> @@ -40,7 +40,6 @@
>  #include "hw/s390x/pv.h"
>  #include "hw/boards.h"
>  #include "sysemu/arch_init.h"
> -#include "sysemu/sysemu.h"
>  #include "sysemu/tcg.h"
>  #endif
>  #include "fpu/softfloat-helpers.h"
> diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c
> index c48cd6b46f..20625c2c8f 100644
> --- a/target/s390x/excp_helper.c
> +++ b/target/s390x/excp_helper.c
> @@ -29,7 +29,6 @@
>  #include "exec/address-spaces.h"
>  #include "tcg_s390x.h"
>  #ifndef CONFIG_USER_ONLY
> -#include "sysemu/sysemu.h"
>  #include "hw/s390x/s390_flic.h"
>  #include "hw/boards.h"
>  #endif
> diff --git a/tcg/tcg.c b/tcg/tcg.c
> index 1fbe0b686d..cc947bf6f6 100644
> --- a/tcg/tcg.c
> +++ b/tcg/tcg.c
> @@ -64,7 +64,6 @@
>  
>  #include "elf.h"
>  #include "exec/log.h"
> -#include "sysemu/sysemu.h"
>  
>  /* Forward declarations for functions declared in tcg-target.c.inc and
>     used here. */
> diff --git a/tests/qtest/fuzz/fuzz.c b/tests/qtest/fuzz/fuzz.c
> index 496d11a231..04b70e114b 100644
> --- a/tests/qtest/fuzz/fuzz.c
> +++ b/tests/qtest/fuzz/fuzz.c
> @@ -18,7 +18,6 @@
>  #include "qemu/datadir.h"
>  #include "sysemu/qtest.h"
>  #include "sysemu/runstate.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/main-loop.h"
>  #include "qemu/rcu.h"
>  #include "tests/qtest/libqos/libqtest.h"
> diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c
> index cee1a2a60f..2bc474645c 100644
> --- a/tests/qtest/fuzz/qos_fuzz.c
> +++ b/tests/qtest/fuzz/qos_fuzz.c
> @@ -22,7 +22,6 @@
>  #include "qemu-common.h"
>  #include "exec/memory.h"
>  #include "exec/address-spaces.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/main-loop.h"
>  
>  #include "tests/qtest/libqos/libqtest.h"
> diff --git a/util/oslib-win32.c b/util/oslib-win32.c
> index f68b8012bb..1fc42ec0e3 100644
> --- a/util/oslib-win32.c
> +++ b/util/oslib-win32.c
> @@ -34,7 +34,6 @@
>  #include <windows.h>
>  #include "qemu-common.h"
>  #include "qapi/error.h"
> -#include "sysemu/sysemu.h"
>  #include "qemu/main-loop.h"
>  #include "trace.h"
>  #include "qemu/sockets.h"
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



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

* Re: [PATCH 2/4] Do not include hw/boards.h if it's not really necessary
  2021-04-16 17:13 ` [PATCH 2/4] Do not include hw/boards.h " Thomas Huth
  2021-04-16 17:53   ` Philippe Mathieu-Daudé
@ 2021-04-30 15:59   ` Laurent Vivier
  1 sibling, 0 replies; 12+ messages in thread
From: Laurent Vivier @ 2021-04-30 15:59 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: qemu-trivial

Le 16/04/2021 à 19:13, Thomas Huth a écrit :
> Stop including hw/boards.h in files that don't need it.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  accel/tcg/tcg-accel-ops-icount.c | 1 -
>  accel/tcg/tcg-accel-ops-rr.c     | 1 -
>  accel/tcg/tcg-accel-ops.c        | 1 -
>  hw/acpi/cpu.c                    | 1 -
>  hw/acpi/memory_hotplug.c         | 1 -
>  hw/alpha/typhoon.c               | 1 -
>  hw/arm/aspeed.c                  | 1 -
>  hw/arm/omap1.c                   | 1 -
>  hw/arm/omap2.c                   | 1 -
>  hw/arm/strongarm.c               | 1 -
>  hw/arm/virt.c                    | 1 -
>  hw/avr/arduino.c                 | 1 -
>  hw/avr/atmega.c                  | 1 -
>  hw/display/next-fb.c             | 1 -
>  hw/hppa/machine.c                | 1 -
>  hw/i386/acpi-build.c             | 1 -
>  hw/i386/acpi-microvm.c           | 1 -
>  hw/i386/intel_iommu.c            | 1 -
>  hw/i386/pc.c                     | 1 -
>  hw/i386/x86-iommu.c              | 1 -
>  hw/intc/sifive_plic.c            | 1 -
>  hw/mips/loongson3_virt.c         | 1 -
>  hw/ppc/e500.c                    | 1 -
>  hw/ppc/mac_newworld.c            | 1 -
>  hw/ppc/mac_oldworld.c            | 1 -
>  hw/ppc/pnv.c                     | 1 -
>  hw/ppc/ppc4xx_devs.c             | 1 -
>  hw/ppc/rs6000_mc.c               | 1 -
>  hw/ppc/spapr.c                   | 1 -
>  hw/ppc/spapr_rtas.c              | 1 -
>  hw/remote/iohub.c                | 1 -
>  hw/s390x/s390-virtio-ccw.c       | 2 --
>  hw/tricore/tc27x_soc.c           | 1 -
>  hw/tricore/triboard.c            | 1 -
>  softmmu/vl.c                     | 1 -
>  35 files changed, 36 deletions(-)
> 
> diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/tcg-accel-ops-icount.c
> index 13b8fbeb69..ea42d1d51b 100644
> --- a/accel/tcg/tcg-accel-ops-icount.c
> +++ b/accel/tcg/tcg-accel-ops-icount.c
> @@ -30,7 +30,6 @@
>  #include "qemu/main-loop.h"
>  #include "qemu/guest-random.h"
>  #include "exec/exec-all.h"
> -#include "hw/boards.h"
>  
>  #include "tcg-accel-ops.h"
>  #include "tcg-accel-ops-icount.h"
> diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c
> index 018b54c508..c02c061ecb 100644
> --- a/accel/tcg/tcg-accel-ops-rr.c
> +++ b/accel/tcg/tcg-accel-ops-rr.c
> @@ -30,7 +30,6 @@
>  #include "qemu/main-loop.h"
>  #include "qemu/guest-random.h"
>  #include "exec/exec-all.h"
> -#include "hw/boards.h"
>  
>  #include "tcg-accel-ops.h"
>  #include "tcg-accel-ops-rr.h"
> diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c
> index 6cdcaa2855..7191315aee 100644
> --- a/accel/tcg/tcg-accel-ops.c
> +++ b/accel/tcg/tcg-accel-ops.c
> @@ -32,7 +32,6 @@
>  #include "qemu/main-loop.h"
>  #include "qemu/guest-random.h"
>  #include "exec/exec-all.h"
> -#include "hw/boards.h"
>  
>  #include "tcg-accel-ops.h"
>  #include "tcg-accel-ops-mttcg.h"
> diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
> index e2317be546..f82e9512fd 100644
> --- a/hw/acpi/cpu.c
> +++ b/hw/acpi/cpu.c
> @@ -1,5 +1,4 @@
>  #include "qemu/osdep.h"
> -#include "hw/boards.h"
>  #include "migration/vmstate.h"
>  #include "hw/acpi/cpu.h"
>  #include "qapi/error.h"
> diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
> index 0bdcf15528..af37889423 100644
> --- a/hw/acpi/memory_hotplug.c
> +++ b/hw/acpi/memory_hotplug.c
> @@ -2,7 +2,6 @@
>  #include "hw/acpi/memory_hotplug.h"
>  #include "hw/acpi/pc-hotplug.h"
>  #include "hw/mem/pc-dimm.h"
> -#include "hw/boards.h"
>  #include "hw/qdev-core.h"
>  #include "migration/vmstate.h"
>  #include "trace.h"
> diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
> index a42b319812..96c35c5fdb 100644
> --- a/hw/alpha/typhoon.c
> +++ b/hw/alpha/typhoon.c
> @@ -11,7 +11,6 @@
>  #include "qemu/units.h"
>  #include "qapi/error.h"
>  #include "cpu.h"
> -#include "hw/boards.h"
>  #include "hw/irq.h"
>  #include "alpha_sys.h"
>  #include "exec/address-spaces.h"
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index c4f85dab63..b1e5bc76e4 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -16,7 +16,6 @@
>  #include "hw/arm/boot.h"
>  #include "hw/arm/aspeed.h"
>  #include "hw/arm/aspeed_soc.h"
> -#include "hw/boards.h"
>  #include "hw/i2c/smbus_eeprom.h"
>  #include "hw/misc/pca9552.h"
>  #include "hw/misc/tmp105.h"
> diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
> index 02c0f66431..180d3788f8 100644
> --- a/hw/arm/omap1.c
> +++ b/hw/arm/omap1.c
> @@ -24,7 +24,6 @@
>  #include "qemu-common.h"
>  #include "cpu.h"
>  #include "exec/address-spaces.h"
> -#include "hw/boards.h"
>  #include "hw/hw.h"
>  #include "hw/irq.h"
>  #include "hw/qdev-properties.h"
> diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c
> index 16d388fc79..02b1aa8c97 100644
> --- a/hw/arm/omap2.c
> +++ b/hw/arm/omap2.c
> @@ -27,7 +27,6 @@
>  #include "sysemu/qtest.h"
>  #include "sysemu/reset.h"
>  #include "sysemu/runstate.h"
> -#include "hw/boards.h"
>  #include "hw/irq.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/arm/boot.h"
> diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c
> index c7ca54bcea..4dee791fd2 100644
> --- a/hw/arm/strongarm.c
> +++ b/hw/arm/strongarm.c
> @@ -30,7 +30,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu-common.h"
>  #include "cpu.h"
> -#include "hw/boards.h"
>  #include "hw/irq.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/qdev-properties-system.h"
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 9c1203183a..300b3b18be 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -36,7 +36,6 @@
>  #include "monitor/qdev.h"
>  #include "qapi/error.h"
>  #include "hw/sysbus.h"
> -#include "hw/boards.h"
>  #include "hw/arm/boot.h"
>  #include "hw/arm/primecell.h"
>  #include "hw/arm/virt.h"
> diff --git a/hw/avr/arduino.c b/hw/avr/arduino.c
> index 3ff31492fa..48ef478346 100644
> --- a/hw/avr/arduino.c
> +++ b/hw/avr/arduino.c
> @@ -12,7 +12,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "hw/boards.h"
>  #include "atmega.h"
>  #include "boot.h"
>  #include "qom/object.h"
> diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c
> index 44c6afebbb..80b8a41cb5 100644
> --- a/hw/avr/atmega.c
> +++ b/hw/avr/atmega.c
> @@ -18,7 +18,6 @@
>  #include "hw/qdev-properties.h"
>  #include "hw/sysbus.h"
>  #include "qom/object.h"
> -#include "hw/boards.h" /* FIXME memory_region_allocate_system_memory for sram */
>  #include "hw/misc/unimp.h"
>  #include "atmega.h"
>  
> diff --git a/hw/display/next-fb.c b/hw/display/next-fb.c
> index cc134c2d5b..dd6a1aa8ae 100644
> --- a/hw/display/next-fb.c
> +++ b/hw/display/next-fb.c
> @@ -24,7 +24,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "ui/console.h"
> -#include "hw/boards.h"
>  #include "hw/loader.h"
>  #include "framebuffer.h"
>  #include "ui/pixel_ops.h"
> diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
> index f2b71db9bd..2a46af5bc9 100644
> --- a/hw/hppa/machine.c
> +++ b/hw/hppa/machine.c
> @@ -9,7 +9,6 @@
>  #include "cpu.h"
>  #include "elf.h"
>  #include "hw/loader.h"
> -#include "hw/boards.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/reset.h"
>  #include "sysemu/sysemu.h"
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index de98750aef..bfecb0038c 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -43,7 +43,6 @@
>  #include "sysemu/tpm.h"
>  #include "hw/acpi/tpm.h"
>  #include "hw/acpi/vmgenid.h"
> -#include "hw/boards.h"
>  #include "sysemu/tpm_backend.h"
>  #include "hw/rtc/mc146818rtc_regs.h"
>  #include "migration/vmstate.h"
> diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c
> index ccd3303aac..1a0f77b911 100644
> --- a/hw/i386/acpi-microvm.c
> +++ b/hw/i386/acpi-microvm.c
> @@ -30,7 +30,6 @@
>  #include "hw/acpi/bios-linker-loader.h"
>  #include "hw/acpi/generic_event_device.h"
>  #include "hw/acpi/utils.h"
> -#include "hw/boards.h"
>  #include "hw/i386/fw_cfg.h"
>  #include "hw/i386/microvm.h"
>  #include "hw/pci/pci.h"
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index 6be8f32918..1c10643432 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -31,7 +31,6 @@
>  #include "hw/qdev-properties.h"
>  #include "hw/i386/pc.h"
>  #include "hw/i386/apic-msidef.h"
> -#include "hw/boards.h"
>  #include "hw/i386/x86-iommu.h"
>  #include "hw/pci-host/q35.h"
>  #include "sysemu/kvm.h"
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 8a84b25a03..b5ce3835e7 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -74,7 +74,6 @@
>  #include "qemu/cutils.h"
>  #include "hw/acpi/acpi.h"
>  #include "hw/acpi/cpu_hotplug.h"
> -#include "hw/boards.h"
>  #include "acpi-build.h"
>  #include "hw/mem/pc-dimm.h"
>  #include "hw/mem/nvdimm.h"
> diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
> index 5f4301639c..86ad03972e 100644
> --- a/hw/i386/x86-iommu.c
> +++ b/hw/i386/x86-iommu.c
> @@ -19,7 +19,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "hw/sysbus.h"
> -#include "hw/boards.h"
>  #include "hw/i386/x86-iommu.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/i386/pc.h"
> diff --git a/hw/intc/sifive_plic.c b/hw/intc/sifive_plic.c
> index 6a53e63299..78903beb06 100644
> --- a/hw/intc/sifive_plic.c
> +++ b/hw/intc/sifive_plic.c
> @@ -25,7 +25,6 @@
>  #include "qemu/error-report.h"
>  #include "hw/sysbus.h"
>  #include "hw/pci/msi.h"
> -#include "hw/boards.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/intc/sifive_plic.h"
>  #include "target/riscv/cpu.h"
> diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
> index f9c0873a98..1d6573bc63 100644
> --- a/hw/mips/loongson3_virt.c
> +++ b/hw/mips/loongson3_virt.c
> @@ -32,7 +32,6 @@
>  #include "cpu.h"
>  #include "elf.h"
>  #include "kvm_mips.h"
> -#include "hw/boards.h"
>  #include "hw/char/serial.h"
>  #include "hw/intc/loongson_liointc.h"
>  #include "hw/mips/mips.h"
> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
> index 79467ac512..03b3bd322f 100644
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
> @@ -25,7 +25,6 @@
>  #include "qemu/config-file.h"
>  #include "hw/char/serial.h"
>  #include "hw/pci/pci.h"
> -#include "hw/boards.h"
>  #include "sysemu/sysemu.h"
>  #include "sysemu/kvm.h"
>  #include "sysemu/reset.h"
> diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
> index 2175962846..9659857dba 100644
> --- a/hw/ppc/mac_newworld.c
> +++ b/hw/ppc/mac_newworld.c
> @@ -58,7 +58,6 @@
>  #include "hw/pci/pci.h"
>  #include "net/net.h"
>  #include "sysemu/sysemu.h"
> -#include "hw/boards.h"
>  #include "hw/nvram/fw_cfg.h"
>  #include "hw/char/escc.h"
>  #include "hw/misc/macio/macio.h"
> diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
> index 963d247f5f..95d3d95158 100644
> --- a/hw/ppc/mac_oldworld.c
> +++ b/hw/ppc/mac_oldworld.c
> @@ -38,7 +38,6 @@
>  #include "hw/isa/isa.h"
>  #include "hw/pci/pci.h"
>  #include "hw/pci/pci_host.h"
> -#include "hw/boards.h"
>  #include "hw/nvram/fw_cfg.h"
>  #include "hw/char/escc.h"
>  #include "hw/misc/macio/macio.h"
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index 6faf1fe473..22b1c4f1f3 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -52,7 +52,6 @@
>  #include "hw/ppc/pnv_pnor.h"
>  
>  #include "hw/isa/isa.h"
> -#include "hw/boards.h"
>  #include "hw/char/serial.h"
>  #include "hw/rtc/mc146818rtc.h"
>  
> diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c
> index fe9d4f7155..980c48944f 100644
> --- a/hw/ppc/ppc4xx_devs.c
> +++ b/hw/ppc/ppc4xx_devs.c
> @@ -29,7 +29,6 @@
>  #include "hw/irq.h"
>  #include "hw/ppc/ppc.h"
>  #include "hw/ppc/ppc4xx.h"
> -#include "hw/boards.h"
>  #include "hw/intc/ppc-uic.h"
>  #include "hw/qdev-properties.h"
>  #include "qemu/log.h"
> diff --git a/hw/ppc/rs6000_mc.c b/hw/ppc/rs6000_mc.c
> index 4db5b51a2d..c0bc212e92 100644
> --- a/hw/ppc/rs6000_mc.c
> +++ b/hw/ppc/rs6000_mc.c
> @@ -23,7 +23,6 @@
>  #include "hw/qdev-properties.h"
>  #include "migration/vmstate.h"
>  #include "exec/address-spaces.h"
> -#include "hw/boards.h"
>  #include "qapi/error.h"
>  #include "trace.h"
>  #include "qom/object.h"
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index e4be00b732..89e0e60446 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -54,7 +54,6 @@
>  #include "cpu-models.h"
>  #include "hw/core/cpu.h"
>  
> -#include "hw/boards.h"
>  #include "hw/ppc/ppc.h"
>  #include "hw/loader.h"
>  
> diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
> index 8a79f9c628..fb64be1150 100644
> --- a/hw/ppc/spapr_rtas.c
> +++ b/hw/ppc/spapr_rtas.c
> @@ -41,7 +41,6 @@
>  #include "hw/ppc/spapr_rtas.h"
>  #include "hw/ppc/spapr_cpu_core.h"
>  #include "hw/ppc/ppc.h"
> -#include "hw/boards.h"
>  
>  #include <libfdt.h>
>  #include "hw/ppc/spapr_drc.h"
> diff --git a/hw/remote/iohub.c b/hw/remote/iohub.c
> index e4ff131a6b..547d597f0f 100644
> --- a/hw/remote/iohub.c
> +++ b/hw/remote/iohub.c
> @@ -15,7 +15,6 @@
>  #include "hw/pci/pci_ids.h"
>  #include "hw/pci/pci_bus.h"
>  #include "qemu/thread.h"
> -#include "hw/boards.h"
>  #include "hw/remote/machine.h"
>  #include "hw/remote/iohub.h"
>  #include "qemu/main-loop.h"
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 2972b607f3..f0dbbc9f4c 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -14,10 +14,8 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "cpu.h"
> -#include "hw/boards.h"
>  #include "exec/address-spaces.h"
>  #include "exec/ram_addr.h"
> -#include "hw/boards.h"
>  #include "hw/s390x/s390-virtio-hcall.h"
>  #include "hw/s390x/sclp.h"
>  #include "hw/s390x/s390_flic.h"
> diff --git a/hw/tricore/tc27x_soc.c b/hw/tricore/tc27x_soc.c
> index dea9ba3cca..dcccdba786 100644
> --- a/hw/tricore/tc27x_soc.c
> +++ b/hw/tricore/tc27x_soc.c
> @@ -21,7 +21,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "hw/sysbus.h"
> -#include "hw/boards.h"
>  #include "hw/loader.h"
>  #include "qemu/units.h"
>  #include "hw/misc/unimp.h"
> diff --git a/hw/tricore/triboard.c b/hw/tricore/triboard.c
> index 16e2fd7e27..f8d5f7a787 100644
> --- a/hw/tricore/triboard.c
> +++ b/hw/tricore/triboard.c
> @@ -24,7 +24,6 @@
>  #include "hw/qdev-properties.h"
>  #include "cpu.h"
>  #include "net/net.h"
> -#include "hw/boards.h"
>  #include "hw/loader.h"
>  #include "exec/address-spaces.h"
>  #include "elf.h"
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index aadb526138..307944aef3 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -27,7 +27,6 @@
>  #include "qemu/datadir.h"
>  #include "qemu/units.h"
>  #include "exec/cpu-common.h"
> -#include "hw/boards.h"
>  #include "hw/qdev-properties.h"
>  #include "qapi/compat-policy.h"
>  #include "qapi/error.h"
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



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

* Re: [PATCH 3/4] Do not include cpu.h if it's not really necessary
  2021-04-16 17:13 ` [PATCH 3/4] Do not include cpu.h " Thomas Huth
@ 2021-04-30 15:59   ` Laurent Vivier
  0 siblings, 0 replies; 12+ messages in thread
From: Laurent Vivier @ 2021-04-30 15:59 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: qemu-trivial

Le 16/04/2021 à 19:13, Thomas Huth a écrit :
> Stop including cpu.h in files that don't need it.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  accel/stubs/kvm-stub.c            | 1 -
>  accel/stubs/tcg-stub.c            | 1 -
>  accel/tcg/cpu-exec-common.c       | 1 -
>  accel/tcg/cpu-exec.c              | 1 -
>  accel/tcg/cputlb.c                | 1 -
>  accel/tcg/plugin-gen.c            | 1 -
>  accel/tcg/translate-all.c         | 1 -
>  accel/tcg/translator.c            | 1 -
>  accel/tcg/user-exec.c             | 1 -
>  bsd-user/main.c                   | 1 -
>  disas.c                           | 1 -
>  dump/dump.c                       | 1 -
>  dump/win_dump.c                   | 1 -
>  hw/arm/allwinner-a10.c            | 1 -
>  hw/arm/allwinner-h3.c             | 1 -
>  hw/arm/armv7m.c                   | 1 -
>  hw/arm/aspeed.c                   | 1 -
>  hw/arm/aspeed_ast2600.c           | 1 -
>  hw/arm/aspeed_soc.c               | 1 -
>  hw/arm/bcm2836.c                  | 1 -
>  hw/arm/cubieboard.c               | 1 -
>  hw/arm/digic_boards.c             | 1 -
>  hw/arm/exynos4_boards.c           | 1 -
>  hw/arm/fsl-imx25.c                | 1 -
>  hw/arm/fsl-imx31.c                | 1 -
>  hw/arm/imx25_pdk.c                | 1 -
>  hw/arm/kzm.c                      | 1 -
>  hw/arm/msf2-som.c                 | 1 -
>  hw/arm/nrf51_soc.c                | 1 -
>  hw/arm/orangepi.c                 | 1 -
>  hw/arm/raspi.c                    | 1 -
>  hw/arm/stellaris.c                | 1 -
>  hw/arm/xlnx-zcu102.c              | 1 -
>  hw/arm/xlnx-zynqmp.c              | 1 -
>  hw/char/spapr_vty.c               | 1 -
>  hw/core/machine-qmp-cmds.c        | 1 -
>  hw/hppa/dino.c                    | 1 -
>  hw/hppa/lasi.c                    | 1 -
>  hw/i386/kvm/apic.c                | 1 -
>  hw/i386/kvm/clock.c               | 1 -
>  hw/i386/kvmvapic.c                | 1 -
>  hw/i386/microvm.c                 | 1 -
>  hw/i386/pc_piix.c                 | 1 -
>  hw/i386/vmport.c                  | 1 -
>  hw/intc/apic.c                    | 1 -
>  hw/intc/apic_common.c             | 1 -
>  hw/intc/arm_gic_kvm.c             | 1 -
>  hw/intc/armv7m_nvic.c             | 1 -
>  hw/intc/grlib_irqmp.c             | 1 -
>  hw/intc/openpic_kvm.c             | 1 -
>  hw/intc/s390_flic.c               | 1 -
>  hw/intc/s390_flic_kvm.c           | 1 -
>  hw/intc/xics.c                    | 1 -
>  hw/intc/xics_kvm.c                | 1 -
>  hw/intc/xics_spapr.c              | 1 -
>  hw/m68k/next-cube.c               | 1 -
>  hw/mips/loongson3_virt.c          | 1 -
>  hw/mips/malta.c                   | 1 -
>  hw/mips/mips_int.c                | 1 -
>  hw/mips/mipssim.c                 | 1 -
>  hw/misc/mips_itu.c                | 1 -
>  hw/net/spapr_llan.c               | 1 -
>  hw/nios2/10m50_devboard.c         | 1 -
>  hw/nios2/boot.c                   | 1 -
>  hw/nios2/generic_nommu.c          | 1 -
>  hw/nvram/spapr_nvram.c            | 1 -
>  hw/ppc/ppc.c                      | 1 -
>  hw/ppc/ppc440_uc.c                | 1 -
>  hw/ppc/prep.c                     | 1 -
>  hw/ppc/spapr_drc.c                | 1 -
>  hw/ppc/spapr_events.c             | 1 -
>  hw/ppc/spapr_hcall.c              | 1 -
>  hw/ppc/spapr_pci.c                | 1 -
>  hw/ppc/spapr_pci_vfio.c           | 1 -
>  hw/ppc/spapr_rng.c                | 1 -
>  hw/ppc/spapr_rtas.c               | 1 -
>  hw/ppc/spapr_rtas_ddw.c           | 1 -
>  hw/ppc/spapr_rtc.c                | 1 -
>  hw/ppc/spapr_tpm_proxy.c          | 1 -
>  hw/remote/proxy-memory-listener.c | 1 -
>  hw/rx/rx-gdbsim.c                 | 1 -
>  hw/rx/rx62n.c                     | 1 -
>  hw/s390x/3270-ccw.c               | 1 -
>  hw/s390x/css-bridge.c             | 1 -
>  hw/s390x/css.c                    | 1 -
>  hw/s390x/ipl.c                    | 1 -
>  hw/s390x/pv.c                     | 1 -
>  hw/s390x/s390-pci-bus.c           | 1 -
>  hw/s390x/s390-pci-inst.c          | 1 -
>  hw/s390x/s390-stattrib-kvm.c      | 1 -
>  hw/s390x/s390-stattrib.c          | 1 -
>  hw/s390x/s390-virtio-ccw.c        | 1 -
>  hw/s390x/sclp.c                   | 1 -
>  hw/s390x/sclpcpu.c                | 1 -
>  hw/scsi/spapr_vscsi.c             | 1 -
>  hw/sh4/sh7750.c                   | 1 -
>  hw/tricore/tc27x_soc.c            | 1 -
>  hw/tricore/triboard.c             | 1 -
>  hw/vfio/ap.c                      | 1 -
>  hw/vfio/migration.c               | 1 -
>  hw/vfio/spapr.c                   | 1 -
>  hw/xtensa/sim.c                   | 1 -
>  hw/xtensa/virt.c                  | 1 -
>  hw/xtensa/xtensa_memory.c         | 1 -
>  linux-user/main.c                 | 1 -
>  linux-user/semihost.c             | 1 -
>  migration/ram.c                   | 1 -
>  monitor/misc.c                    | 1 -
>  plugins/api.c                     | 1 -
>  plugins/core.c                    | 1 -
>  plugins/loader.c                  | 1 -
>  semihosting/arm-compat-semi.c     | 1 -
>  semihosting/console.c             | 1 -
>  softmmu/arch_init.c               | 1 -
>  softmmu/memory.c                  | 1 -
>  softmmu/memory_mapping.c          | 1 -
>  softmmu/physmem.c                 | 1 -
>  tcg/tcg-op-vec.c                  | 1 -
>  tcg/tcg-op.c                      | 1 -
>  tcg/tcg.c                         | 1 -
>  120 files changed, 120 deletions(-)
> 
> diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c
> index 0f17acfac0..5b1d00a222 100644
> --- a/accel/stubs/kvm-stub.c
> +++ b/accel/stubs/kvm-stub.c
> @@ -11,7 +11,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "sysemu/kvm.h"
>  
>  #ifndef CONFIG_USER_ONLY
> diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
> index 2304606f8e..d8162673ae 100644
> --- a/accel/stubs/tcg-stub.c
> +++ b/accel/stubs/tcg-stub.c
> @@ -11,7 +11,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "exec/exec-all.h"
>  
>  void tb_flush(CPUState *cpu)
> diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c
> index 12c1e3e974..be6fe45aa5 100644
> --- a/accel/tcg/cpu-exec-common.c
> +++ b/accel/tcg/cpu-exec-common.c
> @@ -18,7 +18,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "sysemu/cpus.h"
>  #include "sysemu/tcg.h"
>  #include "exec/exec-all.h"
> diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
> index f62f12e717..0dc5271715 100644
> --- a/accel/tcg/cpu-exec.c
> +++ b/accel/tcg/cpu-exec.c
> @@ -20,7 +20,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu-common.h"
>  #include "qemu/qemu-print.h"
> -#include "cpu.h"
>  #include "hw/core/tcg-cpu-ops.h"
>  #include "trace.h"
>  #include "disas/disas.h"
> diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
> index 8a7b779270..502f803e5e 100644
> --- a/accel/tcg/cputlb.c
> +++ b/accel/tcg/cputlb.c
> @@ -19,7 +19,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu/main-loop.h"
> -#include "cpu.h"
>  #include "hw/core/tcg-cpu-ops.h"
>  #include "exec/exec-all.h"
>  #include "exec/memory.h"
> diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c
> index c3dc3effe7..7627225aef 100644
> --- a/accel/tcg/plugin-gen.c
> +++ b/accel/tcg/plugin-gen.c
> @@ -43,7 +43,6 @@
>   * CPU's index into a TCG temp, since the first callback did it already.
>   */
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "tcg/tcg.h"
>  #include "tcg/tcg-op.h"
>  #include "trace/mem.h"
> diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
> index ba6ab09790..36057b22ce 100644
> --- a/accel/tcg/translate-all.c
> +++ b/accel/tcg/translate-all.c
> @@ -22,7 +22,6 @@
>  #include "qemu-common.h"
>  
>  #define NO_CPU_IO_DEFS
> -#include "cpu.h"
>  #include "trace.h"
>  #include "disas/disas.h"
>  #include "exec/exec-all.h"
> diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c
> index 2dfc27102f..1d32732198 100644
> --- a/accel/tcg/translator.c
> +++ b/accel/tcg/translator.c
> @@ -9,7 +9,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu/error-report.h"
> -#include "cpu.h"
>  #include "tcg/tcg.h"
>  #include "tcg/tcg-op.h"
>  #include "exec/exec-all.h"
> diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
> index 0d8cc27b21..fb2d43e6a9 100644
> --- a/accel/tcg/user-exec.c
> +++ b/accel/tcg/user-exec.c
> @@ -17,7 +17,6 @@
>   * License along with this library; if not, see <http://www.gnu.org/licenses/>.
>   */
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "hw/core/tcg-cpu-ops.h"
>  #include "disas/disas.h"
>  #include "exec/exec-all.h"
> diff --git a/bsd-user/main.c b/bsd-user/main.c
> index 798aba512c..36a889d084 100644
> --- a/bsd-user/main.c
> +++ b/bsd-user/main.c
> @@ -32,7 +32,6 @@
>  #include "qemu/path.h"
>  #include "qemu/help_option.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "exec/exec-all.h"
>  #include "tcg/tcg.h"
>  #include "qemu/timer.h"
> diff --git a/disas.c b/disas.c
> index a61f95b580..3dab4482d1 100644
> --- a/disas.c
> +++ b/disas.c
> @@ -4,7 +4,6 @@
>  #include "elf.h"
>  #include "qemu/qemu-print.h"
>  
> -#include "cpu.h"
>  #include "disas/disas.h"
>  #include "disas/capstone.h"
>  
> diff --git a/dump/dump.c b/dump/dump.c
> index 929138e91d..ab625909f3 100644
> --- a/dump/dump.c
> +++ b/dump/dump.c
> @@ -15,7 +15,6 @@
>  #include "qemu-common.h"
>  #include "qemu/cutils.h"
>  #include "elf.h"
> -#include "cpu.h"
>  #include "exec/hwaddr.h"
>  #include "monitor/monitor.h"
>  #include "sysemu/kvm.h"
> diff --git a/dump/win_dump.c b/dump/win_dump.c
> index 652c7bad99..c5eb5a9aac 100644
> --- a/dump/win_dump.c
> +++ b/dump/win_dump.c
> @@ -12,7 +12,6 @@
>  #include "qemu-common.h"
>  #include "qemu/cutils.h"
>  #include "elf.h"
> -#include "cpu.h"
>  #include "exec/hwaddr.h"
>  #include "monitor/monitor.h"
>  #include "sysemu/kvm.h"
> diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
> index d404f31e02..0844a65641 100644
> --- a/hw/arm/allwinner-a10.c
> +++ b/hw/arm/allwinner-a10.c
> @@ -19,7 +19,6 @@
>  #include "exec/address-spaces.h"
>  #include "qapi/error.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "hw/sysbus.h"
>  #include "hw/arm/allwinner-a10.h"
>  #include "hw/misc/unimp.h"
> diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c
> index 88259a9c0d..bbe65d1860 100644
> --- a/hw/arm/allwinner-h3.c
> +++ b/hw/arm/allwinner-h3.c
> @@ -24,7 +24,6 @@
>  #include "qemu/module.h"
>  #include "qemu/units.h"
>  #include "hw/qdev-core.h"
> -#include "cpu.h"
>  #include "hw/sysbus.h"
>  #include "hw/char/serial.h"
>  #include "hw/misc/unimp.h"
> diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
> index 6dd10d8470..caeed29670 100644
> --- a/hw/arm/armv7m.c
> +++ b/hw/arm/armv7m.c
> @@ -10,7 +10,6 @@
>  #include "qemu/osdep.h"
>  #include "hw/arm/armv7m.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/sysbus.h"
>  #include "hw/arm/boot.h"
>  #include "hw/loader.h"
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index b1e5bc76e4..7480533cb7 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -11,7 +11,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "exec/address-spaces.h"
>  #include "hw/arm/boot.h"
>  #include "hw/arm/aspeed.h"
> diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
> index 504aabf173..8e4ef07b14 100644
> --- a/hw/arm/aspeed_ast2600.c
> +++ b/hw/arm/aspeed_ast2600.c
> @@ -9,7 +9,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "exec/address-spaces.h"
>  #include "hw/misc/unimp.h"
>  #include "hw/arm/aspeed_soc.h"
> diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
> index 516277800c..fc270daa57 100644
> --- a/hw/arm/aspeed_soc.c
> +++ b/hw/arm/aspeed_soc.c
> @@ -12,7 +12,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "exec/address-spaces.h"
>  #include "hw/misc/unimp.h"
>  #include "hw/arm/aspeed_soc.h"
> diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
> index de7ade2878..24354338ca 100644
> --- a/hw/arm/bcm2836.c
> +++ b/hw/arm/bcm2836.c
> @@ -12,7 +12,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "hw/arm/bcm2836.h"
>  #include "hw/arm/raspi_platform.h"
>  #include "hw/sysbus.h"
> diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
> index 9e872135ae..d7184e5ec2 100644
> --- a/hw/arm/cubieboard.c
> +++ b/hw/arm/cubieboard.c
> @@ -18,7 +18,6 @@
>  #include "qemu/osdep.h"
>  #include "exec/address-spaces.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/boards.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/arm/allwinner-a10.h"
> diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
> index 65d3a9ba74..fdb6781567 100644
> --- a/hw/arm/digic_boards.c
> +++ b/hw/arm/digic_boards.c
> @@ -27,7 +27,6 @@
>  #include "qapi/error.h"
>  #include "qemu-common.h"
>  #include "qemu/datadir.h"
> -#include "cpu.h"
>  #include "hw/boards.h"
>  #include "exec/address-spaces.h"
>  #include "qemu/error-report.h"
> diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
> index 8ae136bbdf..35dd9875da 100644
> --- a/hw/arm/exynos4_boards.c
> +++ b/hw/arm/exynos4_boards.c
> @@ -25,7 +25,6 @@
>  #include "qemu/units.h"
>  #include "qapi/error.h"
>  #include "qemu/error-report.h"
> -#include "cpu.h"
>  #include "hw/sysbus.h"
>  #include "net/net.h"
>  #include "hw/arm/boot.h"
> diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
> index 08a98f828f..dafc0bef47 100644
> --- a/hw/arm/fsl-imx25.c
> +++ b/hw/arm/fsl-imx25.c
> @@ -24,7 +24,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/arm/fsl-imx25.h"
>  #include "sysemu/sysemu.h"
>  #include "exec/address-spaces.h"
> diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c
> index 0983998bb4..def27bb913 100644
> --- a/hw/arm/fsl-imx31.c
> +++ b/hw/arm/fsl-imx31.c
> @@ -21,7 +21,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/arm/fsl-imx31.h"
>  #include "sysemu/sysemu.h"
>  #include "exec/address-spaces.h"
> diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c
> index 1c201d0d8e..9c58fbde57 100644
> --- a/hw/arm/imx25_pdk.c
> +++ b/hw/arm/imx25_pdk.c
> @@ -25,7 +25,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/arm/fsl-imx25.h"
>  #include "hw/boards.h"
> diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c
> index e3f7d4ead2..39559c44c2 100644
> --- a/hw/arm/kzm.c
> +++ b/hw/arm/kzm.c
> @@ -15,7 +15,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/arm/fsl-imx31.h"
>  #include "hw/boards.h"
>  #include "qemu/error-report.h"
> diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c
> index f9b61c36dd..343ec977c0 100644
> --- a/hw/arm/msf2-som.c
> +++ b/hw/arm/msf2-som.c
> @@ -31,7 +31,6 @@
>  #include "hw/arm/boot.h"
>  #include "exec/address-spaces.h"
>  #include "hw/arm/msf2-soc.h"
> -#include "cpu.h"
>  
>  #define DDR_BASE_ADDRESS      0xA0000000
>  #define DDR_SIZE              (64 * MiB)
> diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c
> index e15981e019..71bdcf06b4 100644
> --- a/hw/arm/nrf51_soc.c
> +++ b/hw/arm/nrf51_soc.c
> @@ -15,7 +15,6 @@
>  #include "hw/misc/unimp.h"
>  #include "exec/address-spaces.h"
>  #include "qemu/log.h"
> -#include "cpu.h"
>  
>  #include "hw/arm/nrf51.h"
>  #include "hw/arm/nrf51_soc.h"
> diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c
> index 6ccb61c149..0cf9895ce7 100644
> --- a/hw/arm/orangepi.c
> +++ b/hw/arm/orangepi.c
> @@ -21,7 +21,6 @@
>  #include "qemu/units.h"
>  #include "exec/address-spaces.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/boards.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/arm/allwinner-h3.h"
> diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
> index 1b7e9c4cb4..b30a17871f 100644
> --- a/hw/arm/raspi.c
> +++ b/hw/arm/raspi.c
> @@ -16,7 +16,6 @@
>  #include "qemu/units.h"
>  #include "qemu/cutils.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/arm/bcm2836.h"
>  #include "hw/registerfields.h"
>  #include "qemu/error-report.h"
> diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
> index 27292ec411..8b4dab9b79 100644
> --- a/hw/arm/stellaris.c
> +++ b/hw/arm/stellaris.c
> @@ -27,7 +27,6 @@
>  #include "migration/vmstate.h"
>  #include "hw/misc/unimp.h"
>  #include "hw/qdev-clock.h"
> -#include "cpu.h"
>  #include "qom/object.h"
>  
>  #define GPIO_A 0
> diff --git a/hw/arm/xlnx-zcu102.c b/hw/arm/xlnx-zcu102.c
> index a9db25eb99..6c6cb02e86 100644
> --- a/hw/arm/xlnx-zcu102.c
> +++ b/hw/arm/xlnx-zcu102.c
> @@ -17,7 +17,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/arm/xlnx-zynqmp.h"
>  #include "hw/boards.h"
>  #include "qemu/error-report.h"
> diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
> index 7f01284a5c..6c93dcb820 100644
> --- a/hw/arm/xlnx-zynqmp.c
> +++ b/hw/arm/xlnx-zynqmp.c
> @@ -18,7 +18,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "hw/arm/xlnx-zynqmp.h"
>  #include "hw/intc/arm_gic_common.h"
>  #include "hw/boards.h"
> diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
> index 79eaa2fa52..91eae1a598 100644
> --- a/hw/char/spapr_vty.c
> +++ b/hw/char/spapr_vty.c
> @@ -2,7 +2,6 @@
>  #include "qemu/error-report.h"
>  #include "qemu/module.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "migration/vmstate.h"
>  #include "chardev/char-fe.h"
>  #include "hw/ppc/spapr.h"
> diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
> index 2ad004430e..a36c96608f 100644
> --- a/hw/core/machine-qmp-cmds.c
> +++ b/hw/core/machine-qmp-cmds.c
> @@ -8,7 +8,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "hw/boards.h"
>  #include "qapi/error.h"
>  #include "qapi/qapi-builtin-visit.h"
> diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
> index 5b82c9440d..bd97e0c51d 100644
> --- a/hw/hppa/dino.c
> +++ b/hw/hppa/dino.c
> @@ -14,7 +14,6 @@
>  #include "qemu/module.h"
>  #include "qemu/units.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/irq.h"
>  #include "hw/pci/pci.h"
>  #include "hw/pci/pci_bus.h"
> diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
> index a8f5defcd0..408af9ccb7 100644
> --- a/hw/hppa/lasi.c
> +++ b/hw/hppa/lasi.c
> @@ -13,7 +13,6 @@
>  #include "qemu/units.h"
>  #include "qemu/log.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "trace.h"
>  #include "hw/irq.h"
>  #include "sysemu/sysemu.h"
> diff --git a/hw/i386/kvm/apic.c b/hw/i386/kvm/apic.c
> index 3dbff2be2e..52ff490910 100644
> --- a/hw/i386/kvm/apic.c
> +++ b/hw/i386/kvm/apic.c
> @@ -12,7 +12,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "hw/i386/apic_internal.h"
>  #include "hw/pci/msi.h"
>  #include "sysemu/hw_accel.h"
> diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
> index 51872dd84c..efbc1e0d12 100644
> --- a/hw/i386/kvm/clock.c
> +++ b/hw/i386/kvm/clock.c
> @@ -14,7 +14,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "qemu/host-utils.h"
>  #include "qemu/module.h"
>  #include "sysemu/kvm.h"
> diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
> index 46315445d2..43f8a8f679 100644
> --- a/hw/i386/kvmvapic.c
> +++ b/hw/i386/kvmvapic.c
> @@ -11,7 +11,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "sysemu/sysemu.h"
>  #include "sysemu/cpus.h"
>  #include "sysemu/hw_accel.h"
> diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
> index edf2b0f061..aba0c83219 100644
> --- a/hw/i386/microvm.c
> +++ b/hw/i386/microvm.c
> @@ -49,7 +49,6 @@
>  #include "hw/pci-host/gpex.h"
>  #include "hw/usb/xhci.h"
>  
> -#include "cpu.h"
>  #include "elf.h"
>  #include "kvm/kvm_i386.h"
>  #include "hw/xen/start_info.h"
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 541967c1b9..6d6cd65dcd 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -49,7 +49,6 @@
>  #include "exec/memory.h"
>  #include "exec/address-spaces.h"
>  #include "hw/acpi/acpi.h"
> -#include "cpu.h"
>  #include "qapi/error.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/xen.h"
> diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
> index 490a57f52c..7cc75dbc6d 100644
> --- a/hw/i386/vmport.c
> +++ b/hw/i386/vmport.c
> @@ -37,7 +37,6 @@
>  #include "sysemu/hw_accel.h"
>  #include "sysemu/qtest.h"
>  #include "qemu/log.h"
> -#include "cpu.h"
>  #include "trace.h"
>  #include "qom/object.h"
>  
> diff --git a/hw/intc/apic.c b/hw/intc/apic.c
> index f4f50f974e..3df11c34d6 100644
> --- a/hw/intc/apic.c
> +++ b/hw/intc/apic.c
> @@ -17,7 +17,6 @@
>   * License along with this library; if not, see <http://www.gnu.org/licenses/>
>   */
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "qemu/thread.h"
>  #include "hw/i386/apic_internal.h"
>  #include "hw/i386/apic.h"
> diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
> index 97dd96dffa..2a20982066 100644
> --- a/hw/intc/apic_common.c
> +++ b/hw/intc/apic_common.c
> @@ -22,7 +22,6 @@
>  #include "qemu/error-report.h"
>  #include "qemu/module.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "qapi/visitor.h"
>  #include "hw/i386/apic.h"
>  #include "hw/i386/apic_internal.h"
> diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
> index 49f79a8674..7d2a13273a 100644
> --- a/hw/intc/arm_gic_kvm.c
> +++ b/hw/intc/arm_gic_kvm.c
> @@ -22,7 +22,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "migration/blocker.h"
>  #include "sysemu/kvm.h"
>  #include "kvm_arm.h"
> diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
> index 0d8426dafc..c4287d82d8 100644
> --- a/hw/intc/armv7m_nvic.c
> +++ b/hw/intc/armv7m_nvic.c
> @@ -12,7 +12,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/sysbus.h"
>  #include "migration/vmstate.h"
>  #include "qemu/timer.h"
> diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c
> index 984334fa7b..3bfe2544b7 100644
> --- a/hw/intc/grlib_irqmp.c
> +++ b/hw/intc/grlib_irqmp.c
> @@ -27,7 +27,6 @@
>  #include "qemu/osdep.h"
>  #include "hw/irq.h"
>  #include "hw/sysbus.h"
> -#include "cpu.h"
>  
>  #include "hw/qdev-properties.h"
>  #include "hw/sparc/grlib.h"
> diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
> index e1a39e33cb..16badace8b 100644
> --- a/hw/intc/openpic_kvm.c
> +++ b/hw/intc/openpic_kvm.c
> @@ -24,7 +24,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include <sys/ioctl.h>
>  #include "exec/address-spaces.h"
>  #include "hw/ppc/openpic.h"
> diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
> index aacdb1bbc2..74e02858d4 100644
> --- a/hw/intc/s390_flic.c
> +++ b/hw/intc/s390_flic.c
> @@ -20,7 +20,6 @@
>  #include "hw/qdev-properties.h"
>  #include "hw/s390x/css.h"
>  #include "trace.h"
> -#include "cpu.h"
>  #include "qapi/error.h"
>  #include "hw/s390x/s390-virtio-ccw.h"
>  
> diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
> index d1c8fb8016..929cfa3a68 100644
> --- a/hw/intc/s390_flic_kvm.c
> +++ b/hw/intc/s390_flic_kvm.c
> @@ -11,7 +11,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "kvm_s390x.h"
>  #include <sys/ioctl.h>
>  #include "qemu/error-report.h"
> diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> index 68f9d44feb..48a835eab7 100644
> --- a/hw/intc/xics.c
> +++ b/hw/intc/xics.c
> @@ -27,7 +27,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "trace.h"
>  #include "qemu/timer.h"
>  #include "hw/ppc/xics.h"
> diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
> index 570d635bcc..f5bfc501bc 100644
> --- a/hw/intc/xics_kvm.c
> +++ b/hw/intc/xics_kvm.c
> @@ -28,7 +28,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "qemu-common.h"
> -#include "cpu.h"
>  #include "trace.h"
>  #include "sysemu/kvm.h"
>  #include "hw/ppc/spapr.h"
> diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c
> index 8ae4f41459..37b2d99977 100644
> --- a/hw/intc/xics_spapr.c
> +++ b/hw/intc/xics_spapr.c
> @@ -26,7 +26,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "trace.h"
>  #include "qemu/timer.h"
>  #include "hw/ppc/spapr.h"
> diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
> index 92b45d760f..5bd4f2d832 100644
> --- a/hw/m68k/next-cube.c
> +++ b/hw/m68k/next-cube.c
> @@ -10,7 +10,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "exec/hwaddr.h"
>  #include "exec/address-spaces.h"
>  #include "sysemu/sysemu.h"
> diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
> index 1d6573bc63..16f7f84d34 100644
> --- a/hw/mips/loongson3_virt.c
> +++ b/hw/mips/loongson3_virt.c
> @@ -29,7 +29,6 @@
>  #include "qemu/cutils.h"
>  #include "qemu/datadir.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "elf.h"
>  #include "kvm_mips.h"
>  #include "hw/char/serial.h"
> diff --git a/hw/mips/malta.c b/hw/mips/malta.c
> index 5adb67ad2a..459791414a 100644
> --- a/hw/mips/malta.c
> +++ b/hw/mips/malta.c
> @@ -27,7 +27,6 @@
>  #include "qemu/bitops.h"
>  #include "qemu-common.h"
>  #include "qemu/datadir.h"
> -#include "cpu.h"
>  #include "hw/clock.h"
>  #include "hw/southbridge/piix.h"
>  #include "hw/isa/superio.h"
> diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c
> index 0f9c6f07c1..2db5e10fe0 100644
> --- a/hw/mips/mips_int.c
> +++ b/hw/mips/mips_int.c
> @@ -24,7 +24,6 @@
>  #include "qemu/main-loop.h"
>  #include "hw/irq.h"
>  #include "hw/mips/cpudevs.h"
> -#include "cpu.h"
>  #include "sysemu/kvm.h"
>  #include "kvm_mips.h"
>  
> diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c
> index f5d0da05aa..2e0d4aceed 100644
> --- a/hw/mips/mipssim.c
> +++ b/hw/mips/mipssim.c
> @@ -29,7 +29,6 @@
>  #include "qapi/error.h"
>  #include "qemu-common.h"
>  #include "qemu/datadir.h"
> -#include "cpu.h"
>  #include "hw/clock.h"
>  #include "hw/mips/mips.h"
>  #include "hw/mips/cpudevs.h"
> diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c
> index 133399598f..80683fed31 100644
> --- a/hw/misc/mips_itu.c
> +++ b/hw/misc/mips_itu.c
> @@ -22,7 +22,6 @@
>  #include "qemu/log.h"
>  #include "qemu/module.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "exec/exec-all.h"
>  #include "hw/misc/mips_itu.h"
>  #include "hw/qdev-properties.h"
> diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
> index 10e85a4556..a6876a936d 100644
> --- a/hw/net/spapr_llan.c
> +++ b/hw/net/spapr_llan.c
> @@ -26,7 +26,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "qemu/log.h"
>  #include "qemu/module.h"
>  #include "net/net.h"
> diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c
> index a14fc31e86..3d1205b8bd 100644
> --- a/hw/nios2/10m50_devboard.c
> +++ b/hw/nios2/10m50_devboard.c
> @@ -24,7 +24,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  
>  #include "hw/sysbus.h"
>  #include "hw/char/serial.h"
> diff --git a/hw/nios2/boot.c b/hw/nios2/boot.c
> index 95bdc18052..5b3e4efed5 100644
> --- a/hw/nios2/boot.c
> +++ b/hw/nios2/boot.c
> @@ -32,7 +32,6 @@
>  #include "qemu/units.h"
>  #include "qemu-common.h"
>  #include "qemu/datadir.h"
> -#include "cpu.h"
>  #include "qemu/option.h"
>  #include "qemu/config-file.h"
>  #include "qemu/error-report.h"
> diff --git a/hw/nios2/generic_nommu.c b/hw/nios2/generic_nommu.c
> index b70a42dc2f..fbc18dbd04 100644
> --- a/hw/nios2/generic_nommu.c
> +++ b/hw/nios2/generic_nommu.c
> @@ -29,7 +29,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "qemu-common.h"
> -#include "cpu.h"
>  
>  #include "hw/char/serial.h"
>  #include "hw/boards.h"
> diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c
> index 3bb4654c58..fbfdf47e26 100644
> --- a/hw/nvram/spapr_nvram.c
> +++ b/hw/nvram/spapr_nvram.c
> @@ -26,7 +26,6 @@
>  #include "qemu/module.h"
>  #include "qemu/units.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include <libfdt.h>
>  
>  #include "sysemu/block-backend.h"
> diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
> index bf28d6bfc8..7375bf4fa9 100644
> --- a/hw/ppc/ppc.c
> +++ b/hw/ppc/ppc.c
> @@ -23,7 +23,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "hw/irq.h"
>  #include "hw/ppc/ppc.h"
>  #include "hw/ppc/ppc_e500.h"
> diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c
> index f6f89058ab..96a1fe06c3 100644
> --- a/hw/ppc/ppc440_uc.c
> +++ b/hw/ppc/ppc440_uc.c
> @@ -14,7 +14,6 @@
>  #include "qapi/error.h"
>  #include "qemu/log.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "hw/irq.h"
>  #include "exec/address-spaces.h"
>  #include "exec/memory.h"
> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
> index b41570c747..e8dc128308 100644
> --- a/hw/ppc/prep.c
> +++ b/hw/ppc/prep.c
> @@ -24,7 +24,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "hw/rtc/m48t59.h"
>  #include "hw/char/serial.h"
>  #include "hw/block/fdc.h"
> diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
> index 9e16505fa1..b8c2f3daf7 100644
> --- a/hw/ppc/spapr_drc.c
> +++ b/hw/ppc/spapr_drc.c
> @@ -13,7 +13,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "qapi/qmp/qnull.h"
> -#include "cpu.h"
>  #include "qemu/cutils.h"
>  #include "hw/ppc/spapr_drc.h"
>  #include "qom/object.h"
> diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
> index d51daedfa6..0cfc19be19 100644
> --- a/hw/ppc/spapr_events.c
> +++ b/hw/ppc/spapr_events.c
> @@ -27,7 +27,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "sysemu/device_tree.h"
>  #include "sysemu/runstate.h"
>  
> diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
> index 7b5cd3553c..2a464a42e6 100644
> --- a/hw/ppc/spapr_hcall.c
> +++ b/hw/ppc/spapr_hcall.c
> @@ -7,7 +7,6 @@
>  #include "qemu/main-loop.h"
>  #include "qemu/module.h"
>  #include "qemu/error-report.h"
> -#include "cpu.h"
>  #include "exec/exec-all.h"
>  #include "helper_regs.h"
>  #include "hw/ppc/spapr.h"
> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> index feba18cb12..4effe23a18 100644
> --- a/hw/ppc/spapr_pci.c
> +++ b/hw/ppc/spapr_pci.c
> @@ -25,7 +25,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/irq.h"
>  #include "hw/sysbus.h"
>  #include "migration/vmstate.h"
> diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c
> index e0547b1740..7817cf72ee 100644
> --- a/hw/ppc/spapr_pci_vfio.c
> +++ b/hw/ppc/spapr_pci_vfio.c
> @@ -19,7 +19,6 @@
>  
>  #include "qemu/osdep.h"
>  #include <linux/vfio.h>
> -#include "cpu.h"
>  #include "hw/ppc/spapr.h"
>  #include "hw/pci-host/spapr.h"
>  #include "hw/pci/msix.h"
> diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c
> index d14800e9de..df5c4b9687 100644
> --- a/hw/ppc/spapr_rng.c
> +++ b/hw/ppc/spapr_rng.c
> @@ -19,7 +19,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "qemu/error-report.h"
>  #include "qemu/main-loop.h"
>  #include "qemu/module.h"
> diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
> index fb64be1150..59dbea4e22 100644
> --- a/hw/ppc/spapr_rtas.c
> +++ b/hw/ppc/spapr_rtas.c
> @@ -26,7 +26,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "qemu/log.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/sysemu.h"
> diff --git a/hw/ppc/spapr_rtas_ddw.c b/hw/ppc/spapr_rtas_ddw.c
> index 3501b05819..3e826e1308 100644
> --- a/hw/ppc/spapr_rtas_ddw.c
> +++ b/hw/ppc/spapr_rtas_ddw.c
> @@ -18,7 +18,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "qemu/error-report.h"
>  #include "qemu/module.h"
>  #include "hw/ppc/spapr.h"
> diff --git a/hw/ppc/spapr_rtc.c b/hw/ppc/spapr_rtc.c
> index 68cfc578a3..fba4dfca35 100644
> --- a/hw/ppc/spapr_rtc.c
> +++ b/hw/ppc/spapr_rtc.c
> @@ -27,7 +27,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu-common.h"
> -#include "cpu.h"
>  #include "qemu/timer.h"
>  #include "sysemu/sysemu.h"
>  #include "hw/ppc/spapr.h"
> diff --git a/hw/ppc/spapr_tpm_proxy.c b/hw/ppc/spapr_tpm_proxy.c
> index a01f81f9e0..2454086744 100644
> --- a/hw/ppc/spapr_tpm_proxy.c
> +++ b/hw/ppc/spapr_tpm_proxy.c
> @@ -15,7 +15,6 @@
>  #include "qapi/error.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/reset.h"
> -#include "cpu.h"
>  #include "hw/ppc/spapr.h"
>  #include "hw/qdev-properties.h"
>  #include "trace.h"
> diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c
> index af1fa6f5aa..3649919f66 100644
> --- a/hw/remote/proxy-memory-listener.c
> +++ b/hw/remote/proxy-memory-listener.c
> @@ -14,7 +14,6 @@
>  #include "qemu/range.h"
>  #include "exec/memory.h"
>  #include "exec/cpu-common.h"
> -#include "cpu.h"
>  #include "exec/ram_addr.h"
>  #include "exec/address-spaces.h"
>  #include "qapi/error.h"
> diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
> index 1f53fdb082..b52d76b9b6 100644
> --- a/hw/rx/rx-gdbsim.c
> +++ b/hw/rx/rx-gdbsim.c
> @@ -21,7 +21,6 @@
>  #include "qemu/error-report.h"
>  #include "qapi/error.h"
>  #include "qemu-common.h"
> -#include "cpu.h"
>  #include "hw/loader.h"
>  #include "hw/rx/rx62n.h"
>  #include "sysemu/qtest.h"
> diff --git a/hw/rx/rx62n.c b/hw/rx/rx62n.c
> index 31ddccf2cd..fa5add9f9d 100644
> --- a/hw/rx/rx62n.c
> +++ b/hw/rx/rx62n.c
> @@ -28,7 +28,6 @@
>  #include "hw/sysbus.h"
>  #include "hw/qdev-properties.h"
>  #include "sysemu/sysemu.h"
> -#include "cpu.h"
>  #include "qom/object.h"
>  
>  /*
> diff --git a/hw/s390x/3270-ccw.c b/hw/s390x/3270-ccw.c
> index f3e7342b1e..25e628f575 100644
> --- a/hw/s390x/3270-ccw.c
> +++ b/hw/s390x/3270-ccw.c
> @@ -13,7 +13,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "hw/s390x/css.h"
>  #include "hw/s390x/css-bridge.h"
>  #include "hw/qdev-properties.h"
> diff --git a/hw/s390x/css-bridge.c b/hw/s390x/css-bridge.c
> index 9d793d671e..191b29f077 100644
> --- a/hw/s390x/css-bridge.c
> +++ b/hw/s390x/css-bridge.c
> @@ -20,7 +20,6 @@
>  #include "hw/s390x/css.h"
>  #include "ccw-device.h"
>  #include "hw/s390x/css-bridge.h"
> -#include "cpu.h"
>  
>  /*
>   * Invoke device-specific unplug handler, disable the subchannel
> diff --git a/hw/s390x/css.c b/hw/s390x/css.c
> index 4149b8e5a7..bed46f5ec3 100644
> --- a/hw/s390x/css.c
> +++ b/hw/s390x/css.c
> @@ -15,7 +15,6 @@
>  #include "qemu/bitops.h"
>  #include "qemu/error-report.h"
>  #include "exec/address-spaces.h"
> -#include "cpu.h"
>  #include "hw/s390x/ioinst.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/s390x/css.h"
> diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
> index f12af5e35b..8c863cf386 100644
> --- a/hw/s390x/ipl.c
> +++ b/hw/s390x/ipl.c
> @@ -19,7 +19,6 @@
>  #include "sysemu/reset.h"
>  #include "sysemu/runstate.h"
>  #include "sysemu/tcg.h"
> -#include "cpu.h"
>  #include "elf.h"
>  #include "hw/loader.h"
>  #include "hw/qdev-properties.h"
> diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c
> index 93eccfc05d..401b63d6cb 100644
> --- a/hw/s390x/pv.c
> +++ b/hw/s390x/pv.c
> @@ -13,7 +13,6 @@
>  
>  #include <linux/kvm.h>
>  
> -#include "cpu.h"
>  #include "qapi/error.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/kvm.h"
> diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
> index dd138dae94..7db1c5943f 100644
> --- a/hw/s390x/s390-pci-bus.c
> +++ b/hw/s390x/s390-pci-bus.c
> @@ -14,7 +14,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include "qapi/visitor.h"
> -#include "cpu.h"
>  #include "hw/s390x/s390-pci-bus.h"
>  #include "hw/s390x/s390-pci-inst.h"
>  #include "hw/s390x/s390-pci-vfio.h"
> diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
> index 4b8326afa4..9ec277d50e 100644
> --- a/hw/s390x/s390-pci-inst.c
> +++ b/hw/s390x/s390-pci-inst.c
> @@ -12,7 +12,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "exec/memop.h"
>  #include "exec/memory-internal.h"
>  #include "qemu/error-report.h"
> diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c
> index f89d8d9d16..f0b11a74e4 100644
> --- a/hw/s390x/s390-stattrib-kvm.c
> +++ b/hw/s390x/s390-stattrib-kvm.c
> @@ -16,7 +16,6 @@
>  #include "qemu/error-report.h"
>  #include "sysemu/kvm.h"
>  #include "exec/ram_addr.h"
> -#include "cpu.h"
>  #include "kvm_s390x.h"
>  
>  Object *kvm_s390_stattrib_create(void)
> diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c
> index 4441e1d331..9eda1c3b2a 100644
> --- a/hw/s390x/s390-stattrib.c
> +++ b/hw/s390x/s390-stattrib.c
> @@ -11,7 +11,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu/units.h"
> -#include "cpu.h"
>  #include "migration/qemu-file.h"
>  #include "migration/register.h"
>  #include "hw/s390x/storage-attributes.h"
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index f0dbbc9f4c..41f10e3ff5 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -13,7 +13,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "exec/address-spaces.h"
>  #include "exec/ram_addr.h"
>  #include "hw/s390x/s390-virtio-hcall.h"
> diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
> index f57340a7d7..edb6e3ea01 100644
> --- a/hw/s390x/sclp.c
> +++ b/hw/s390x/sclp.c
> @@ -15,7 +15,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu/units.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "hw/boards.h"
>  #include "hw/s390x/sclp.h"
>  #include "hw/s390x/event-facility.h"
> diff --git a/hw/s390x/sclpcpu.c b/hw/s390x/sclpcpu.c
> index 62806d3273..f2b1a4b037 100644
> --- a/hw/s390x/sclpcpu.c
> +++ b/hw/s390x/sclpcpu.c
> @@ -17,7 +17,6 @@
>  #include "hw/s390x/sclp.h"
>  #include "qemu/module.h"
>  #include "hw/s390x/event-facility.h"
> -#include "cpu.h"
>  #include "sysemu/cpus.h"
>  
>  typedef struct ConfigMgtData {
> diff --git a/hw/scsi/spapr_vscsi.c b/hw/scsi/spapr_vscsi.c
> index ca5c13c4a8..c210262484 100644
> --- a/hw/scsi/spapr_vscsi.c
> +++ b/hw/scsi/spapr_vscsi.c
> @@ -34,7 +34,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu/module.h"
> -#include "cpu.h"
>  #include "hw/scsi/scsi.h"
>  #include "migration/vmstate.h"
>  #include "scsi/constants.h"
> diff --git a/hw/sh4/sh7750.c b/hw/sh4/sh7750.c
> index f8ac3ec6e3..d53a436d8c 100644
> --- a/hw/sh4/sh7750.c
> +++ b/hw/sh4/sh7750.c
> @@ -31,7 +31,6 @@
>  #include "sh7750_regnames.h"
>  #include "hw/sh4/sh_intc.h"
>  #include "hw/timer/tmu012.h"
> -#include "cpu.h"
>  #include "exec/exec-all.h"
>  
>  #define NB_DEVICES 4
> diff --git a/hw/tricore/tc27x_soc.c b/hw/tricore/tc27x_soc.c
> index dcccdba786..d66d6980c3 100644
> --- a/hw/tricore/tc27x_soc.c
> +++ b/hw/tricore/tc27x_soc.c
> @@ -25,7 +25,6 @@
>  #include "qemu/units.h"
>  #include "hw/misc/unimp.h"
>  #include "exec/address-spaces.h"
> -#include "cpu.h"
>  
>  #include "hw/tricore/tc27x_soc.h"
>  #include "hw/tricore/triboard.h"
> diff --git a/hw/tricore/triboard.c b/hw/tricore/triboard.c
> index f8d5f7a787..943f706989 100644
> --- a/hw/tricore/triboard.c
> +++ b/hw/tricore/triboard.c
> @@ -22,7 +22,6 @@
>  #include "qemu/units.h"
>  #include "qapi/error.h"
>  #include "hw/qdev-properties.h"
> -#include "cpu.h"
>  #include "net/net.h"
>  #include "hw/loader.h"
>  #include "exec/address-spaces.h"
> diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
> index f9dbec37da..4b32aca1a0 100644
> --- a/hw/vfio/ap.c
> +++ b/hw/vfio/ap.c
> @@ -21,7 +21,6 @@
>  #include "qemu/module.h"
>  #include "qemu/option.h"
>  #include "qemu/config-file.h"
> -#include "cpu.h"
>  #include "kvm_s390x.h"
>  #include "migration/vmstate.h"
>  #include "hw/qdev-properties.h"
> diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
> index 384576cfc0..201642d75e 100644
> --- a/hw/vfio/migration.c
> +++ b/hw/vfio/migration.c
> @@ -15,7 +15,6 @@
>  
>  #include "sysemu/runstate.h"
>  #include "hw/vfio/vfio-common.h"
> -#include "cpu.h"
>  #include "migration/migration.h"
>  #include "migration/vmstate.h"
>  #include "migration/qemu-file.h"
> diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c
> index 2900bd1941..ea3f70bd2f 100644
> --- a/hw/vfio/spapr.c
> +++ b/hw/vfio/spapr.c
> @@ -9,7 +9,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include <sys/ioctl.h>
>  #include <linux/vfio.h>
>  
> diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
> index cbac50db2d..c38e522b02 100644
> --- a/hw/xtensa/sim.c
> +++ b/hw/xtensa/sim.c
> @@ -27,7 +27,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "sysemu/reset.h"
>  #include "sysemu/sysemu.h"
>  #include "hw/boards.h"
> diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c
> index bbf6200c49..18d3c3cdb2 100644
> --- a/hw/xtensa/virt.c
> +++ b/hw/xtensa/virt.c
> @@ -27,7 +27,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "sysemu/reset.h"
>  #include "hw/boards.h"
>  #include "hw/loader.h"
> diff --git a/hw/xtensa/xtensa_memory.c b/hw/xtensa/xtensa_memory.c
> index 1c5f62b014..2c1095f017 100644
> --- a/hw/xtensa/xtensa_memory.c
> +++ b/hw/xtensa/xtensa_memory.c
> @@ -27,7 +27,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "exec/memory.h"
>  #include "qemu/error-report.h"
>  #include "xtensa_memory.h"
> diff --git a/linux-user/main.c b/linux-user/main.c
> index f956afccab..57ba1b45ab 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -38,7 +38,6 @@
>  #include "qemu/help_option.h"
>  #include "qemu/module.h"
>  #include "qemu/plugin.h"
> -#include "cpu.h"
>  #include "exec/exec-all.h"
>  #include "tcg/tcg.h"
>  #include "qemu/timer.h"
> diff --git a/linux-user/semihost.c b/linux-user/semihost.c
> index 82013b8b48..f53ab526fb 100644
> --- a/linux-user/semihost.c
> +++ b/linux-user/semihost.c
> @@ -11,7 +11,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "semihosting/console.h"
>  #include "qemu.h"
>  #include <termios.h>
> diff --git a/migration/ram.c b/migration/ram.c
> index 9e9b7380bf..ace8ad431c 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -27,7 +27,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "qemu/cutils.h"
>  #include "qemu/bitops.h"
>  #include "qemu/bitmap.h"
> diff --git a/monitor/misc.c b/monitor/misc.c
> index 55f3744053..f3a393ea59 100644
> --- a/monitor/misc.c
> +++ b/monitor/misc.c
> @@ -24,7 +24,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "monitor-internal.h"
> -#include "cpu.h"
>  #include "monitor/qdev.h"
>  #include "hw/usb.h"
>  #include "hw/pci/pci.h"
> diff --git a/plugins/api.c b/plugins/api.c
> index 218e1342cd..817c9b6b69 100644
> --- a/plugins/api.c
> +++ b/plugins/api.c
> @@ -36,7 +36,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu/plugin.h"
> -#include "cpu.h"
>  #include "tcg/tcg.h"
>  #include "exec/exec-all.h"
>  #include "exec/ram_addr.h"
> diff --git a/plugins/core.c b/plugins/core.c
> index 93b595a8d6..55d188af51 100644
> --- a/plugins/core.c
> +++ b/plugins/core.c
> @@ -23,7 +23,6 @@
>  #include "hw/core/cpu.h"
>  #include "exec/cpu-common.h"
>  
> -#include "cpu.h"
>  #include "exec/exec-all.h"
>  #include "exec/helper-proto.h"
>  #include "tcg/tcg.h"
> diff --git a/plugins/loader.c b/plugins/loader.c
> index 8550e61184..05df40398d 100644
> --- a/plugins/loader.c
> +++ b/plugins/loader.c
> @@ -27,7 +27,6 @@
>  #include "qemu/xxhash.h"
>  #include "qemu/plugin.h"
>  #include "hw/core/cpu.h"
> -#include "cpu.h"
>  #include "exec/exec-all.h"
>  #ifndef CONFIG_USER_ONLY
>  #include "hw/boards.h"
> diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c
> index f9c87245b8..1c29146dcf 100644
> --- a/semihosting/arm-compat-semi.c
> +++ b/semihosting/arm-compat-semi.c
> @@ -33,7 +33,6 @@
>  
>  #include "qemu/osdep.h"
>  
> -#include "cpu.h"
>  #include "semihosting/semihost.h"
>  #include "semihosting/console.h"
>  #include "semihosting/common-semi.h"
> diff --git a/semihosting/console.c b/semihosting/console.c
> index a78af69387..ef6958d844 100644
> --- a/semihosting/console.c
> +++ b/semihosting/console.c
> @@ -16,7 +16,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "semihosting/semihost.h"
>  #include "semihosting/console.h"
>  #include "exec/gdbstub.h"
> diff --git a/softmmu/arch_init.c b/softmmu/arch_init.c
> index 8471711c54..f09bab830c 100644
> --- a/softmmu/arch_init.c
> +++ b/softmmu/arch_init.c
> @@ -22,7 +22,6 @@
>   * THE SOFTWARE.
>   */
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "sysemu/arch_init.h"
>  #include "hw/pci/pci.h"
>  #include "hw/audio/soundhw.h"
> diff --git a/softmmu/memory.c b/softmmu/memory.c
> index d4493ef9e4..a62816647b 100644
> --- a/softmmu/memory.c
> +++ b/softmmu/memory.c
> @@ -16,7 +16,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu/log.h"
>  #include "qapi/error.h"
> -#include "cpu.h"
>  #include "exec/memory.h"
>  #include "exec/address-spaces.h"
>  #include "qapi/visitor.h"
> diff --git a/softmmu/memory_mapping.c b/softmmu/memory_mapping.c
> index 18d0b8067c..e7af276546 100644
> --- a/softmmu/memory_mapping.c
> +++ b/softmmu/memory_mapping.c
> @@ -14,7 +14,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  
> -#include "cpu.h"
>  #include "sysemu/memory_mapping.h"
>  #include "exec/memory.h"
>  #include "exec/address-spaces.h"
> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
> index 7ed276b9b5..1821882614 100644
> --- a/softmmu/physmem.c
> +++ b/softmmu/physmem.c
> @@ -23,7 +23,6 @@
>  
>  #include "qemu/cutils.h"
>  #include "qemu/cacheflush.h"
> -#include "cpu.h"
>  
>  #ifdef CONFIG_TCG
>  #include "hw/core/tcg-cpu-ops.h"
> diff --git a/tcg/tcg-op-vec.c b/tcg/tcg-op-vec.c
> index d19aa7373e..15e026ae49 100644
> --- a/tcg/tcg-op-vec.c
> +++ b/tcg/tcg-op-vec.c
> @@ -18,7 +18,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "tcg/tcg.h"
>  #include "tcg/tcg-op.h"
>  #include "tcg/tcg-mo.h"
> diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
> index 70475773f4..dcc2ed0bbc 100644
> --- a/tcg/tcg-op.c
> +++ b/tcg/tcg-op.c
> @@ -23,7 +23,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "cpu.h"
>  #include "exec/exec-all.h"
>  #include "tcg/tcg.h"
>  #include "tcg/tcg-op.h"
> diff --git a/tcg/tcg.c b/tcg/tcg.c
> index cc947bf6f6..db806a6658 100644
> --- a/tcg/tcg.c
> +++ b/tcg/tcg.c
> @@ -41,7 +41,6 @@
>     CPU definitions. Currently they are used for qemu_ld/st
>     instructions */
>  #define NO_CPU_IO_DEFS
> -#include "cpu.h"
>  
>  #include "exec/exec-all.h"
>  
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



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

* Re: [PATCH 4/4] Do not include exec/address-spaces.h if it's not really necessary
  2021-04-16 17:13 ` [PATCH 4/4] Do not include exec/address-spaces.h " Thomas Huth
@ 2021-04-30 15:59   ` Laurent Vivier
  0 siblings, 0 replies; 12+ messages in thread
From: Laurent Vivier @ 2021-04-30 15:59 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: qemu-trivial

Le 16/04/2021 à 19:13, Thomas Huth a écrit :
> Stop including exec/address-spaces.h in files that don't need it.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  accel/kvm/kvm-all.c               | 1 -
>  accel/tcg/cputlb.c                | 1 -
>  hw/acpi/generic_event_device.c    | 1 -
>  hw/acpi/ich9.c                    | 1 -
>  hw/acpi/pcihp.c                   | 1 -
>  hw/acpi/piix4.c                   | 1 -
>  hw/alpha/typhoon.c                | 1 -
>  hw/arm/allwinner-a10.c            | 1 -
>  hw/arm/allwinner-h3.c             | 1 -
>  hw/arm/armv7m.c                   | 1 -
>  hw/arm/aspeed.c                   | 1 -
>  hw/arm/aspeed_ast2600.c           | 1 -
>  hw/arm/aspeed_soc.c               | 1 -
>  hw/arm/boot.c                     | 1 -
>  hw/arm/cubieboard.c               | 1 -
>  hw/arm/digic_boards.c             | 1 -
>  hw/arm/fsl-imx25.c                | 1 -
>  hw/arm/highbank.c                 | 1 -
>  hw/arm/imx25_pdk.c                | 1 -
>  hw/arm/musicpal.c                 | 1 -
>  hw/arm/npcm7xx.c                  | 1 -
>  hw/arm/npcm7xx_boards.c           | 1 -
>  hw/arm/nrf51_soc.c                | 1 -
>  hw/arm/nseries.c                  | 1 -
>  hw/arm/palm.c                     | 1 -
>  hw/arm/realview.c                 | 1 -
>  hw/arm/sbsa-ref.c                 | 1 -
>  hw/arm/smmu-common.c              | 1 -
>  hw/arm/smmuv3.c                   | 1 -
>  hw/arm/versatilepb.c              | 1 -
>  hw/arm/vexpress.c                 | 1 -
>  hw/arm/virt.c                     | 1 -
>  hw/arm/xilinx_zynq.c              | 1 -
>  hw/arm/xlnx-versal-virt.c         | 1 -
>  hw/arm/xlnx-zynqmp.c              | 1 -
>  hw/char/mchp_pfsoc_mmuart.c       | 1 -
>  hw/core/loader.c                  | 1 -
>  hw/cris/axis_dev88.c              | 1 -
>  hw/dma/pl080.c                    | 1 -
>  hw/hppa/dino.c                    | 1 -
>  hw/hppa/lasi.c                    | 1 -
>  hw/i386/intel_iommu.c             | 1 -
>  hw/i386/pc.c                      | 1 -
>  hw/i386/pc_piix.c                 | 1 -
>  hw/i386/pc_q35.c                  | 1 -
>  hw/i386/xen/xen-hvm.c             | 1 -
>  hw/i386/xen/xen_platform.c        | 1 -
>  hw/intc/openpic_kvm.c             | 1 -
>  hw/isa/lpc_ich9.c                 | 1 -
>  hw/isa/vt82c686.c                 | 1 -
>  hw/lm32/lm32_boards.c             | 1 -
>  hw/lm32/milkymist.c               | 1 -
>  hw/m68k/an5206.c                  | 1 -
>  hw/m68k/mcf5208.c                 | 1 -
>  hw/m68k/next-cube.c               | 1 -
>  hw/m68k/next-kbd.c                | 1 -
>  hw/m68k/q800.c                    | 1 -
>  hw/m68k/virt.c                    | 1 -
>  hw/mem/sparse-mem.c               | 1 -
>  hw/mips/boston.c                  | 1 -
>  hw/mips/fuloong2e.c               | 1 -
>  hw/mips/gt64xxx_pci.c             | 1 -
>  hw/mips/jazz.c                    | 1 -
>  hw/mips/loongson3_virt.c          | 1 -
>  hw/mips/malta.c                   | 1 -
>  hw/mips/mipssim.c                 | 1 -
>  hw/moxie/moxiesim.c               | 1 -
>  hw/net/msf2-emac.c                | 1 -
>  hw/nvram/nrf51_nvm.c              | 1 -
>  hw/openrisc/openrisc_sim.c        | 1 -
>  hw/pci-host/bonito.c              | 1 -
>  hw/pci-host/ppce500.c             | 1 -
>  hw/pci-host/prep.c                | 1 -
>  hw/pci-host/sabre.c               | 1 -
>  hw/pci-host/sh_pci.c              | 1 -
>  hw/pci/pci.c                      | 1 -
>  hw/pci/pcie_host.c                | 1 -
>  hw/ppc/e500.c                     | 1 -
>  hw/ppc/mac_newworld.c             | 1 -
>  hw/ppc/mac_oldworld.c             | 1 -
>  hw/ppc/pnv.c                      | 1 -
>  hw/ppc/pnv_psi.c                  | 1 -
>  hw/ppc/ppc405_boards.c            | 1 -
>  hw/ppc/ppc440_bamboo.c            | 1 -
>  hw/ppc/ppc440_pcix.c              | 1 -
>  hw/ppc/ppc440_uc.c                | 1 -
>  hw/ppc/ppc4xx_pci.c               | 1 -
>  hw/ppc/prep.c                     | 1 -
>  hw/ppc/sam460ex.c                 | 1 -
>  hw/ppc/spapr.c                    | 1 -
>  hw/ppc/spapr_iommu.c              | 1 -
>  hw/ppc/spapr_pci.c                | 1 -
>  hw/ppc/virtex_ml507.c             | 1 -
>  hw/remote/machine.c               | 1 -
>  hw/remote/memory.c                | 1 -
>  hw/remote/proxy-memory-listener.c | 1 -
>  hw/riscv/opentitan.c              | 1 -
>  hw/riscv/sifive_e.c               | 1 -
>  hw/rtc/m48t59.c                   | 1 -
>  hw/rtc/mc146818rtc.c              | 1 -
>  hw/s390x/s390-virtio-ccw.c        | 1 -
>  hw/sh4/r2d.c                      | 1 -
>  hw/sh4/shix.c                     | 1 -
>  hw/sparc/leon3.c                  | 1 -
>  hw/sparc64/niagara.c              | 1 -
>  hw/ssi/aspeed_smc.c               | 1 -
>  hw/tpm/tpm_crb.c                  | 1 -
>  hw/tricore/tc27x_soc.c            | 1 -
>  hw/tricore/triboard.c             | 1 -
>  hw/tricore/tricore_testboard.c    | 1 -
>  hw/virtio/vhost.c                 | 1 -
>  hw/virtio/virtio.c                | 1 -
>  hw/xen/xen_pt.c                   | 1 -
>  hw/xtensa/sim.c                   | 1 -
>  hw/xtensa/virt.c                  | 1 -
>  hw/xtensa/xtfpga.c                | 1 -
>  softmmu/memory.c                  | 1 -
>  softmmu/physmem.c                 | 1 -
>  target/i386/hvf/hvf.c             | 1 -
>  target/i386/hvf/x86_mmu.c         | 1 -
>  target/i386/sev.c                 | 1 -
>  target/s390x/diag.c               | 1 -
>  target/xtensa/op_helper.c         | 1 -
>  tests/qtest/fuzz/generic_fuzz.c   | 2 --
>  tests/qtest/fuzz/qos_fuzz.c       | 1 -
>  125 files changed, 126 deletions(-)
> 
> diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
> index f42b743977..e51ff2f611 100644
> --- a/accel/kvm/kvm-all.c
> +++ b/accel/kvm/kvm-all.c
> @@ -33,7 +33,6 @@
>  #include "qemu/bswap.h"
>  #include "exec/memory.h"
>  #include "exec/ram_addr.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/event_notifier.h"
>  #include "qemu/main-loop.h"
>  #include "trace.h"
> diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
> index 502f803e5e..84e7d91a5c 100644
> --- a/accel/tcg/cputlb.c
> +++ b/accel/tcg/cputlb.c
> @@ -22,7 +22,6 @@
>  #include "hw/core/tcg-cpu-ops.h"
>  #include "exec/exec-all.h"
>  #include "exec/memory.h"
> -#include "exec/address-spaces.h"
>  #include "exec/cpu_ldst.h"
>  #include "exec/cputlb.h"
>  #include "exec/tb-hash.h"
> diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
> index 5454be67d5..39c825763a 100644
> --- a/hw/acpi/generic_event_device.c
> +++ b/hw/acpi/generic_event_device.c
> @@ -11,7 +11,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "exec/address-spaces.h"
>  #include "hw/acpi/acpi.h"
>  #include "hw/acpi/generic_event_device.h"
>  #include "hw/irq.h"
> diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
> index 853447cf9d..4daa79ec8d 100644
> --- a/hw/acpi/ich9.c
> +++ b/hw/acpi/ich9.c
> @@ -35,7 +35,6 @@
>  #include "sysemu/runstate.h"
>  #include "hw/acpi/acpi.h"
>  #include "hw/acpi/tco.h"
> -#include "exec/address-spaces.h"
>  
>  #include "hw/i386/ich9.h"
>  #include "hw/mem/pc-dimm.h"
> diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
> index f4cb3c979d..4999277d57 100644
> --- a/hw/acpi/pcihp.c
> +++ b/hw/acpi/pcihp.c
> @@ -31,7 +31,6 @@
>  #include "hw/pci/pci.h"
>  #include "hw/pci/pci_bridge.h"
>  #include "hw/acpi/acpi.h"
> -#include "exec/address-spaces.h"
>  #include "hw/pci/pci_bus.h"
>  #include "migration/vmstate.h"
>  #include "qapi/error.h"
> diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
> index 8f8b0e95e5..0bd23d74e2 100644
> --- a/hw/acpi/piix4.c
> +++ b/hw/acpi/piix4.c
> @@ -33,7 +33,6 @@
>  #include "sysemu/xen.h"
>  #include "qapi/error.h"
>  #include "qemu/range.h"
> -#include "exec/address-spaces.h"
>  #include "hw/acpi/pcihp.h"
>  #include "hw/acpi/cpu_hotplug.h"
>  #include "hw/acpi/cpu.h"
> diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
> index 96c35c5fdb..87020cbe0d 100644
> --- a/hw/alpha/typhoon.c
> +++ b/hw/alpha/typhoon.c
> @@ -13,7 +13,6 @@
>  #include "cpu.h"
>  #include "hw/irq.h"
>  #include "alpha_sys.h"
> -#include "exec/address-spaces.h"
>  #include "qom/object.h"
>  
>  
> diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
> index 0844a65641..05e84728cb 100644
> --- a/hw/arm/allwinner-a10.c
> +++ b/hw/arm/allwinner-a10.c
> @@ -16,7 +16,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "exec/address-spaces.h"
>  #include "qapi/error.h"
>  #include "qemu/module.h"
>  #include "hw/sysbus.h"
> diff --git a/hw/arm/allwinner-h3.c b/hw/arm/allwinner-h3.c
> index bbe65d1860..27f1070145 100644
> --- a/hw/arm/allwinner-h3.c
> +++ b/hw/arm/allwinner-h3.c
> @@ -18,7 +18,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "exec/address-spaces.h"
>  #include "qapi/error.h"
>  #include "qemu/error-report.h"
>  #include "qemu/module.h"
> diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
> index caeed29670..af0d935bf7 100644
> --- a/hw/arm/armv7m.c
> +++ b/hw/arm/armv7m.c
> @@ -18,7 +18,6 @@
>  #include "sysemu/reset.h"
>  #include "qemu/error-report.h"
>  #include "qemu/module.h"
> -#include "exec/address-spaces.h"
>  #include "target/arm/idau.h"
>  
>  /* Bitbanded IO.  Each word corresponds to a single bit.  */
> diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> index 7480533cb7..b623226cdf 100644
> --- a/hw/arm/aspeed.c
> +++ b/hw/arm/aspeed.c
> @@ -11,7 +11,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "exec/address-spaces.h"
>  #include "hw/arm/boot.h"
>  #include "hw/arm/aspeed.h"
>  #include "hw/arm/aspeed_soc.h"
> diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
> index 8e4ef07b14..8202b4f174 100644
> --- a/hw/arm/aspeed_ast2600.c
> +++ b/hw/arm/aspeed_ast2600.c
> @@ -9,7 +9,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "exec/address-spaces.h"
>  #include "hw/misc/unimp.h"
>  #include "hw/arm/aspeed_soc.h"
>  #include "hw/char/serial.h"
> diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
> index fc270daa57..abc90ed8ec 100644
> --- a/hw/arm/aspeed_soc.c
> +++ b/hw/arm/aspeed_soc.c
> @@ -12,7 +12,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "exec/address-spaces.h"
>  #include "hw/misc/unimp.h"
>  #include "hw/arm/aspeed_soc.h"
>  #include "hw/char/serial.h"
> diff --git a/hw/arm/boot.c b/hw/arm/boot.c
> index e56c42ac22..d7b059225e 100644
> --- a/hw/arm/boot.c
> +++ b/hw/arm/boot.c
> @@ -25,7 +25,6 @@
>  #include "sysemu/device_tree.h"
>  #include "qemu/config-file.h"
>  #include "qemu/option.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/units.h"
>  
>  /* Kernel boot protocol is specified in the kernel docs
> diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
> index d7184e5ec2..294ba5de6e 100644
> --- a/hw/arm/cubieboard.c
> +++ b/hw/arm/cubieboard.c
> @@ -16,7 +16,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "exec/address-spaces.h"
>  #include "qapi/error.h"
>  #include "hw/boards.h"
>  #include "hw/qdev-properties.h"
> diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
> index fdb6781567..b771a3d8b7 100644
> --- a/hw/arm/digic_boards.c
> +++ b/hw/arm/digic_boards.c
> @@ -28,7 +28,6 @@
>  #include "qemu-common.h"
>  #include "qemu/datadir.h"
>  #include "hw/boards.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/error-report.h"
>  #include "hw/arm/digic.h"
>  #include "hw/block/flash.h"
> diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
> index dafc0bef47..24c4374590 100644
> --- a/hw/arm/fsl-imx25.c
> +++ b/hw/arm/fsl-imx25.c
> @@ -26,7 +26,6 @@
>  #include "qapi/error.h"
>  #include "hw/arm/fsl-imx25.h"
>  #include "sysemu/sysemu.h"
> -#include "exec/address-spaces.h"
>  #include "hw/qdev-properties.h"
>  #include "chardev/char.h"
>  
> diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
> index bf886268c5..7a85a34a39 100644
> --- a/hw/arm/highbank.c
> +++ b/hw/arm/highbank.c
> @@ -29,7 +29,6 @@
>  #include "sysemu/runstate.h"
>  #include "sysemu/sysemu.h"
>  #include "hw/boards.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/error-report.h"
>  #include "hw/char/pl011.h"
>  #include "hw/ide/ahci.h"
> diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c
> index 9c58fbde57..11426e5ec0 100644
> --- a/hw/arm/imx25_pdk.c
> +++ b/hw/arm/imx25_pdk.c
> @@ -29,7 +29,6 @@
>  #include "hw/arm/fsl-imx25.h"
>  #include "hw/boards.h"
>  #include "qemu/error-report.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/qtest.h"
>  #include "hw/i2c/i2c.h"
>  #include "qemu/cutils.h"
> diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
> index 7d67dc7254..2d612cc0c9 100644
> --- a/hw/arm/musicpal.c
> +++ b/hw/arm/musicpal.c
> @@ -31,7 +31,6 @@
>  #include "sysemu/block-backend.h"
>  #include "sysemu/runstate.h"
>  #include "sysemu/dma.h"
> -#include "exec/address-spaces.h"
>  #include "ui/pixel_ops.h"
>  #include "qemu/cutils.h"
>  #include "qom/object.h"
> diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c
> index 495b0f8e91..2ab0080e0b 100644
> --- a/hw/arm/npcm7xx.c
> +++ b/hw/arm/npcm7xx.c
> @@ -16,7 +16,6 @@
>  
>  #include "qemu/osdep.h"
>  
> -#include "exec/address-spaces.h"
>  #include "hw/arm/boot.h"
>  #include "hw/arm/npcm7xx.h"
>  #include "hw/char/serial.h"
> diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c
> index d91d687700..d4553e3786 100644
> --- a/hw/arm/npcm7xx_boards.c
> +++ b/hw/arm/npcm7xx_boards.c
> @@ -16,7 +16,6 @@
>  
>  #include "qemu/osdep.h"
>  
> -#include "exec/address-spaces.h"
>  #include "hw/arm/npcm7xx.h"
>  #include "hw/core/cpu.h"
>  #include "hw/i2c/smbus_eeprom.h"
> diff --git a/hw/arm/nrf51_soc.c b/hw/arm/nrf51_soc.c
> index 71bdcf06b4..9407c2f268 100644
> --- a/hw/arm/nrf51_soc.c
> +++ b/hw/arm/nrf51_soc.c
> @@ -13,7 +13,6 @@
>  #include "hw/arm/boot.h"
>  #include "hw/sysbus.h"
>  #include "hw/misc/unimp.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/log.h"
>  
>  #include "hw/arm/nrf51.h"
> diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
> index 387eea4d44..0aefa5d0f3 100644
> --- a/hw/arm/nseries.c
> +++ b/hw/arm/nseries.c
> @@ -43,7 +43,6 @@
>  #include "hw/loader.h"
>  #include "hw/sysbus.h"
>  #include "qemu/log.h"
> -#include "exec/address-spaces.h"
>  
>  /* Nokia N8x0 support */
>  struct n800_s {
> diff --git a/hw/arm/palm.c b/hw/arm/palm.c
> index 4e3dc5fbbf..68e11dd1ec 100644
> --- a/hw/arm/palm.c
> +++ b/hw/arm/palm.c
> @@ -29,7 +29,6 @@
>  #include "hw/input/tsc2xxx.h"
>  #include "hw/irq.h"
>  #include "hw/loader.h"
> -#include "exec/address-spaces.h"
>  #include "cpu.h"
>  #include "qemu/cutils.h"
>  #include "qom/object.h"
> diff --git a/hw/arm/realview.c b/hw/arm/realview.c
> index 0831159d15..1c54316ba3 100644
> --- a/hw/arm/realview.c
> +++ b/hw/arm/realview.c
> @@ -20,7 +20,6 @@
>  #include "sysemu/sysemu.h"
>  #include "hw/boards.h"
>  #include "hw/i2c/i2c.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/error-report.h"
>  #include "hw/char/pl011.h"
>  #include "hw/cpu/a9mpcore.h"
> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
> index 88dfb2284c..43c19b4923 100644
> --- a/hw/arm/sbsa-ref.c
> +++ b/hw/arm/sbsa-ref.c
> @@ -27,7 +27,6 @@
>  #include "sysemu/numa.h"
>  #include "sysemu/runstate.h"
>  #include "sysemu/sysemu.h"
> -#include "exec/address-spaces.h"
>  #include "exec/hwaddr.h"
>  #include "kvm_arm.h"
>  #include "hw/arm/boot.h"
> diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
> index 84d2c62c26..0459850a93 100644
> --- a/hw/arm/smmu-common.c
> +++ b/hw/arm/smmu-common.c
> @@ -17,7 +17,6 @@
>   */
>  
>  #include "qemu/osdep.h"
> -#include "exec/address-spaces.h"
>  #include "trace.h"
>  #include "exec/target_page.h"
>  #include "hw/core/cpu.h"
> diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
> index 8705612535..5b51ca2dd6 100644
> --- a/hw/arm/smmuv3.c
> +++ b/hw/arm/smmuv3.c
> @@ -23,7 +23,6 @@
>  #include "migration/vmstate.h"
>  #include "hw/qdev-core.h"
>  #include "hw/pci/pci.h"
> -#include "exec/address-spaces.h"
>  #include "cpu.h"
>  #include "trace.h"
>  #include "qemu/log.h"
> diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
> index 1ea5534626..575399c4fc 100644
> --- a/hw/arm/versatilepb.c
> +++ b/hw/arm/versatilepb.c
> @@ -21,7 +21,6 @@
>  #include "hw/i2c/arm_sbcon_i2c.h"
>  #include "hw/irq.h"
>  #include "hw/boards.h"
> -#include "exec/address-spaces.h"
>  #include "hw/block/flash.h"
>  #include "qemu/error-report.h"
>  #include "hw/char/pl011.h"
> diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
> index 326a1a6db5..58481c0762 100644
> --- a/hw/arm/vexpress.c
> +++ b/hw/arm/vexpress.c
> @@ -35,7 +35,6 @@
>  #include "sysemu/sysemu.h"
>  #include "hw/boards.h"
>  #include "hw/loader.h"
> -#include "exec/address-spaces.h"
>  #include "hw/block/flash.h"
>  #include "sysemu/device_tree.h"
>  #include "qemu/error-report.h"
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 300b3b18be..3415d55c99 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -50,7 +50,6 @@
>  #include "sysemu/tpm.h"
>  #include "sysemu/kvm.h"
>  #include "hw/loader.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/bitops.h"
>  #include "qemu/error-report.h"
>  #include "qemu/module.h"
> diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
> index 8db6cfd47f..85f25d15db 100644
> --- a/hw/arm/xilinx_zynq.c
> +++ b/hw/arm/xilinx_zynq.c
> @@ -22,7 +22,6 @@
>  #include "hw/sysbus.h"
>  #include "hw/arm/boot.h"
>  #include "net/net.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/sysemu.h"
>  #include "hw/boards.h"
>  #include "hw/block/flash.h"
> diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c
> index 73e8268b35..5bca360dce 100644
> --- a/hw/arm/xlnx-versal-virt.c
> +++ b/hw/arm/xlnx-versal-virt.c
> @@ -13,7 +13,6 @@
>  #include "qemu/error-report.h"
>  #include "qapi/error.h"
>  #include "sysemu/device_tree.h"
> -#include "exec/address-spaces.h"
>  #include "hw/boards.h"
>  #include "hw/sysbus.h"
>  #include "hw/arm/sysbus-fdt.h"
> diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
> index 6c93dcb820..3597e8db4d 100644
> --- a/hw/arm/xlnx-zynqmp.c
> +++ b/hw/arm/xlnx-zynqmp.c
> @@ -21,7 +21,6 @@
>  #include "hw/arm/xlnx-zynqmp.h"
>  #include "hw/intc/arm_gic_common.h"
>  #include "hw/boards.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/kvm.h"
>  #include "sysemu/sysemu.h"
>  #include "kvm_arm.h"
> diff --git a/hw/char/mchp_pfsoc_mmuart.c b/hw/char/mchp_pfsoc_mmuart.c
> index 8a002b0a19..2facf85c2d 100644
> --- a/hw/char/mchp_pfsoc_mmuart.c
> +++ b/hw/char/mchp_pfsoc_mmuart.c
> @@ -23,7 +23,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu/log.h"
>  #include "chardev/char.h"
> -#include "exec/address-spaces.h"
>  #include "hw/char/mchp_pfsoc_mmuart.h"
>  
>  static uint64_t mchp_pfsoc_mmuart_read(void *opaque, hwaddr addr, unsigned size)
> diff --git a/hw/core/loader.c b/hw/core/loader.c
> index d3e5f3b423..5b34869a54 100644
> --- a/hw/core/loader.c
> +++ b/hw/core/loader.c
> @@ -57,7 +57,6 @@
>  #include "hw/loader.h"
>  #include "hw/nvram/fw_cfg.h"
>  #include "exec/memory.h"
> -#include "exec/address-spaces.h"
>  #include "hw/boards.h"
>  #include "qemu/cutils.h"
>  #include "sysemu/runstate.h"
> diff --git a/hw/cris/axis_dev88.c b/hw/cris/axis_dev88.c
> index af5a0e3517..d82050d927 100644
> --- a/hw/cris/axis_dev88.c
> +++ b/hw/cris/axis_dev88.c
> @@ -34,7 +34,6 @@
>  #include "hw/loader.h"
>  #include "elf.h"
>  #include "boot.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/qtest.h"
>  #include "sysemu/sysemu.h"
>  
> diff --git a/hw/dma/pl080.c b/hw/dma/pl080.c
> index f1a586b1d7..2627307cc8 100644
> --- a/hw/dma/pl080.c
> +++ b/hw/dma/pl080.c
> @@ -10,7 +10,6 @@
>  #include "qemu/osdep.h"
>  #include "hw/sysbus.h"
>  #include "migration/vmstate.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/log.h"
>  #include "qemu/module.h"
>  #include "hw/dma/pl080.h"
> diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
> index bd97e0c51d..eab96dd84e 100644
> --- a/hw/hppa/dino.c
> +++ b/hw/hppa/dino.c
> @@ -19,7 +19,6 @@
>  #include "hw/pci/pci_bus.h"
>  #include "migration/vmstate.h"
>  #include "hppa_sys.h"
> -#include "exec/address-spaces.h"
>  #include "trace.h"
>  #include "qom/object.h"
>  
> diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
> index 408af9ccb7..88c3791eb6 100644
> --- a/hw/hppa/lasi.c
> +++ b/hw/hppa/lasi.c
> @@ -22,7 +22,6 @@
>  #include "hw/char/parallel.h"
>  #include "hw/char/serial.h"
>  #include "hw/input/lasips2.h"
> -#include "exec/address-spaces.h"
>  #include "migration/vmstate.h"
>  #include "qom/object.h"
>  
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index 1c10643432..209b3f5553 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -24,7 +24,6 @@
>  #include "qemu/main-loop.h"
>  #include "qapi/error.h"
>  #include "hw/sysbus.h"
> -#include "exec/address-spaces.h"
>  #include "intel_iommu_internal.h"
>  #include "hw/pci/pci.h"
>  #include "hw/pci/pci_bus.h"
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index b5ce3835e7..7d80c505a9 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -65,7 +65,6 @@
>  #include "hw/xen/start_info.h"
>  #include "ui/qemu-spice.h"
>  #include "exec/memory.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/arch_init.h"
>  #include "qemu/bitmap.h"
>  #include "qemu/config-file.h"
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 6d6cd65dcd..8404d9803e 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -47,7 +47,6 @@
>  #include "hw/i2c/smbus_eeprom.h"
>  #include "hw/xen/xen-x86.h"
>  #include "exec/memory.h"
> -#include "exec/address-spaces.h"
>  #include "hw/acpi/acpi.h"
>  #include "qapi/error.h"
>  #include "qemu/error-report.h"
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index 53450190f5..b76969fc25 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -38,7 +38,6 @@
>  #include "hw/kvm/clock.h"
>  #include "hw/pci-host/q35.h"
>  #include "hw/qdev-properties.h"
> -#include "exec/address-spaces.h"
>  #include "hw/i386/x86.h"
>  #include "hw/i386/pc.h"
>  #include "hw/i386/ich9.h"
> diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
> index 7ce672e5a5..c53fa17c50 100644
> --- a/hw/i386/xen/xen-hvm.c
> +++ b/hw/i386/xen/xen-hvm.c
> @@ -33,7 +33,6 @@
>  #include "sysemu/xen.h"
>  #include "sysemu/xen-mapcache.h"
>  #include "trace.h"
> -#include "exec/address-spaces.h"
>  
>  #include <xen/hvm/ioreq.h>
>  #include <xen/hvm/e820.h>
> diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
> index bf4f20e92b..72028449ba 100644
> --- a/hw/i386/xen/xen_platform.c
> +++ b/hw/i386/xen/xen_platform.c
> @@ -31,7 +31,6 @@
>  #include "migration/vmstate.h"
>  #include "hw/xen/xen-legacy-backend.h"
>  #include "trace.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/xen.h"
>  #include "sysemu/block-backend.h"
>  #include "qemu/error-report.h"
> diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
> index 16badace8b..21da680389 100644
> --- a/hw/intc/openpic_kvm.c
> +++ b/hw/intc/openpic_kvm.c
> @@ -25,7 +25,6 @@
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
>  #include <sys/ioctl.h>
> -#include "exec/address-spaces.h"
>  #include "hw/ppc/openpic.h"
>  #include "hw/ppc/openpic_kvm.h"
>  #include "hw/pci/msi.h"
> diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
> index 160bea447a..5f9de0239c 100644
> --- a/hw/isa/lpc_ich9.c
> +++ b/hw/isa/lpc_ich9.c
> @@ -44,7 +44,6 @@
>  #include "hw/acpi/ich9.h"
>  #include "hw/pci/pci_bus.h"
>  #include "hw/qdev-properties.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/runstate.h"
>  #include "sysemu/sysemu.h"
>  #include "hw/core/cpu.h"
> diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
> index 98325bb32b..31b1818b21 100644
> --- a/hw/isa/vt82c686.c
> +++ b/hw/isa/vt82c686.c
> @@ -30,7 +30,6 @@
>  #include "qemu/module.h"
>  #include "qemu/range.h"
>  #include "qemu/timer.h"
> -#include "exec/address-spaces.h"
>  #include "trace.h"
>  
>  #define TYPE_VIA_PM "via-pm"
> diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
> index b5d97dd53e..2961e4c2b4 100644
> --- a/hw/lm32/lm32_boards.c
> +++ b/hw/lm32/lm32_boards.c
> @@ -30,7 +30,6 @@
>  #include "elf.h"
>  #include "lm32_hwsetup.h"
>  #include "lm32.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/reset.h"
>  #include "sysemu/sysemu.h"
>  
> diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
> index 72d1326531..bef7855328 100644
> --- a/hw/lm32/milkymist.c
> +++ b/hw/lm32/milkymist.c
> @@ -37,7 +37,6 @@
>  #include "hw/display/milkymist_tmu2.h"
>  #include "hw/sd/sd.h"
>  #include "lm32.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/cutils.h"
>  
>  #define BIOS_FILENAME    "mmone-bios.bin"
> diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
> index 673898b0ea..11ae4c9795 100644
> --- a/hw/m68k/an5206.c
> +++ b/hw/m68k/an5206.c
> @@ -13,7 +13,6 @@
>  #include "hw/boards.h"
>  #include "hw/loader.h"
>  #include "elf.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/qtest.h"
>  
> diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
> index 7a03c71059..93812ee206 100644
> --- a/hw/m68k/mcf5208.c
> +++ b/hw/m68k/mcf5208.c
> @@ -26,7 +26,6 @@
>  #include "hw/loader.h"
>  #include "hw/sysbus.h"
>  #include "elf.h"
> -#include "exec/address-spaces.h"
>  
>  #define SYS_FREQ 166666666
>  
> diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
> index 5bd4f2d832..de951ffe5d 100644
> --- a/hw/m68k/next-cube.c
> +++ b/hw/m68k/next-cube.c
> @@ -11,7 +11,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "exec/hwaddr.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/sysemu.h"
>  #include "sysemu/qtest.h"
>  #include "hw/irq.h"
> diff --git a/hw/m68k/next-kbd.c b/hw/m68k/next-kbd.c
> index 30a8c9fbfa..0544160e91 100644
> --- a/hw/m68k/next-kbd.c
> +++ b/hw/m68k/next-kbd.c
> @@ -29,7 +29,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qemu/log.h"
> -#include "exec/address-spaces.h"
>  #include "hw/sysbus.h"
>  #include "hw/m68k/next-cube.h"
>  #include "ui/console.h"
> diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
> index d1ab1ff77d..11376daa85 100644
> --- a/hw/m68k/q800.c
> +++ b/hw/m68k/q800.c
> @@ -31,7 +31,6 @@
>  #include "elf.h"
>  #include "hw/loader.h"
>  #include "ui/console.h"
> -#include "exec/address-spaces.h"
>  #include "hw/char/escc.h"
>  #include "hw/sysbus.h"
>  #include "hw/scsi/esp.h"
> diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c
> index 9469f82800..4e8bce5aa6 100644
> --- a/hw/m68k/virt.c
> +++ b/hw/m68k/virt.c
> @@ -17,7 +17,6 @@
>  #include "elf.h"
>  #include "hw/loader.h"
>  #include "ui/console.h"
> -#include "exec/address-spaces.h"
>  #include "hw/sysbus.h"
>  #include "standard-headers/asm-m68k/bootinfo.h"
>  #include "standard-headers/asm-m68k/bootinfo-virt.h"
> diff --git a/hw/mem/sparse-mem.c b/hw/mem/sparse-mem.c
> index a13ac74dd9..e6640eb8e7 100644
> --- a/hw/mem/sparse-mem.c
> +++ b/hw/mem/sparse-mem.c
> @@ -12,7 +12,6 @@
>  
>  #include "qemu/osdep.h"
>  
> -#include "exec/address-spaces.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/sysbus.h"
>  #include "qapi/error.h"
> diff --git a/hw/mips/boston.c b/hw/mips/boston.c
> index ac2e93a05a..20b06865b2 100644
> --- a/hw/mips/boston.c
> +++ b/hw/mips/boston.c
> @@ -20,7 +20,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu/units.h"
>  
> -#include "exec/address-spaces.h"
>  #include "hw/boards.h"
>  #include "hw/char/serial.h"
>  #include "hw/ide/pci.h"
> diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
> index 1851eb0944..c1b8066a13 100644
> --- a/hw/mips/fuloong2e.c
> +++ b/hw/mips/fuloong2e.c
> @@ -38,7 +38,6 @@
>  #include "hw/qdev-properties.h"
>  #include "elf.h"
>  #include "hw/isa/vt82c686.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/qtest.h"
>  #include "sysemu/reset.h"
>  #include "sysemu/sysemu.h"
> diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c
> index 43349d6837..c7480bd019 100644
> --- a/hw/mips/gt64xxx_pci.c
> +++ b/hw/mips/gt64xxx_pci.c
> @@ -33,7 +33,6 @@
>  #include "migration/vmstate.h"
>  #include "hw/intc/i8259.h"
>  #include "hw/irq.h"
> -#include "exec/address-spaces.h"
>  #include "trace.h"
>  #include "qom/object.h"
>  
> diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c
> index 1a0888a0fd..dba2088ed1 100644
> --- a/hw/mips/jazz.c
> +++ b/hw/mips/jazz.c
> @@ -47,7 +47,6 @@
>  #include "hw/audio/pcspk.h"
>  #include "hw/input/i8042.h"
>  #include "hw/sysbus.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/qtest.h"
>  #include "sysemu/reset.h"
>  #include "qapi/error.h"
> diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
> index 16f7f84d34..ae192db0c8 100644
> --- a/hw/mips/loongson3_virt.c
> +++ b/hw/mips/loongson3_virt.c
> @@ -47,7 +47,6 @@
>  #include "hw/pci-host/gpex.h"
>  #include "hw/usb.h"
>  #include "net/net.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/kvm.h"
>  #include "sysemu/qtest.h"
>  #include "sysemu/reset.h"
> diff --git a/hw/mips/malta.c b/hw/mips/malta.c
> index 459791414a..7dcf175d72 100644
> --- a/hw/mips/malta.c
> +++ b/hw/mips/malta.c
> @@ -45,7 +45,6 @@
>  #include "hw/irq.h"
>  #include "hw/loader.h"
>  #include "elf.h"
> -#include "exec/address-spaces.h"
>  #include "qom/object.h"
>  #include "hw/sysbus.h"             /* SysBusDevice */
>  #include "qemu/host-utils.h"
> diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c
> index 2e0d4aceed..2325e7e05a 100644
> --- a/hw/mips/mipssim.c
> +++ b/hw/mips/mipssim.c
> @@ -42,7 +42,6 @@
>  #include "elf.h"
>  #include "hw/sysbus.h"
>  #include "hw/qdev-properties.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/qtest.h"
>  #include "sysemu/reset.h"
> diff --git a/hw/moxie/moxiesim.c b/hw/moxie/moxiesim.c
> index 196b730589..3d255d4879 100644
> --- a/hw/moxie/moxiesim.c
> +++ b/hw/moxie/moxiesim.c
> @@ -35,7 +35,6 @@
>  #include "hw/boards.h"
>  #include "hw/loader.h"
>  #include "hw/char/serial.h"
> -#include "exec/address-spaces.h"
>  #include "elf.h"
>  
>  #define PHYS_MEM_BASE 0x80000000
> diff --git a/hw/net/msf2-emac.c b/hw/net/msf2-emac.c
> index 3e6206044f..9278fdce0b 100644
> --- a/hw/net/msf2-emac.c
> +++ b/hw/net/msf2-emac.c
> @@ -32,7 +32,6 @@
>  #include "qemu-common.h"
>  #include "qemu/log.h"
>  #include "qapi/error.h"
> -#include "exec/address-spaces.h"
>  #include "hw/registerfields.h"
>  #include "hw/net/msf2-emac.h"
>  #include "hw/net/mii.h"
> diff --git a/hw/nvram/nrf51_nvm.c b/hw/nvram/nrf51_nvm.c
> index 7b3460d52d..7f1db8c423 100644
> --- a/hw/nvram/nrf51_nvm.c
> +++ b/hw/nvram/nrf51_nvm.c
> @@ -21,7 +21,6 @@
>  #include "qapi/error.h"
>  #include "qemu/log.h"
>  #include "qemu/module.h"
> -#include "exec/address-spaces.h"
>  #include "hw/arm/nrf51.h"
>  #include "hw/nvram/nrf51_nvm.h"
>  #include "hw/qdev-properties.h"
> diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
> index 39f1d344ae..73fe383c2d 100644
> --- a/hw/openrisc/openrisc_sim.c
> +++ b/hw/openrisc/openrisc_sim.c
> @@ -29,7 +29,6 @@
>  #include "net/net.h"
>  #include "hw/loader.h"
>  #include "hw/qdev-properties.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/sysemu.h"
>  #include "hw/sysbus.h"
>  #include "sysemu/qtest.h"
> diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
> index 2a2db7cea6..afb3d1f81d 100644
> --- a/hw/pci-host/bonito.c
> +++ b/hw/pci-host/bonito.c
> @@ -49,7 +49,6 @@
>  #include "migration/vmstate.h"
>  #include "sysemu/reset.h"
>  #include "sysemu/runstate.h"
> -#include "exec/address-spaces.h"
>  #include "hw/misc/unimp.h"
>  #include "hw/registerfields.h"
>  #include "qom/object.h"
> diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c
> index 5ad1424b31..89c1b53dd7 100644
> --- a/hw/pci-host/ppce500.c
> +++ b/hw/pci-host/ppce500.c
> @@ -415,7 +415,6 @@ static const VMStateDescription vmstate_ppce500_pci = {
>      }
>  };
>  
> -#include "exec/address-spaces.h"
>  
>  static void e500_pcihost_bridge_realize(PCIDevice *d, Error **errp)
>  {
> diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
> index 0a9162fba9..9fef74fc56 100644
> --- a/hw/pci-host/prep.c
> +++ b/hw/pci-host/prep.c
> @@ -38,7 +38,6 @@
>  #include "hw/irq.h"
>  #include "hw/loader.h"
>  #include "hw/or-irq.h"
> -#include "exec/address-spaces.h"
>  #include "elf.h"
>  #include "qom/object.h"
>  
> diff --git a/hw/pci-host/sabre.c b/hw/pci-host/sabre.c
> index f41a0cc301..949ecc21f2 100644
> --- a/hw/pci-host/sabre.c
> +++ b/hw/pci-host/sabre.c
> @@ -34,7 +34,6 @@
>  #include "hw/irq.h"
>  #include "hw/pci-bridge/simba.h"
>  #include "hw/pci-host/sabre.h"
> -#include "exec/address-spaces.h"
>  #include "qapi/error.h"
>  #include "qemu/log.h"
>  #include "qemu/module.h"
> diff --git a/hw/pci-host/sh_pci.c b/hw/pci-host/sh_pci.c
> index 734892f47c..08c1562e22 100644
> --- a/hw/pci-host/sh_pci.c
> +++ b/hw/pci-host/sh_pci.c
> @@ -30,7 +30,6 @@
>  #include "hw/pci/pci_host.h"
>  #include "qemu/bswap.h"
>  #include "qemu/module.h"
> -#include "exec/address-spaces.h"
>  #include "qom/object.h"
>  
>  #define TYPE_SH_PCI_HOST_BRIDGE "sh_pci"
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 8f35e13a0c..377084f1a8 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -45,7 +45,6 @@
>  #include "trace.h"
>  #include "hw/pci/msi.h"
>  #include "hw/pci/msix.h"
> -#include "exec/address-spaces.h"
>  #include "hw/hotplug.h"
>  #include "hw/boards.h"
>  #include "qapi/error.h"
> diff --git a/hw/pci/pcie_host.c b/hw/pci/pcie_host.c
> index 3534006f99..5abbe83220 100644
> --- a/hw/pci/pcie_host.c
> +++ b/hw/pci/pcie_host.c
> @@ -23,7 +23,6 @@
>  #include "hw/pci/pci.h"
>  #include "hw/pci/pcie_host.h"
>  #include "qemu/module.h"
> -#include "exec/address-spaces.h"
>  
>  /* a helper function to get a PCIDevice for a given mmconfig address */
>  static inline PCIDevice *pcie_dev_find_by_mmcfg_addr(PCIBus *s,
> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
> index 03b3bd322f..95451414dd 100644
> --- a/hw/ppc/e500.c
> +++ b/hw/ppc/e500.c
> @@ -38,7 +38,6 @@
>  #include "hw/loader.h"
>  #include "elf.h"
>  #include "hw/sysbus.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/host-utils.h"
>  #include "qemu/option.h"
>  #include "hw/pci-host/ppce500.h"
> diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
> index 9659857dba..f24abf71af 100644
> --- a/hw/ppc/mac_newworld.c
> +++ b/hw/ppc/mac_newworld.c
> @@ -70,7 +70,6 @@
>  #include "sysemu/reset.h"
>  #include "kvm_ppc.h"
>  #include "hw/usb.h"
> -#include "exec/address-spaces.h"
>  #include "hw/sysbus.h"
>  #include "trace.h"
>  
> diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
> index 95d3d95158..de2be960e6 100644
> --- a/hw/ppc/mac_oldworld.c
> +++ b/hw/ppc/mac_oldworld.c
> @@ -48,7 +48,6 @@
>  #include "sysemu/kvm.h"
>  #include "sysemu/reset.h"
>  #include "kvm_ppc.h"
> -#include "exec/address-spaces.h"
>  
>  #define MAX_IDE_BUS 2
>  #define CFG_ADDR 0xf0000510
> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
> index 22b1c4f1f3..ffe01977cd 100644
> --- a/hw/ppc/pnv.c
> +++ b/hw/ppc/pnv.c
> @@ -38,7 +38,6 @@
>  #include "hw/ppc/pnv_core.h"
>  #include "hw/loader.h"
>  #include "hw/nmi.h"
> -#include "exec/address-spaces.h"
>  #include "qapi/visitor.h"
>  #include "monitor/monitor.h"
>  #include "hw/intc/intc.h"
> diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c
> index 3e868c8c8d..382ac20fa6 100644
> --- a/hw/ppc/pnv_psi.c
> +++ b/hw/ppc/pnv_psi.c
> @@ -26,7 +26,6 @@
>  #include "qapi/error.h"
>  #include "monitor/monitor.h"
>  
> -#include "exec/address-spaces.h"
>  
>  #include "hw/ppc/fdt.h"
>  #include "hw/ppc/pnv.h"
> diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
> index 8da7bc7af9..972a7a4a3e 100644
> --- a/hw/ppc/ppc405_boards.c
> +++ b/hw/ppc/ppc405_boards.c
> @@ -40,7 +40,6 @@
>  #include "hw/boards.h"
>  #include "qemu/error-report.h"
>  #include "hw/loader.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/cutils.h"
>  
>  #define BIOS_FILENAME "ppc405_rom.bin"
> diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
> index b7539aa721..7fb620b9a0 100644
> --- a/hw/ppc/ppc440_bamboo.c
> +++ b/hw/ppc/ppc440_bamboo.c
> @@ -25,7 +25,6 @@
>  #include "sysemu/device_tree.h"
>  #include "hw/loader.h"
>  #include "elf.h"
> -#include "exec/address-spaces.h"
>  #include "hw/char/serial.h"
>  #include "hw/ppc/ppc.h"
>  #include "ppc405.h"
> diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c
> index 91cbcd0504..788d25514a 100644
> --- a/hw/ppc/ppc440_pcix.c
> +++ b/hw/ppc/ppc440_pcix.c
> @@ -28,7 +28,6 @@
>  #include "hw/ppc/ppc4xx.h"
>  #include "hw/pci/pci.h"
>  #include "hw/pci/pci_host.h"
> -#include "exec/address-spaces.h"
>  #include "trace.h"
>  #include "qom/object.h"
>  
> diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c
> index 96a1fe06c3..993e3ba955 100644
> --- a/hw/ppc/ppc440_uc.c
> +++ b/hw/ppc/ppc440_uc.c
> @@ -15,7 +15,6 @@
>  #include "qemu/log.h"
>  #include "qemu/module.h"
>  #include "hw/irq.h"
> -#include "exec/address-spaces.h"
>  #include "exec/memory.h"
>  #include "hw/ppc/ppc.h"
>  #include "hw/qdev-properties.h"
> diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
> index e8789f64e8..8147ba6f94 100644
> --- a/hw/ppc/ppc4xx_pci.c
> +++ b/hw/ppc/ppc4xx_pci.c
> @@ -28,7 +28,6 @@
>  #include "sysemu/reset.h"
>  #include "hw/pci/pci.h"
>  #include "hw/pci/pci_host.h"
> -#include "exec/address-spaces.h"
>  #include "trace.h"
>  #include "qom/object.h"
>  
> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
> index e8dc128308..acfc2a91d8 100644
> --- a/hw/ppc/prep.c
> +++ b/hw/ppc/prep.c
> @@ -43,7 +43,6 @@
>  #include "sysemu/arch_init.h"
>  #include "sysemu/kvm.h"
>  #include "sysemu/reset.h"
> -#include "exec/address-spaces.h"
>  #include "trace.h"
>  #include "elf.h"
>  #include "qemu/units.h"
> diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
> index 0c6baf77e8..0737234d66 100644
> --- a/hw/ppc/sam460ex.c
> +++ b/hw/ppc/sam460ex.c
> @@ -24,7 +24,6 @@
>  #include "sysemu/block-backend.h"
>  #include "hw/loader.h"
>  #include "elf.h"
> -#include "exec/address-spaces.h"
>  #include "exec/memory.h"
>  #include "ppc440.h"
>  #include "ppc405.h"
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 89e0e60446..7aaa6f3c8a 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -69,7 +69,6 @@
>  #include "hw/virtio/virtio-scsi.h"
>  #include "hw/virtio/vhost-scsi-common.h"
>  
> -#include "exec/address-spaces.h"
>  #include "exec/ram_addr.h"
>  #include "hw/usb.h"
>  #include "qemu/config-file.h"
> diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
> index 24537ffcbd..db01071858 100644
> --- a/hw/ppc/spapr_iommu.c
> +++ b/hw/ppc/spapr_iommu.c
> @@ -25,7 +25,6 @@
>  #include "kvm_ppc.h"
>  #include "migration/vmstate.h"
>  #include "sysemu/dma.h"
> -#include "exec/address-spaces.h"
>  #include "trace.h"
>  
>  #include "hw/ppc/spapr.h"
> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> index 4effe23a18..7a725855f9 100644
> --- a/hw/ppc/spapr_pci.c
> +++ b/hw/ppc/spapr_pci.c
> @@ -34,7 +34,6 @@
>  #include "hw/pci/pci_host.h"
>  #include "hw/ppc/spapr.h"
>  #include "hw/pci-host/spapr.h"
> -#include "exec/address-spaces.h"
>  #include "exec/ram_addr.h"
>  #include <libfdt.h>
>  #include "trace.h"
> diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
> index 3a57604ac0..9c575403b8 100644
> --- a/hw/ppc/virtex_ml507.c
> +++ b/hw/ppc/virtex_ml507.c
> @@ -39,7 +39,6 @@
>  #include "qapi/error.h"
>  #include "qemu/error-report.h"
>  #include "qemu/option.h"
> -#include "exec/address-spaces.h"
>  
>  #include "hw/intc/ppc-uic.h"
>  #include "hw/ppc/ppc.h"
> diff --git a/hw/remote/machine.c b/hw/remote/machine.c
> index c0ab4f528a..952105eab5 100644
> --- a/hw/remote/machine.c
> +++ b/hw/remote/machine.c
> @@ -17,7 +17,6 @@
>  #include "qemu-common.h"
>  
>  #include "hw/remote/machine.h"
> -#include "exec/address-spaces.h"
>  #include "exec/memory.h"
>  #include "qapi/error.h"
>  #include "hw/pci/pci_host.h"
> diff --git a/hw/remote/memory.c b/hw/remote/memory.c
> index 32085b1e05..2d4174614a 100644
> --- a/hw/remote/memory.c
> +++ b/hw/remote/memory.c
> @@ -12,7 +12,6 @@
>  #include "qemu-common.h"
>  
>  #include "hw/remote/memory.h"
> -#include "exec/address-spaces.h"
>  #include "exec/ram_addr.h"
>  #include "qapi/error.h"
>  
> diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c
> index 3649919f66..901dbf1357 100644
> --- a/hw/remote/proxy-memory-listener.c
> +++ b/hw/remote/proxy-memory-listener.c
> @@ -15,7 +15,6 @@
>  #include "exec/memory.h"
>  #include "exec/cpu-common.h"
>  #include "exec/ram_addr.h"
> -#include "exec/address-spaces.h"
>  #include "qapi/error.h"
>  #include "hw/remote/mpqemu-link.h"
>  #include "hw/remote/proxy-memory-listener.h"
> diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c
> index e168bffe69..dc9dea117e 100644
> --- a/hw/riscv/opentitan.c
> +++ b/hw/riscv/opentitan.c
> @@ -24,7 +24,6 @@
>  #include "hw/boards.h"
>  #include "hw/misc/unimp.h"
>  #include "hw/riscv/boot.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/units.h"
>  #include "sysemu/sysemu.h"
>  
> diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c
> index 97e8b0b0a2..3e8b44b2c0 100644
> --- a/hw/riscv/sifive_e.c
> +++ b/hw/riscv/sifive_e.c
> @@ -47,7 +47,6 @@
>  #include "chardev/char.h"
>  #include "sysemu/arch_init.h"
>  #include "sysemu/sysemu.h"
> -#include "exec/address-spaces.h"
>  
>  static MemMapEntry sifive_e_memmap[] = {
>      [SIFIVE_E_DEV_DEBUG] =    {        0x0,     0x1000 },
> diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c
> index d54929e861..690f4e071a 100644
> --- a/hw/rtc/m48t59.c
> +++ b/hw/rtc/m48t59.c
> @@ -32,7 +32,6 @@
>  #include "sysemu/runstate.h"
>  #include "sysemu/sysemu.h"
>  #include "hw/sysbus.h"
> -#include "exec/address-spaces.h"
>  #include "qapi/error.h"
>  #include "qemu/bcd.h"
>  #include "qemu/module.h"
> diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c
> index 5d0fcacd0c..36a2dbf62f 100644
> --- a/hw/rtc/mc146818rtc.c
> +++ b/hw/rtc/mc146818rtc.c
> @@ -42,7 +42,6 @@
>  #include "qapi/error.h"
>  #include "qapi/qapi-events-misc-target.h"
>  #include "qapi/visitor.h"
> -#include "exec/address-spaces.h"
>  #include "hw/rtc/mc146818rtc_regs.h"
>  
>  #ifdef TARGET_I386
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index 41f10e3ff5..8002308a11 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -13,7 +13,6 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> -#include "exec/address-spaces.h"
>  #include "exec/ram_addr.h"
>  #include "hw/s390x/s390-virtio-hcall.h"
>  #include "hw/s390x/sclp.h"
> diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
> index 443820901d..006010f30a 100644
> --- a/hw/sh4/r2d.c
> +++ b/hw/sh4/r2d.c
> @@ -42,7 +42,6 @@
>  #include "hw/loader.h"
>  #include "hw/usb.h"
>  #include "hw/block/flash.h"
> -#include "exec/address-spaces.h"
>  
>  #define FLASH_BASE 0x00000000
>  #define FLASH_SIZE (16 * MiB)
> diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
> index 1a44378df4..b0579aa0f1 100644
> --- a/hw/sh4/shix.c
> +++ b/hw/sh4/shix.c
> @@ -34,7 +34,6 @@
>  #include "sysemu/qtest.h"
>  #include "hw/boards.h"
>  #include "hw/loader.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/error-report.h"
>  
>  #define BIOS_FILENAME "shix_bios.bin"
> diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
> index 7e16eea9e6..eb5d2a6792 100644
> --- a/hw/sparc/leon3.c
> +++ b/hw/sparc/leon3.c
> @@ -40,7 +40,6 @@
>  #include "hw/loader.h"
>  #include "elf.h"
>  #include "trace.h"
> -#include "exec/address-spaces.h"
>  
>  #include "hw/sparc/grlib.h"
>  #include "hw/misc/grlib_ahb_apb_pnp.h"
> diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
> index a87d55f6bb..f3e42d0326 100644
> --- a/hw/sparc64/niagara.c
> +++ b/hw/sparc64/niagara.c
> @@ -31,7 +31,6 @@
>  #include "hw/loader.h"
>  #include "hw/sparc/sparc64.h"
>  #include "hw/rtc/sun4v-rtc.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/block-backend.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/qtest.h"
> diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
> index 16addee4dc..72cb2175c5 100644
> --- a/hw/ssi/aspeed_smc.c
> +++ b/hw/ssi/aspeed_smc.c
> @@ -29,7 +29,6 @@
>  #include "qemu/module.h"
>  #include "qemu/error-report.h"
>  #include "qapi/error.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/units.h"
>  #include "trace.h"
>  
> diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
> index aa9c00aad3..58ebd1469c 100644
> --- a/hw/tpm/tpm_crb.c
> +++ b/hw/tpm/tpm_crb.c
> @@ -18,7 +18,6 @@
>  
>  #include "qemu/module.h"
>  #include "qapi/error.h"
> -#include "exec/address-spaces.h"
>  #include "hw/qdev-properties.h"
>  #include "hw/pci/pci_ids.h"
>  #include "hw/acpi/tpm.h"
> diff --git a/hw/tricore/tc27x_soc.c b/hw/tricore/tc27x_soc.c
> index d66d6980c3..ecd92717b5 100644
> --- a/hw/tricore/tc27x_soc.c
> +++ b/hw/tricore/tc27x_soc.c
> @@ -24,7 +24,6 @@
>  #include "hw/loader.h"
>  #include "qemu/units.h"
>  #include "hw/misc/unimp.h"
> -#include "exec/address-spaces.h"
>  
>  #include "hw/tricore/tc27x_soc.h"
>  #include "hw/tricore/triboard.h"
> diff --git a/hw/tricore/triboard.c b/hw/tricore/triboard.c
> index 943f706989..4dba0259cd 100644
> --- a/hw/tricore/triboard.c
> +++ b/hw/tricore/triboard.c
> @@ -24,7 +24,6 @@
>  #include "hw/qdev-properties.h"
>  #include "net/net.h"
>  #include "hw/loader.h"
> -#include "exec/address-spaces.h"
>  #include "elf.h"
>  #include "hw/tricore/tricore.h"
>  #include "qemu/error-report.h"
> diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c
> index 12ea1490fd..51658d9e37 100644
> --- a/hw/tricore/tricore_testboard.c
> +++ b/hw/tricore/tricore_testboard.c
> @@ -25,7 +25,6 @@
>  #include "net/net.h"
>  #include "hw/boards.h"
>  #include "hw/loader.h"
> -#include "exec/address-spaces.h"
>  #include "elf.h"
>  #include "hw/tricore/tricore.h"
>  #include "qemu/error-report.h"
> diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
> index e2163a0d63..7b7bde7657 100644
> --- a/hw/virtio/vhost.c
> +++ b/hw/virtio/vhost.c
> @@ -21,7 +21,6 @@
>  #include "qemu/error-report.h"
>  #include "qemu/memfd.h"
>  #include "standard-headers/linux/vhost_types.h"
> -#include "exec/address-spaces.h"
>  #include "hw/virtio/virtio-bus.h"
>  #include "hw/virtio/virtio-access.h"
>  #include "migration/blocker.h"
> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> index 07f4e60b30..9e13cb9e3a 100644
> --- a/hw/virtio/virtio.c
> +++ b/hw/virtio/virtio.c
> @@ -15,7 +15,6 @@
>  #include "qapi/error.h"
>  #include "cpu.h"
>  #include "trace.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/error-report.h"
>  #include "qemu/log.h"
>  #include "qemu/main-loop.h"
> diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
> index a513fdd62d..232482d65f 100644
> --- a/hw/xen/xen_pt.c
> +++ b/hw/xen/xen_pt.c
> @@ -64,7 +64,6 @@
>  #include "hw/xen/xen-legacy-backend.h"
>  #include "xen_pt.h"
>  #include "qemu/range.h"
> -#include "exec/address-spaces.h"
>  
>  static bool has_igd_gfx_passthru;
>  
> diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
> index c38e522b02..2028fe793d 100644
> --- a/hw/xtensa/sim.c
> +++ b/hw/xtensa/sim.c
> @@ -33,7 +33,6 @@
>  #include "hw/loader.h"
>  #include "elf.h"
>  #include "exec/memory.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/error-report.h"
>  #include "xtensa_memory.h"
>  #include "xtensa_sim.h"
> diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c
> index 18d3c3cdb2..a18e3fc910 100644
> --- a/hw/xtensa/virt.c
> +++ b/hw/xtensa/virt.c
> @@ -34,7 +34,6 @@
>  #include "net/net.h"
>  #include "elf.h"
>  #include "exec/memory.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/error-report.h"
>  #include "xtensa_memory.h"
>  #include "xtensa_sim.h"
> diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
> index 7be53f1895..17f087b395 100644
> --- a/hw/xtensa/xtfpga.c
> +++ b/hw/xtensa/xtfpga.c
> @@ -35,7 +35,6 @@
>  #include "hw/qdev-properties.h"
>  #include "elf.h"
>  #include "exec/memory.h"
> -#include "exec/address-spaces.h"
>  #include "hw/char/serial.h"
>  #include "net/net.h"
>  #include "hw/sysbus.h"
> diff --git a/softmmu/memory.c b/softmmu/memory.c
> index a62816647b..3bb533c0bc 100644
> --- a/softmmu/memory.c
> +++ b/softmmu/memory.c
> @@ -17,7 +17,6 @@
>  #include "qemu/log.h"
>  #include "qapi/error.h"
>  #include "exec/memory.h"
> -#include "exec/address-spaces.h"
>  #include "qapi/visitor.h"
>  #include "qemu/bitops.h"
>  #include "qemu/error-report.h"
> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
> index 1821882614..5232696571 100644
> --- a/softmmu/physmem.c
> +++ b/softmmu/physmem.c
> @@ -46,7 +46,6 @@
>  #include "sysemu/dma.h"
>  #include "sysemu/hostmem.h"
>  #include "sysemu/hw_accel.h"
> -#include "exec/address-spaces.h"
>  #include "sysemu/xen-mapcache.h"
>  #include "trace/trace-root.h"
>  
> diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
> index 15f14ac69e..f044181d06 100644
> --- a/target/i386/hvf/hvf.c
> +++ b/target/i386/hvf/hvf.c
> @@ -67,7 +67,6 @@
>  #include <Hypervisor/hv_vmx.h>
>  #include <sys/sysctl.h>
>  
> -#include "exec/address-spaces.h"
>  #include "hw/i386/apic_internal.h"
>  #include "qemu/main-loop.h"
>  #include "qemu/accel.h"
> diff --git a/target/i386/hvf/x86_mmu.c b/target/i386/hvf/x86_mmu.c
> index 882a6237ee..78fff04684 100644
> --- a/target/i386/hvf/x86_mmu.c
> +++ b/target/i386/hvf/x86_mmu.c
> @@ -24,7 +24,6 @@
>  #include "x86_mmu.h"
>  #include "vmcs.h"
>  #include "vmx.h"
> -#include "exec/address-spaces.h"
>  
>  #define pte_present(pte) (pte & PT_PRESENT)
>  #define pte_write_access(pte) (pte & PT_WRITE)
> diff --git a/target/i386/sev.c b/target/i386/sev.c
> index 72b9e2ab40..9a43be11cb 100644
> --- a/target/i386/sev.c
> +++ b/target/i386/sev.c
> @@ -30,7 +30,6 @@
>  #include "trace.h"
>  #include "migration/blocker.h"
>  #include "qom/object.h"
> -#include "exec/address-spaces.h"
>  #include "monitor/monitor.h"
>  #include "exec/confidential-guest-support.h"
>  #include "hw/i386/pc.h"
> diff --git a/target/s390x/diag.c b/target/s390x/diag.c
> index 1a48429564..d620cd4bd4 100644
> --- a/target/s390x/diag.c
> +++ b/target/s390x/diag.c
> @@ -15,7 +15,6 @@
>  #include "qemu/osdep.h"
>  #include "cpu.h"
>  #include "internal.h"
> -#include "exec/address-spaces.h"
>  #include "hw/watchdog/wdt_diag288.h"
>  #include "sysemu/cpus.h"
>  #include "hw/s390x/ipl.h"
> diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c
> index 143476849f..d85d3516d6 100644
> --- a/target/xtensa/op_helper.c
> +++ b/target/xtensa/op_helper.c
> @@ -32,7 +32,6 @@
>  #include "qemu/host-utils.h"
>  #include "exec/exec-all.h"
>  #include "exec/cpu_ldst.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/timer.h"
>  
>  #ifndef CONFIG_USER_ONLY
> diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c
> index ae219540b4..cea7d4058e 100644
> --- a/tests/qtest/fuzz/generic_fuzz.c
> +++ b/tests/qtest/fuzz/generic_fuzz.c
> @@ -19,11 +19,9 @@
>  #include "tests/qtest/libqos/pci-pc.h"
>  #include "fuzz.h"
>  #include "fork_fuzz.h"
> -#include "exec/address-spaces.h"
>  #include "string.h"
>  #include "exec/memory.h"
>  #include "exec/ramblock.h"
> -#include "exec/address-spaces.h"
>  #include "hw/qdev-core.h"
>  #include "hw/pci/pci.h"
>  #include "hw/boards.h"
> diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c
> index 2bc474645c..7a244c951e 100644
> --- a/tests/qtest/fuzz/qos_fuzz.c
> +++ b/tests/qtest/fuzz/qos_fuzz.c
> @@ -21,7 +21,6 @@
>  #include "qapi/error.h"
>  #include "qemu-common.h"
>  #include "exec/memory.h"
> -#include "exec/address-spaces.h"
>  #include "qemu/main-loop.h"
>  
>  #include "tests/qtest/libqos/libqtest.h"
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



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

end of thread, other threads:[~2021-04-30 16:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 17:13 [PATCH for-6.1 0/4] Remove more superfluous include statements Thomas Huth
2021-04-16 17:13 ` [PATCH 1/4] Do not include sysemu/sysemu.h if it's not really necessary Thomas Huth
2021-04-30 15:59   ` Laurent Vivier
2021-04-16 17:13 ` [PATCH 2/4] Do not include hw/boards.h " Thomas Huth
2021-04-16 17:53   ` Philippe Mathieu-Daudé
2021-04-16 18:04     ` Thomas Huth
2021-04-17  9:50       ` Markus Armbruster
2021-04-30 15:59   ` Laurent Vivier
2021-04-16 17:13 ` [PATCH 3/4] Do not include cpu.h " Thomas Huth
2021-04-30 15:59   ` Laurent Vivier
2021-04-16 17:13 ` [PATCH 4/4] Do not include exec/address-spaces.h " Thomas Huth
2021-04-30 15:59   ` Laurent Vivier

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).