Skip to contentSkip to conversation

Tame a few "touch this, recompile the world" headers

PATCH Superseded Markus Armbruster 4 participants 49 messages Aug 9, 2019 – Aug 15, 2019 Page 2 of 3

Subsystems (15)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#17 lore raw

PATCH v3 15/29 Include migration/vmstate.h less

In reply to Markus Armbruster

In my "build everything" tree, changing migration/vmstate.h triggers a recompile of some 2700 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h).

hw/hw.h supposedly includes it for convenience. Several other headers include it just to get VMStateDescription. The previous commit made that unnecessary.

Include migration/vmstate.h only where it's still needed. Touching it now recompiles only some 1600 objects.

---
 audio/audio.c                      | 1 +
 cpus.c                             | 1 +
 hw/acpi/cpu.c                      | 1 +
 hw/acpi/ich9.c                     | 1 +
 hw/acpi/memory_hotplug.c           | 1 +
 hw/acpi/pcihp.c                    | 1 +
 hw/acpi/piix4.c                    | 1 +
 hw/acpi/tco.c                      | 2 ++
 hw/acpi/vmgenid.c                  | 1 +
 hw/adc/stm32f2xx_adc.c             | 1 +
 hw/arm/armsse.c                    | 1 +
 hw/arm/highbank.c                  | 1 +
 hw/arm/integratorcp.c              | 1 +
 hw/arm/musicpal.c                  | 1 +
 hw/arm/pxa2xx.c                    | 1 +
 hw/arm/pxa2xx_gpio.c               | 1 +
 hw/arm/pxa2xx_pic.c                | 1 +
 hw/arm/smmuv3.c                    | 1 +
 hw/arm/spitz.c                     | 1 +
 hw/arm/stellaris.c                 | 1 +
 hw/arm/strongarm.c                 | 1 +
 hw/arm/versatilepb.c               | 1 +
 hw/arm/virt-acpi-build.c           | 1 +
 hw/arm/z2.c                        | 1 +
 hw/audio/ac97.c                    | 1 +
 hw/audio/cs4231.c                  | 1 +
 hw/audio/cs4231a.c                 | 1 +
 hw/audio/es1370.c                  | 1 +
 hw/audio/gus.c                     | 1 +
 hw/audio/hda-codec.c               | 1 +
 hw/audio/intel-hda.c               | 1 +
 hw/audio/lm4549.c                  | 1 +
 hw/audio/marvell_88w8618.c         | 1 +
 hw/audio/milkymist-ac97.c          | 1 +
 hw/audio/pcspk.c                   | 1 +
 hw/audio/pl041.c                   | 1 +
 hw/audio/sb16.c                    | 1 +
 hw/audio/wm8750.c                  | 1 +
 hw/block/ecc.c                     | 1 +
 hw/block/fdc.c                     | 1 +
 hw/block/m25p80.c                  | 1 +
 hw/block/nand.c                    | 1 +
 hw/block/nvme.c                    | 1 +
 hw/block/onenand.c                 | 1 +
 hw/block/pflash_cfi01.c            | 1 +
 hw/block/pflash_cfi02.c            | 1 +
 hw/char/bcm2835_aux.c              | 1 +
 hw/char/cadence_uart.c             | 1 +
 hw/char/cmsdk-apb-uart.c           | 1 +
 hw/char/digic-uart.c               | 1 +
 hw/char/escc.c                     | 1 +
 hw/char/exynos4210_uart.c          | 1 +
 hw/char/imx_serial.c               | 1 +
 hw/char/ipoctal232.c               | 1 +
 hw/char/lm32_juart.c               | 1 +
 hw/char/lm32_uart.c                | 1 +
 hw/char/milkymist-uart.c           | 1 +
 hw/char/nrf51_uart.c               | 1 +
 hw/char/parallel.c                 | 1 +
 hw/char/pl011.c                    | 1 +
 hw/char/sclpconsole-lm.c           | 1 +
 hw/char/sclpconsole.c              | 1 +
 hw/char/serial-isa.c               | 1 +
 hw/char/serial-pci-multi.c         | 1 +
 hw/char/serial-pci.c               | 1 +
 hw/char/serial.c                   | 1 +
 hw/char/spapr_vty.c                | 1 +
 hw/core/loader.c                   | 1 +
 hw/core/numa.c                     | 1 +
 hw/core/or-irq.c                   | 1 +
 hw/core/ptimer.c                   | 2 ++
 hw/core/qdev.c                     | 1 +
 hw/display/ads7846.c               | 1 +
 hw/display/bcm2835_fb.c            | 1 +
 hw/display/bochs-display.c         | 1 +
 hw/display/cg3.c                   | 1 +
 hw/display/cirrus_vga.c            | 1 +
 hw/display/dpcd.c                  | 1 +
 hw/display/exynos4210_fimd.c       | 1 +
 hw/display/g364fb.c                | 1 +
 hw/display/i2c-ddc.c               | 1 +
 hw/display/jazz_led.c              | 1 +
 hw/display/milkymist-tmu2.c        | 1 +
 hw/display/milkymist-vgafb.c       | 1 +
 hw/display/pl110.c                 | 1 +
 hw/display/pxa2xx_lcd.c            | 1 +
 hw/display/qxl.c                   | 1 +
 hw/display/sii9022.c               | 1 +
 hw/display/sm501.c                 | 1 +
 hw/display/ssd0303.c               | 1 +
 hw/display/ssd0323.c               | 1 +
 hw/display/tcx.c                   | 1 +
 hw/display/vga-isa-mm.c            | 2 ++
 hw/display/vga-pci.c               | 1 +
 hw/display/vga.c                   | 1 +
 hw/display/vmware_vga.c            | 1 +
 hw/display/xlnx_dp.c               | 1 +
 hw/dma/bcm2835_dma.c               | 1 +
 hw/dma/i82374.c                    | 1 +
 hw/dma/i8257.c                     | 1 +
 hw/dma/pl080.c                     | 1 +
 hw/dma/pl330.c                     | 1 +
 hw/dma/pxa2xx_dma.c                | 1 +
 hw/dma/rc4030.c                    | 1 +
 hw/dma/sparc32_dma.c               | 1 +
 hw/dma/xlnx-zdma.c                 | 1 +
 hw/dma/xlnx-zynq-devcfg.c          | 1 +
 hw/dma/xlnx_dpdma.c                | 1 +
 hw/gpio/bcm2835_gpio.c             | 1 +
 hw/gpio/gpio_key.c                 | 1 +
 hw/gpio/imx_gpio.c                 | 1 +
 hw/gpio/max7310.c                  | 1 +
 hw/gpio/mpc8xxx.c                  | 1 +
 hw/gpio/nrf51_gpio.c               | 1 +
 hw/gpio/pl061.c                    | 1 +
 hw/gpio/zaurus.c                   | 1 +
 hw/hppa/dino.c                     | 1 +
 hw/i2c/aspeed_i2c.c                | 1 +
 hw/i2c/core.c                      | 1 +
 hw/i2c/exynos4210_i2c.c            | 1 +
 hw/i2c/imx_i2c.c                   | 1 +
 hw/i2c/microbit_i2c.c              | 1 +
 hw/i2c/mpc_i2c.c                   | 1 +
 hw/i2c/pm_smbus.c                  | 2 ++
 hw/i2c/smbus_eeprom.c              | 1 +
 hw/i2c/smbus_ich9.c                | 1 +
 hw/i2c/smbus_slave.c               | 1 +
 hw/i386/acpi-build.c               | 1 +
 hw/i386/amd_iommu.c                | 2 ++
 hw/i386/intel_iommu.c              | 1 +
 hw/i386/kvm/clock.c                | 1 +
 hw/i386/kvmvapic.c                 | 1 +
 hw/i386/pc.c                       | 1 +
 hw/i386/vmmouse.c                  | 2 ++
 hw/i386/xen/xen_platform.c         | 1 +
 hw/i386/xen/xen_pvdevice.c         | 1 +
 hw/ide/ahci-allwinner.c            | 1 +
 hw/ide/ahci.c                      | 1 +
 hw/ide/cmd646.c                    | 1 +
 hw/ide/core.c                      | 1 +
 hw/ide/ich.c                       | 1 +
 hw/ide/isa.c                       | 1 +
 hw/ide/macio.c                     | 1 +
 hw/ide/microdrive.c                | 1 +
 hw/ide/mmio.c                      | 1 +
 hw/ide/pci.c                       | 1 +
 hw/ide/piix.c                      | 1 +
 hw/ide/via.c                       | 1 +
 hw/input/adb-kbd.c                 | 1 +
 hw/input/adb-mouse.c               | 1 +
 hw/input/adb.c                     | 1 +
 hw/input/hid.c                     | 2 ++
 hw/input/lm832x.c                  | 1 +
 hw/input/milkymist-softusb.c       | 1 +
 hw/input/pckbd.c                   | 1 +
 hw/input/pl050.c                   | 1 +
 hw/input/ps2.c                     | 1 +
 hw/input/pxa2xx_keypad.c           | 1 +
 hw/input/stellaris_input.c         | 1 +
 hw/input/tsc2005.c                 | 1 +
 hw/input/tsc210x.c                 | 1 +
 hw/intc/allwinner-a10-pic.c        | 1 +
 hw/intc/apic_common.c              | 1 +
 hw/intc/arm_gic_common.c           | 1 +
 hw/intc/arm_gicv3_common.c         | 1 +
 hw/intc/arm_gicv3_its_common.c     | 1 +
 hw/intc/armv7m_nvic.c              | 1 +
 hw/intc/aspeed_vic.c               | 1 +
 hw/intc/bcm2835_ic.c               | 1 +
 hw/intc/bcm2836_control.c          | 1 +
 hw/intc/exynos4210_combiner.c      | 1 +
 hw/intc/exynos4210_gic.c           | 1 +
 hw/intc/heathrow_pic.c             | 1 +
 hw/intc/i8259_common.c             | 2 ++
 hw/intc/imx_avic.c                 | 1 +
 hw/intc/imx_gpcv2.c                | 1 +
 hw/intc/ioapic_common.c            | 1 +
 hw/intc/lm32_pic.c                 | 1 +
 hw/intc/ompic.c                    | 1 +
 hw/intc/openpic.c                  | 1 +
 hw/intc/pl190.c                    | 1 +
 hw/intc/slavio_intctl.c            | 1 +
 hw/intc/spapr_xive.c               | 1 +
 hw/intc/xics.c                     | 1 +
 hw/intc/xive.c                     | 1 +
 hw/intc/xlnx-pmu-iomod-intc.c      | 1 +
 hw/intc/xlnx-zynqmp-ipi.c          | 1 +
 hw/ipack/ipack.c                   | 1 +
 hw/ipack/tpci200.c                 | 1 +
 hw/ipmi/ipmi_bmc_extern.c          | 1 +
 hw/ipmi/ipmi_bmc_sim.c             | 1 +
 hw/ipmi/isa_ipmi_bt.c              | 1 +
 hw/ipmi/isa_ipmi_kcs.c             | 1 +
 hw/isa/apm.c                       | 1 +
 hw/isa/i82378.c                    | 1 +
 hw/isa/lpc_ich9.c                  | 1 +
 hw/isa/pc87312.c                   | 1 +
 hw/isa/piix4.c                     | 1 +
 hw/isa/vt82c686.c                  | 1 +
 hw/mem/pc-dimm.c                   | 1 +
 hw/mips/gt64xxx_pci.c              | 1 +
 hw/misc/a9scu.c                    | 1 +
 hw/misc/arm_l2x0.c                 | 1 +
 hw/misc/arm_sysctl.c               | 1 +
 hw/misc/armsse-mhu.c               | 1 +
 hw/misc/aspeed_scu.c               | 1 +
 hw/misc/aspeed_sdmc.c              | 1 +
 hw/misc/aspeed_xdma.c              | 1 +
 hw/misc/bcm2835_mbox.c             | 1 +
 hw/misc/bcm2835_property.c         | 1 +
 hw/misc/bcm2835_rng.c              | 1 +
 hw/misc/eccmemctl.c                | 1 +
 hw/misc/exynos4210_clk.c           | 1 +
 hw/misc/exynos4210_pmu.c           | 1 +
 hw/misc/exynos4210_rng.c           | 1 +
 hw/misc/imx25_ccm.c                | 1 +
 hw/misc/imx31_ccm.c                | 1 +
 hw/misc/imx6_ccm.c                 | 1 +
 hw/misc/imx6_src.c                 | 1 +
 hw/misc/imx6ul_ccm.c               | 1 +
 hw/misc/imx7_ccm.c                 | 1 +
 hw/misc/iotkit-secctl.c            | 1 +
 hw/misc/iotkit-sysctl.c            | 1 +
 hw/misc/ivshmem.c                  | 1 +
 hw/misc/macio/cuda.c               | 1 +
 hw/misc/macio/gpio.c               | 1 +
 hw/misc/macio/mac_dbdma.c          | 1 +
 hw/misc/macio/macio.c              | 1 +
 hw/misc/macio/pmu.c                | 1 +
 hw/misc/max111x.c                  | 1 +
 hw/misc/milkymist-hpdmc.c          | 1 +
 hw/misc/milkymist-pfpu.c           | 1 +
 hw/misc/mips_cmgcr.c               | 1 +
 hw/misc/mips_cpc.c                 | 1 +
 hw/misc/mos6522.c                  | 1 +
 hw/misc/mps2-fpgaio.c              | 1 +
 hw/misc/mps2-scc.c                 | 1 +
 hw/misc/msf2-sysreg.c              | 1 +
 hw/misc/mst_fpga.c                 | 1 +
 hw/misc/nrf51_rng.c                | 1 +
 hw/misc/pca9552.c                  | 1 +
 hw/misc/slavio_misc.c              | 1 +
 hw/misc/tmp105.c                   | 1 +
 hw/misc/tmp421.c                   | 1 +
 hw/misc/tz-mpc.c                   | 1 +
 hw/misc/tz-msc.c                   | 1 +
 hw/misc/tz-ppc.c                   | 1 +
 hw/misc/vmcoreinfo.c               | 1 +
 hw/misc/zynq-xadc.c                | 1 +
 hw/misc/zynq_slcr.c                | 1 +
 hw/net/allwinner_emac.c            | 1 +
 hw/net/cadence_gem.c               | 1 +
 hw/net/can/can_kvaser_pci.c        | 1 +
 hw/net/can/can_mioe3680_pci.c      | 1 +
 hw/net/can/can_pcm3680_pci.c       | 1 +
 hw/net/can/can_sja1000.c           | 1 +
 hw/net/dp8393x.c                   | 1 +
 hw/net/e1000.c                     | 1 +
 hw/net/e1000e.c                    | 1 +
 hw/net/eepro100.c                  | 1 +
 hw/net/ftgmac100.c                 | 1 +
 hw/net/imx_fec.c                   | 1 +
 hw/net/lan9118.c                   | 1 +
 hw/net/lance.c                     | 1 +
 hw/net/milkymist-minimac2.c        | 1 +
 hw/net/mipsnet.c                   | 1 +
 hw/net/ne2000-isa.c                | 1 +
 hw/net/ne2000-pci.c                | 1 +
 hw/net/ne2000.c                    | 1 +
 hw/net/pcnet-pci.c                 | 1 +
 hw/net/pcnet.c                     | 1 +
 hw/net/rocker/rocker.c             | 1 +
 hw/net/rtl8139.c                   | 1 +
 hw/net/smc91c111.c                 | 1 +
 hw/net/spapr_llan.c                | 1 +
 hw/net/stellaris_enet.c            | 1 +
 hw/net/sungem.c                    | 1 +
 hw/net/sunhme.c                    | 1 +
 hw/net/vmxnet3.c                   | 1 +
 hw/net/xgmac.c                     | 1 +
 hw/nvram/ds1225y.c                 | 1 +
 hw/nvram/eeprom93xx.c              | 1 +
 hw/nvram/fw_cfg.c                  | 1 +
 hw/nvram/mac_nvram.c               | 1 +
 hw/nvram/nrf51_nvm.c               | 1 +
 hw/nvram/spapr_nvram.c             | 1 +
 hw/openrisc/cputimer.c             | 1 +
 hw/pci-bridge/gen_pcie_root_port.c | 1 +
 hw/pci-bridge/i82801b11.c          | 1 +
 hw/pci-bridge/ioh3420.c            | 1 +
 hw/pci-bridge/xio3130_downstream.c | 1 +
 hw/pci-bridge/xio3130_upstream.c   | 1 +
 hw/pci-host/bonito.c               | 1 +
 hw/pci-host/designware.c           | 1 +
 hw/pci-host/gpex.c                 | 1 +
 hw/pci-host/piix.c                 | 1 +
 hw/pci-host/ppce500.c              | 1 +
 hw/pci-host/prep.c                 | 1 +
 hw/pci-host/q35.c                  | 1 +
 hw/pci-host/versatile.c            | 1 +
 hw/pci/msix.c                      | 1 +
 hw/pci/pci.c                       | 1 +
 hw/pci/pcie_aer.c                  | 1 +
 hw/ppc/ppc.c                       | 1 +
 hw/ppc/ppc4xx_pci.c                | 1 +
 hw/ppc/prep_systemio.c             | 1 +
 hw/ppc/rs6000_mc.c                 | 1 +
 hw/ppc/spapr_caps.c                | 1 +
 hw/ppc/spapr_cpu_core.c            | 1 +
 hw/ppc/spapr_drc.c                 | 1 +
 hw/ppc/spapr_iommu.c               | 1 +
 hw/ppc/spapr_ovec.c                | 1 +
 hw/ppc/spapr_pci.c                 | 1 +
 hw/ppc/spapr_rtc.c                 | 1 +
 hw/ppc/spapr_vio.c                 | 1 +
 hw/riscv/sifive_gpio.c             | 1 +
 hw/s390x/event-facility.c          | 1 +
 hw/s390x/sclpquiesce.c             | 1 +
 hw/scsi/esp-pci.c                  | 1 +
 hw/scsi/esp.c                      | 1 +
 hw/scsi/lsi53c895a.c               | 1 +
 hw/scsi/megasas.c                  | 1 +
 hw/scsi/mptsas.c                   | 1 +
 hw/scsi/scsi-bus.c                 | 1 +
 hw/scsi/scsi-disk.c                | 1 +
 hw/scsi/spapr_vscsi.c              | 1 +
 hw/scsi/vmw_pvscsi.c               | 1 +
 hw/sd/bcm2835_sdhost.c             | 1 +
 hw/sd/milkymist-memcard.c          | 1 +
 hw/sd/pl181.c                      | 1 +
 hw/sd/pxa2xx_mmci.c                | 1 +
 hw/sd/sd.c                         | 1 +
 hw/sd/sdhci.c                      | 1 +
 hw/sd/ssi-sd.c                     | 1 +
 hw/sparc/sun4m.c                   | 1 +
 hw/sparc/sun4m_iommu.c             | 1 +
 hw/sparc64/sun4u.c                 | 2 ++
 hw/ssi/aspeed_smc.c                | 1 +
 hw/ssi/imx_spi.c                   | 1 +
 hw/ssi/mss-spi.c                   | 1 +
 hw/ssi/pl022.c                     | 1 +
 hw/ssi/ssi.c                       | 1 +
 hw/ssi/stm32f2xx_spi.c             | 1 +
 hw/ssi/xilinx_spi.c                | 1 +
 hw/ssi/xilinx_spips.c              | 1 +
 hw/timer/a9gtimer.c                | 1 +
 hw/timer/allwinner-a10-pit.c       | 1 +
 hw/timer/arm_mptimer.c             | 1 +
 hw/timer/arm_timer.c               | 1 +
 hw/timer/armv7m_systick.c          | 1 +
 hw/timer/aspeed_rtc.c              | 1 +
 hw/timer/aspeed_timer.c            | 1 +
 hw/timer/cadence_ttc.c             | 1 +
 hw/timer/cmsdk-apb-dualtimer.c     | 1 +
 hw/timer/cmsdk-apb-timer.c         | 1 +
 hw/timer/digic-timer.c             | 1 +
 hw/timer/ds1338.c                  | 1 +
 hw/timer/exynos4210_mct.c          | 1 +
 hw/timer/exynos4210_pwm.c          | 1 +
 hw/timer/exynos4210_rtc.c          | 1 +
 hw/timer/hpet.c                    | 1 +
 hw/timer/i8254_common.c            | 1 +
 hw/timer/imx_epit.c                | 1 +
 hw/timer/imx_gpt.c                 | 1 +
 hw/timer/lm32_timer.c              | 1 +
 hw/timer/m48t59.c                  | 1 +
 hw/timer/mc146818rtc.c             | 1 +
 hw/timer/milkymist-sysctl.c        | 1 +
 hw/timer/mss-timer.c               | 1 +
 hw/timer/nrf51_timer.c             | 1 +
 hw/timer/pl031.c                   | 1 +
 hw/timer/pxa2xx_timer.c            | 1 +
 hw/timer/slavio_timer.c            | 1 +
 hw/timer/stm32f2xx_timer.c         | 1 +
 hw/timer/twl92230.c                | 1 +
 hw/timer/xlnx-zynqmp-rtc.c         | 1 +
 hw/tpm/tpm_emulator.c              | 1 +
 hw/tpm/tpm_tis.c                   | 1 +
 hw/usb/bus.c                       | 1 +
 hw/usb/ccid-card-passthru.c        | 1 +
 hw/usb/dev-audio.c                 | 1 +
 hw/usb/dev-bluetooth.c             | 1 +
 hw/usb/dev-hid.c                   | 1 +
 hw/usb/dev-hub.c                   | 1 +
 hw/usb/dev-mtp.c                   | 1 +
 hw/usb/dev-network.c               | 1 +
 hw/usb/dev-serial.c                | 1 +
 hw/usb/dev-smartcard-reader.c      | 1 +
 hw/usb/dev-storage.c               | 1 +
 hw/usb/dev-uas.c                   | 1 +
 hw/usb/dev-wacom.c                 | 1 +
 hw/usb/hcd-ehci-pci.c              | 1 +
 hw/usb/hcd-ehci-sysbus.c           | 1 +
 hw/usb/hcd-ehci.c                  | 1 +
 hw/usb/hcd-ohci-pci.c              | 1 +
 hw/usb/hcd-ohci.c                  | 1 +
 hw/usb/hcd-uhci.c                  | 1 +
 hw/usb/hcd-xhci.c                  | 1 +
 hw/usb/host-libusb.c               | 1 +
 hw/usb/redirect.c                  | 1 +
 hw/vfio/amd-xgbe.c                 | 1 +
 hw/vfio/ap.c                       | 1 +
 hw/vfio/calxeda-xgmac.c            | 1 +
 hw/vfio/pci.c                      | 1 +
 hw/vfio/platform.c                 | 1 +
 hw/watchdog/cmsdk-apb-watchdog.c   | 1 +
 hw/watchdog/wdt_aspeed.c           | 1 +
 hw/watchdog/wdt_diag288.c          | 1 +
 hw/watchdog/wdt_i6300esb.c         | 1 +
 hw/watchdog/wdt_ib700.c            | 1 +
 hw/xtensa/xtfpga.c                 | 1 +
 include/hw/acpi/tco.h              | 1 -
 include/hw/block/flash.h           | 1 -
 include/hw/hw.h                    | 1 -
 include/hw/input/hid.h             | 1 -
 include/hw/pci/shpc.h              | 1 +
 include/hw/ppc/spapr_ovec.h        | 1 -
 include/hw/ptimer.h                | 1 -
 include/hw/virtio/virtio.h         | 1 +
 include/migration/cpu.h            | 1 +
 include/net/net.h                  | 1 -
 include/qemu/fifo8.h               | 1 -
 migration/savevm.c                 | 1 +
 target/s390x/machine.c             | 1 +
 util/fifo8.c                       | 1 +
 425 files changed, 426 insertions(+), 8 deletions(-)
audio/audio.c +1 -0
index 05adf7ffeb..cf65ae49f4 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "audio.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "qemu/timer.h"
 #include "qapi/error.h"
cpus.c +1 -0
index 927a00aa90..4ebdacdd44 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu/config-file.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "qapi/error.h"
 #include "qapi/qapi-commands-misc.h"
hw/acpi/cpu.c +1 -0
index 7a90c8f82d..87f30a31d7 100644
@@ -1,5 +1,6 @@
 #include "qemu/osdep.h"
 #include "hw/boards.h"
+#include "migration/vmstate.h"
 #include "hw/acpi/cpu.h"
 #include "qapi/error.h"
 #include "qapi/qapi-events-misc.h"
hw/acpi/ich9.c +1 -0
index b4d987c811..88eb7dbab1 100644
@@ -30,6 +30,7 @@
 #include "qapi/visitor.h"
 #include "hw/i386/pc.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "qemu/timer.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
hw/acpi/memory_hotplug.c +1 -0
index 297812d5f7..9483d66e86 100644
@@ -4,6 +4,7 @@
 #include "hw/mem/pc-dimm.h"
 #include "hw/boards.h"
 #include "hw/qdev-core.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "qapi/error.h"
 #include "qapi/qapi-events-misc.h"
hw/acpi/pcihp.c +1 -0
index 613406d09b..912ff6dd5c 100644
@@ -35,6 +35,7 @@
 #include "sysemu/sysemu.h"
 #include "exec/address-spaces.h"
 #include "hw/pci/pci_bus.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qom/qom-qobject.h"
 #include "trace.h"
hw/acpi/piix4.c +1 -0
index 8f9a7ba2ab..1896dbbfb9 100644
@@ -42,6 +42,7 @@
 #include "hw/acpi/acpi_dev_interface.h"
 #include "hw/xen/xen.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 #include "qom/cpu.h"
 #include "trace.h"
 
hw/acpi/tco.c +2 -0
index acfb65e8f2..fb9052dbca 100644
@@ -6,9 +6,11 @@
  * This work is licensed under the terms of the GNU GPL, version 2 or later.
  * See the COPYING file in the top-level directory.
  */
+
 #include "qemu/osdep.h"
 #include "sysemu/watchdog.h"
 #include "hw/i386/ich9.h"
+#include "migration/vmstate.h"
 
 #include "hw/acpi/tco.h"
 #include "trace.h"
hw/acpi/vmgenid.c +1 -0
index ed92ccc4b8..1e38e21cb7 100644
@@ -18,6 +18,7 @@
 #include "hw/acpi/aml-build.h"
 #include "hw/acpi/vmgenid.h"
 #include "hw/nvram/fw_cfg.h"
+#include "migration/vmstate.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
 
hw/adc/stm32f2xx_adc.c +1 -0
index c93b60e22e..9684653e5e 100644
@@ -24,6 +24,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/hw.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/arm/armsse.c +1 -0
index 85cfa414eb..e5263aa33d 100644
@@ -16,6 +16,7 @@
 #include "qapi/error.h"
 #include "trace.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/registerfields.h"
 #include "hw/arm/armsse.h"
 #include "hw/arm/boot.h"
hw/arm/highbank.c +1 -0
index def0f1ce6a..ca4c71f8a2 100644
@@ -21,6 +21,7 @@
 #include "qemu-common.h"
 #include "qapi/error.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/arm/boot.h"
 #include "hw/loader.h"
 #include "net/net.h"
hw/arm/integratorcp.c +1 -0
index d6025684f4..f8fbe402db 100644
@@ -11,6 +11,7 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/boards.h"
 #include "hw/arm/boot.h"
 #include "hw/misc/arm_integrator_debug.h"
hw/arm/musicpal.c +1 -0
index 848e49f459..72e522a629 100644
@@ -13,6 +13,7 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/arm/boot.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
hw/arm/pxa2xx.c +1 -0
index ab3fbd7b64..4e99c30e11 100644
@@ -14,6 +14,7 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/arm/pxa.h"
 #include "sysemu/sysemu.h"
 #include "hw/char/serial.h"
hw/arm/pxa2xx_gpio.c +1 -0
index 1b1fc499dc..aa2c89dcf9 100644
@@ -12,6 +12,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/arm/pxa.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/arm/pxa2xx_pic.c +1 -0
index 2f4b461562..c8bd497e99 100644
@@ -14,6 +14,7 @@
 #include "hw/hw.h"
 #include "hw/arm/pxa.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 
 #define ICIP	0x00	/* Interrupt Controller IRQ Pending register */
 #define ICMR	0x04	/* Interrupt Controller Mask register */
hw/arm/smmuv3.c +1 -0
index ccca60720e..0634a398d2 100644
@@ -21,6 +21,7 @@
 #include "hw/irq.h"
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/qdev-core.h"
 #include "hw/pci/pci.h"
 #include "exec/address-spaces.h"
hw/arm/spitz.c +1 -0
index b90431ffea..003929b3e0 100644
@@ -28,6 +28,7 @@
 #include "audio/audio.h"
 #include "hw/boards.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "exec/address-spaces.h"
 #include "cpu.h"
 
hw/arm/stellaris.c +1 -0
index 088ae2dbd7..9feb403f1e 100644
@@ -24,6 +24,7 @@
 #include "hw/input/gamepad.h"
 #include "hw/irq.h"
 #include "hw/watchdog/cmsdk-apb-watchdog.h"
+#include "migration/vmstate.h"
 #include "hw/misc/unimp.h"
 #include "cpu.h"
 
hw/arm/strongarm.c +1 -0
index 2e016f4b77..ca377df9e3 100644
@@ -33,6 +33,7 @@
 #include "hw/boards.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "strongarm.h"
 #include "qemu/error-report.h"
 #include "hw/arm/boot.h"
hw/arm/versatilepb.c +1 -0
index bc922345a6..e25561705f 100644
@@ -11,6 +11,7 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/arm/boot.h"
 #include "hw/net/smc91c111.h"
 #include "net/net.h"
hw/arm/virt-acpi-build.c +1 -0
index ad54d65ea0..4f85eb575c 100644
@@ -46,6 +46,7 @@
 #include "sysemu/numa.h"
 #include "sysemu/reset.h"
 #include "kvm_arm.h"
+#include "migration/vmstate.h"
 
 #define ARM_SPI_BASE 32
 #define ACPI_POWER_BUTTON_DEVICE "PWRB"
hw/arm/z2.c +1 -0
index 366d46ff5f..810922d74e 100644
@@ -18,6 +18,7 @@
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
 #include "hw/ssi/ssi.h"
+#include "migration/vmstate.h"
 #include "hw/boards.h"
 #include "sysemu/sysemu.h"
 #include "hw/block/flash.h"
hw/audio/ac97.c +1 -0
index fb98da2678..26ac84b388 100644
@@ -22,6 +22,7 @@
 #include "hw/audio/soundhw.h"
 #include "audio/audio.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "sysemu/dma.h"
 
hw/audio/cs4231.c +1 -0
index 8372299ebb..b5d3e895ce 100644
@@ -24,6 +24,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "trace.h"
 
hw/audio/cs4231a.c +1 -0
index 9eeab137c7..f7a39c0af4 100644
@@ -29,6 +29,7 @@
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
 #include "hw/qdev.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
 #include "qapi/error.h"
hw/audio/es1370.c +1 -0
index 260c142b70..0289f771c1 100644
@@ -31,6 +31,7 @@
 #include "hw/audio/soundhw.h"
 #include "audio/audio.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "sysemu/dma.h"
 
hw/audio/gus.c +1 -0
index 61230147ce..1a78cc47cd 100644
@@ -30,6 +30,7 @@
 #include "audio/audio.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 #include "gusemu.h"
 #include "gustate.h"
 
hw/audio/hda-codec.c +1 -0
index 84639b5424..4f6fbb8b13 100644
@@ -21,6 +21,7 @@
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "intel-hda.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "intel-hda-defs.h"
 #include "audio/audio.h"
hw/audio/intel-hda.c +1 -0
index b78baac295..e6f150bb0d 100644
@@ -27,6 +27,7 @@
 #include "qemu/module.h"
 #include "hw/audio/soundhw.h"
 #include "intel-hda.h"
+#include "migration/vmstate.h"
 #include "intel-hda-defs.h"
 #include "sysemu/dma.h"
 #include "qapi/error.h"
hw/audio/lm4549.c +1 -0
index af8b22b541..32b1481b56 100644
@@ -17,6 +17,7 @@
 #include "hw/hw.h"
 #include "audio/audio.h"
 #include "lm4549.h"
+#include "migration/vmstate.h"
 
 #if 0
 #define LM4549_DEBUG  1
hw/audio/marvell_88w8618.c +1 -0
index 167b478ec6..6345bc1d5c 100644
@@ -12,6 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/audio/wm8750.h"
hw/audio/milkymist-ac97.c +1 -0
index 3ba382ee4d..890a5fe89e 100644
@@ -25,6 +25,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "audio/audio.h"
 #include "qemu/error-report.h"
hw/audio/pcspk.c +1 -0
index a7b3ab0c2b..9039c9786d 100644
@@ -30,6 +30,7 @@
 #include "qemu/module.h"
 #include "qemu/timer.h"
 #include "hw/timer/i8254.h"
+#include "migration/vmstate.h"
 #include "hw/audio/pcspk.h"
 #include "qapi/error.h"
 
hw/audio/pl041.c +1 -0
index 47f0dfff18..3c371397de 100644
@@ -28,6 +28,7 @@
 
 #include "pl041.h"
 #include "lm4549.h"
+#include "migration/vmstate.h"
 
 #if 0
 #define PL041_DEBUG_LEVEL 1
hw/audio/sb16.c +1 -0
index ba5a5dd022..599194779d 100644
@@ -29,6 +29,7 @@
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
 #include "hw/qdev.h"
+#include "migration/vmstate.h"
 #include "qemu/timer.h"
 #include "qemu/host-utils.h"
 #include "qemu/log.h"
hw/audio/wm8750.c +1 -0
index 81f83eea88..9f6df5d59c 100644
@@ -9,6 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/i2c/i2c.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "hw/audio/wm8750.h"
 #include "audio/audio.h"
hw/block/ecc.c +1 -0
index 48311d2609..f846ab3e01 100644
@@ -13,6 +13,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/hw.h"
+#include "migration/vmstate.h"
 #include "hw/block/flash.h"
 
 /*
hw/block/fdc.c +1 -0
index 91d5f56cec..88feb0f451 100644
@@ -36,6 +36,7 @@
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/block/block.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
hw/block/m25p80.c +1 -0
index dd87affcf5..9d395169b2 100644
@@ -26,6 +26,7 @@
 #include "hw/hw.h"
 #include "sysemu/block-backend.h"
 #include "hw/ssi/ssi.h"
+#include "migration/vmstate.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/block/nand.c +1 -0
index 0a2736b50e..4a0d4677c3 100644
@@ -23,6 +23,7 @@
 #include "hw/block/flash.h"
 #include "sysemu/block-backend.h"
 #include "hw/qdev.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
hw/block/nvme.c +1 -0
index 36d6a8bb3a..079a8ffe80 100644
@@ -31,6 +31,7 @@
 #include "hw/hw.h"
 #include "hw/pci/msix.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
hw/block/onenand.c +1 -0
index b3644f7e89..18123f0499 100644
@@ -26,6 +26,7 @@
 #include "sysemu/block-backend.h"
 #include "exec/memory.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/error-report.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/block/pflash_cfi01.c +1 -0
index a1ec1faae5..2d6f260491 100644
@@ -50,6 +50,7 @@
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/sysemu.h"
 #include "trace.h"
hw/block/pflash_cfi02.c +1 -0
index 42886f6af5..b7070cd8ec 100644
@@ -43,6 +43,7 @@
 #include "qemu/host-utils.h"
 #include "qemu/module.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 #define PFLASH_DEBUG false
hw/char/bcm2835_aux.c +1 -0
index 8395c79520..45fc34d92d 100644
@@ -23,6 +23,7 @@
 #include "qemu/osdep.h"
 #include "hw/char/bcm2835_aux.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/char/cadence_uart.c +1 -0
index 6b9eb140c7..0e315b2376 100644
@@ -23,6 +23,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "chardev/char-fe.h"
 #include "chardev/char-serial.h"
 #include "qemu/timer.h"
hw/char/cmsdk-apb-uart.c +1 -0
index dd96a3302e..9e1aa43bd3 100644
@@ -21,6 +21,7 @@
 #include "qapi/error.h"
 #include "trace.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/registerfields.h"
 #include "chardev/char-fe.h"
 #include "chardev/char-serial.h"
hw/char/digic-uart.c +1 -0
index e4ac8435c8..79ea92249c 100644
@@ -29,6 +29,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "chardev/char-fe.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/char/escc.c +1 -0
index 678d494d39..404002b899 100644
@@ -26,6 +26,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "hw/char/escc.h"
 #include "ui/console.h"
hw/char/exynos4210_uart.c +1 -0
index dabcd07415..9bd826b33d 100644
@@ -21,6 +21,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "sysemu/sysemu.h"
hw/char/imx_serial.c +1 -0
index f79e47d4ee..bf3f07d760 100644
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "hw/char/imx_serial.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/char/ipoctal232.c +1 -0
index 7674e2d7b6..1171dc20cf 100644
@@ -11,6 +11,7 @@
 #include "qemu/osdep.h"
 #include "hw/ipack/ipack.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/bitops.h"
 #include "qemu/module.h"
 #include "chardev/char-fe.h"
hw/char/lm32_juart.c +1 -0
index 41a3ec81e3..f4488fa736 100644
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "trace.h"
 #include "chardev/char-fe.h"
hw/char/lm32_uart.c +1 -0
index 377032567a..4b3215fe96 100644
@@ -26,6 +26,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "chardev/char-fe.h"
 #include "qemu/error-report.h"
hw/char/milkymist-uart.c +1 -0
index d4641b5f44..53c1ca789d 100644
@@ -25,6 +25,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "chardev/char-fe.h"
 #include "qemu/error-report.h"
hw/char/nrf51_uart.c +1 -0
index bbe766d3c6..bb886f12aa 100644
@@ -17,6 +17,7 @@
 #include "qemu/module.h"
 #include "hw/char/nrf51_uart.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 static void nrf51_uart_update_irq(NRF51UARTState *s)
hw/char/parallel.c +1 -0
index ea8ab35e59..1798fd0c44 100644
@@ -31,6 +31,7 @@
 #include "chardev/char-fe.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 #include "hw/char/parallel.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
hw/char/pl011.c +1 -0
index a2da375528..84ad8ff9fb 100644
@@ -22,6 +22,7 @@
 #include "hw/char/pl011.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "chardev/char-fe.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/char/sclpconsole-lm.c +1 -0
index 691dc870ed..d904265cda 100644
@@ -21,6 +21,7 @@
 #include "chardev/char-fe.h"
 
 #include "hw/s390x/sclp.h"
+#include "migration/vmstate.h"
 #include "hw/s390x/event-facility.h"
 #include "hw/s390x/ebcdic.h"
 
hw/char/sclpconsole.c +1 -0
index 09b1d45d7a..f3669766bf 100644
@@ -19,6 +19,7 @@
 #include "qemu/module.h"
 
 #include "hw/s390x/sclp.h"
+#include "migration/vmstate.h"
 #include "hw/s390x/event-facility.h"
 #include "chardev/char-fe.h"
 
hw/char/serial-isa.c +1 -0
index 610426111a..d3080b76e4 100644
@@ -28,6 +28,7 @@
 #include "qemu/module.h"
 #include "hw/char/serial.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 
 #define ISA_SERIAL(obj) OBJECT_CHECK(ISASerialState, (obj), TYPE_ISA_SERIAL)
 
hw/char/serial-pci-multi.c +1 -0
index 65dbfbd205..867e7840b4 100644
@@ -32,6 +32,7 @@
 #include "hw/char/serial.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 
 #define PCI_SERIAL_MAX_PORTS 4
 
hw/char/serial-pci.c +1 -0
index 808d32b508..ee537890c2 100644
@@ -31,6 +31,7 @@
 #include "hw/char/serial.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 
 typedef struct PCISerialState {
     PCIDevice dev;
hw/char/serial.c +1 -0
index 1d977287ea..4d54163a62 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/char/serial.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "chardev/char-serial.h"
 #include "qapi/error.h"
 #include "qemu/timer.h"
hw/char/spapr_vty.c +1 -0
index f360ab3612..b3995a9e0c 100644
@@ -4,6 +4,7 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "hw/qdev.h"
+#include "migration/vmstate.h"
 #include "chardev/char-fe.h"
 #include "hw/irq.h"
 #include "hw/ppc/spapr.h"
hw/core/loader.c +1 -0
index 830845dd73..84e4f3efac 100644
@@ -47,6 +47,7 @@
 #include "qapi/error.h"
 #include "hw/hw.h"
 #include "disas/disas.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
hw/core/numa.c +1 -0
index a11431483c..67548064ee 100644
@@ -33,6 +33,7 @@
 #include "qapi/qapi-visit-machine.h"
 #include "sysemu/qtest.h"
 #include "hw/mem/pc-dimm.h"
+#include "migration/vmstate.h"
 #include "hw/mem/memory-device.h"
 #include "qemu/option.h"
 #include "qemu/config-file.h"
hw/core/or-irq.c +1 -0
index 6ed34d9238..02949dae1a 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/or-irq.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 static void or_irq_handler(void *opaque, int n, int level)
hw/core/ptimer.c +2 -0
index 170fd34d8b..49b60282cf 100644
@@ -5,10 +5,12 @@
  *
  * This code is licensed under the GNU LGPL.
  */
+
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
+#include "migration/vmstate.h"
 #include "qemu/host-utils.h"
 #include "sysemu/replay.h"
 #include "sysemu/qtest.h"
hw/core/qdev.c +1 -0
index 5c4b67a408..b1fe40d20d 100644
@@ -38,6 +38,7 @@
 #include "hw/irq.h"
 #include "hw/boards.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 
 bool qdev_hotplug = false;
 static bool qdev_hot_added = false;
hw/display/ads7846.c +1 -0
index 12d8272615..c12272ae72 100644
@@ -13,6 +13,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/ssi/ssi.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "ui/console.h"
 
hw/display/bcm2835_fb.c +1 -0
index e446355f29..3d99d99e2b 100644
@@ -30,6 +30,7 @@
 #include "framebuffer.h"
 #include "ui/pixel_ops.h"
 #include "hw/misc/bcm2835_mbox_defs.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/display/bochs-display.c +1 -0
index 582133dd71..ce40aea354 100644
@@ -10,6 +10,7 @@
 #include "qemu/units.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "hw/display/bochs-vbe.h"
 #include "hw/display/edid.h"
 
hw/display/cg3.c +1 -0
index 7cf9ebd604..29a8735a38 100644
@@ -29,6 +29,7 @@
 #include "qemu/error-report.h"
 #include "ui/console.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/irq.h"
 #include "hw/loader.h"
 #include "qemu/log.h"
hw/display/cirrus_vga.c +1 -0
index 4ccf5b4f18..3120b3cfaf 100644
@@ -40,6 +40,7 @@
 #include "trace.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "ui/pixel_ops.h"
 #include "cirrus_vga_internal.h"
 
hw/display/dpcd.c +1 -0
index 88cde54821..170545c605 100644
@@ -30,6 +30,7 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/misc/auxbus.h"
+#include "migration/vmstate.h"
 #include "hw/display/dpcd.h"
 
 #ifndef DEBUG_DPCD
hw/display/exynos4210_fimd.c +1 -0
index 889622eefa..8e1508a3e6 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "ui/console.h"
 #include "ui/pixel_ops.h"
 #include "qemu/bswap.h"
hw/display/g364fb.c +1 -0
index 89248f87df..1757b777e2 100644
@@ -27,6 +27,7 @@
 #include "ui/pixel_ops.h"
 #include "trace.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 
 typedef struct G364State {
     /* hardware */
hw/display/i2c-ddc.c +1 -0
index 041fc4f408..3ac85216a5 100644
@@ -20,6 +20,7 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/i2c/i2c.h"
+#include "migration/vmstate.h"
 #include "hw/display/i2c-ddc.h"
 
 #ifndef DEBUG_I2CDDC
hw/display/jazz_led.c +1 -0
index 783189ebcd..3e0112b1ca 100644
@@ -28,6 +28,7 @@
 #include "ui/pixel_ops.h"
 #include "trace.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 
 typedef enum {
     REDRAW_NONE = 0, REDRAW_SEGMENTS = 1, REDRAW_BACKGROUND = 2,
hw/display/milkymist-tmu2.c +1 -0
index 3f92378410..7bfffa52da 100644
@@ -28,6 +28,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
hw/display/milkymist-vgafb.c +1 -0
index dce1dd7ad6..9a9a481ebd 100644
@@ -33,6 +33,7 @@
 #include "qemu/module.h"
 
 #define BITS 8
+#include "migration/vmstate.h"
 #include "milkymist-vgafb_template.h"
 #define BITS 15
 #include "milkymist-vgafb_template.h"
hw/display/pl110.c +1 -0
index 8fb510ee73..c2991a28d2 100644
@@ -10,6 +10,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "ui/console.h"
 #include "framebuffer.h"
 #include "ui/pixel_ops.h"
hw/display/pxa2xx_lcd.c +1 -0
index 7aca3912f5..05f5f84671 100644
@@ -13,6 +13,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "ui/console.h"
 #include "hw/arm/pxa.h"
 #include "ui/pixel_ops.h"
hw/display/qxl.c +1 -0
index 98c7410032..4a44712fde 100644
@@ -29,6 +29,7 @@
 #include "qemu/module.h"
 #include "sysemu/sysemu.h"
 #include "migration/blocker.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 #include "qxl.h"
hw/display/sii9022.c +1 -0
index 0bebb85a58..0710ce9de5 100644
@@ -16,6 +16,7 @@
 #include "qemu/osdep.h"
 #include "qemu/module.h"
 #include "hw/i2c/i2c.h"
+#include "migration/vmstate.h"
 #include "hw/display/i2c-ddc.h"
 #include "trace.h"
 
hw/display/sm501.c +1 -0
index 5918f59b2b..6f88aaaa08 100644
@@ -33,6 +33,7 @@
 #include "hw/char/serial.h"
 #include "ui/console.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/pci/pci.h"
 #include "hw/i2c/i2c.h"
 #include "hw/display/i2c-ddc.h"
hw/display/ssd0303.c +1 -0
index f2a60c44c9..718378f6de 100644
@@ -13,6 +13,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/i2c/i2c.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "ui/console.h"
 
hw/display/ssd0323.c +1 -0
index ac373f1e78..c3bdb18742 100644
@@ -13,6 +13,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/ssi/ssi.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "ui/console.h"
 
hw/display/tcx.c +1 -0
index cdabcbc746..f9b1ae56ec 100644
@@ -29,6 +29,7 @@
 #include "ui/pixel_ops.h"
 #include "hw/loader.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 
hw/display/vga-isa-mm.c +2 -0
index a790f69b6d..1c4f43b52b 100644
@@ -21,10 +21,12 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+
 #include "qemu/osdep.h"
 #include "qemu/bitops.h"
 #include "qemu/units.h"
 #include "hw/hw.h"
+#include "migration/vmstate.h"
 #include "hw/display/vga.h"
 #include "vga_int.h"
 #include "ui/pixel_ops.h"
hw/display/vga-pci.c +1 -0
index dedac5d128..cb956b4545 100644
@@ -27,6 +27,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "vga_int.h"
 #include "ui/pixel_ops.h"
 #include "qemu/module.h"
hw/display/vga.c +1 -0
index 4d3572891a..f8098f63e9 100644
@@ -34,6 +34,7 @@
 #include "ui/pixel_ops.h"
 #include "qemu/timer.h"
 #include "hw/xen/xen.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 //#define DEBUG_VGA_MEM
hw/display/vmware_vga.c +1 -0
index 249a179bf6..ebfcc46a2d 100644
@@ -31,6 +31,7 @@
 #include "trace.h"
 #include "ui/vnc.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 
 #undef VERBOSE
 #define HW_RECT_ACCEL
hw/display/xlnx_dp.c +1 -0
index 4daac38070..fde3b21ea5 100644
@@ -28,6 +28,7 @@
 #include "qemu/module.h"
 #include "hw/display/xlnx_dp.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 
 #ifndef DEBUG_DP
 #define DEBUG_DP 0
hw/dma/bcm2835_dma.c +1 -0
index 090c73d951..192bd377a0 100644
@@ -7,6 +7,7 @@
 #include "qapi/error.h"
 #include "hw/dma/bcm2835_dma.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/dma/i82374.c +1 -0
index 68fad2dd12..3f0db4a021 100644
@@ -26,6 +26,7 @@
 #include "qapi/error.h"
 #include "qemu/module.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 #include "hw/dma/i8257.h"
 
 #define TYPE_I82374 "i82374"
hw/dma/i8257.c +1 -0
index 30a3442437..b7404cff60 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 #include "hw/dma/i8257.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
hw/dma/pl080.c +1 -0
index be7f9c71a8..59bc929363 100644
@@ -9,6 +9,7 @@
 
 #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"
hw/dma/pl330.c +1 -0
index 0d772de9f3..28830a42a3 100644
@@ -18,6 +18,7 @@
 #include "qemu-common.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qemu/timer.h"
 #include "sysemu/dma.h"
hw/dma/pxa2xx_dma.c +1 -0
index 1c273fb309..1124051730 100644
@@ -13,6 +13,7 @@
 #include "hw/irq.h"
 #include "hw/arm/pxa.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
 
hw/dma/rc4030.c +1 -0
index f7650f617c..d35fb59eee 100644
@@ -28,6 +28,7 @@
 #include "hw/irq.h"
 #include "hw/mips/mips.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/timer.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/dma/sparc32_dma.c +1 -0
index a05b6be95c..8955fe262e 100644
@@ -31,6 +31,7 @@
 #include "hw/sparc/sparc32_dma.h"
 #include "hw/sparc/sun4m_iommu.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "sysemu/dma.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
hw/dma/xlnx-zdma.c +1 -0
index 5afd77a5b8..2dbdfc5739 100644
@@ -29,6 +29,7 @@
 #include "qemu/osdep.h"
 #include "hw/dma/xlnx-zdma.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/dma/xlnx-zynq-devcfg.c +1 -0
index 855c784758..89200ff15d 100644
@@ -27,6 +27,7 @@
 #include "qemu/osdep.h"
 #include "hw/dma/xlnx-zynq-devcfg.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/bitops.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/dma.h"
hw/dma/xlnx_dpdma.c +1 -0
index 1bba7f2159..b40c897de2 100644
@@ -28,6 +28,7 @@
 #include "qemu/module.h"
 #include "hw/dma/xlnx_dpdma.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 
 #ifndef DEBUG_DPDMA
 #define DEBUG_DPDMA 0
hw/gpio/bcm2835_gpio.c +1 -0
index ea3f3f2bda..91ce3d10cc 100644
@@ -17,6 +17,7 @@
 #include "qemu/timer.h"
 #include "qapi/error.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/sd/sd.h"
 #include "hw/gpio/bcm2835_gpio.h"
 #include "hw/irq.h"
hw/gpio/gpio_key.c +1 -0
index 66866fa87c..46bbd42772 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
 
hw/gpio/imx_gpio.c +1 -0
index 3d3c9644db..8792fb5ad4 100644
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "hw/gpio/imx_gpio.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/gpio/max7310.c +1 -0
index b0925ab1a1..432f0b00fe 100644
@@ -10,6 +10,7 @@
 #include "qemu/osdep.h"
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 #define TYPE_MAX7310 "max7310"
hw/gpio/mpc8xxx.c +1 -0
index f3b90b4b33..1d99667094 100644
@@ -22,6 +22,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 #define TYPE_MPC8XXX_GPIO "mpc8xxx_gpio"
hw/gpio/nrf51_gpio.c +1 -0
index 24a890911a..b47fddf4ed 100644
@@ -15,6 +15,7 @@
 #include "qemu/module.h"
 #include "hw/gpio/nrf51_gpio.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 /*
hw/gpio/pl061.c +1 -0
index c605d91c93..2a828260bd 100644
@@ -11,6 +11,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/gpio/zaurus.c +1 -0
index 98aa416931..a1ba09c6f2 100644
@@ -21,6 +21,7 @@
 #include "hw/irq.h"
 #include "hw/arm/sharpsl.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 #undef REG_FMT
hw/hppa/dino.c +1 -0
index 90da6bcbb9..dfb9d7a742 100644
@@ -20,6 +20,7 @@
 #include "sysemu/sysemu.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
+#include "migration/vmstate.h"
 #include "hppa_sys.h"
 #include "exec/address-spaces.h"
 
hw/i2c/aspeed_i2c.c +1 -0
index bb7ef3cbf3..a956eb3849 100644
@@ -20,6 +20,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/i2c/aspeed_i2c.h"
hw/i2c/core.c +1 -0
index 20f36f1d55..25b792fdd0 100644
@@ -9,6 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/i2c/i2c.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "trace.h"
 
hw/i2c/exynos4210_i2c.c +1 -0
index 07d83d5a63..a600f65560 100644
@@ -24,6 +24,7 @@
 #include "qemu/module.h"
 #include "qemu/timer.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
 
hw/i2c/imx_i2c.c +1 -0
index 1d6b695615..30b9aea247 100644
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "hw/i2c/imx_i2c.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "hw/i2c/i2c.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/i2c/microbit_i2c.c +1 -0
index 214be07c5a..4661f05253 100644
@@ -21,6 +21,7 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/i2c/microbit_i2c.h"
+#include "migration/vmstate.h"
 
 static const uint32_t twi_read_sequence[] = {0x5A, 0x5A, 0x40};
 
hw/i2c/mpc_i2c.c +1 -0
index 0aa4cacb65..0aa1be3ce7 100644
@@ -23,6 +23,7 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 
 /* #define DEBUG_I2C */
 
hw/i2c/pm_smbus.c +2 -0
index e48544f909..d9e3bad90d 100644
@@ -17,11 +17,13 @@
  * License along with this library; if not, see
  * <http://www.gnu.org/licenses/>.
  */
+
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/boards.h"
 #include "hw/i2c/pm_smbus.h"
 #include "hw/i2c/smbus_master.h"
+#include "migration/vmstate.h"
 
 #define SMBHSTSTS       0x00
 #define SMBHSTCNT       0x02
hw/i2c/smbus_eeprom.c +1 -0
index 37167e7244..e05bc8c39c 100644
@@ -29,6 +29,7 @@
 #include "hw/boards.h"
 #include "hw/i2c/i2c.h"
 #include "hw/i2c/smbus_slave.h"
+#include "migration/vmstate.h"
 #include "hw/i2c/smbus_eeprom.h"
 
 //#define DEBUG
hw/i2c/smbus_ich9.c +1 -0
index 51a03046a6..f7e626e95a 100644
@@ -24,6 +24,7 @@
 #include "hw/hw.h"
 #include "hw/i2c/pm_smbus.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "sysemu/sysemu.h"
 
hw/i2c/smbus_slave.c +1 -0
index a9908c1a9b..7b145a384d 100644
@@ -17,6 +17,7 @@
 #include "hw/hw.h"
 #include "hw/i2c/i2c.h"
 #include "hw/i2c/smbus_slave.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 //#define DEBUG_SMBUS 1
hw/i386/acpi-build.c +1 -0
index 74667a53be..5b0ec1b89e 100644
@@ -46,6 +46,7 @@
 #include "hw/boards.h"
 #include "sysemu/tpm_backend.h"
 #include "hw/timer/mc146818rtc_regs.h"
+#include "migration/vmstate.h"
 #include "hw/mem/memory-device.h"
 #include "sysemu/numa.h"
 #include "sysemu/reset.h"
hw/i386/amd_iommu.c +2 -0
index 4a4e2c7fd4..08884523e2 100644
@@ -19,10 +19,12 @@
  *
  * Cache implementation inspired by hw/i386/intel_iommu.c
  */
+
 #include "qemu/osdep.h"
 #include "hw/i386/pc.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/pci_bus.h"
+#include "migration/vmstate.h"
 #include "amd_iommu.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
hw/i386/intel_iommu.c +1 -0
index de86f53b4e..000de6b9ce 100644
@@ -35,6 +35,7 @@
 #include "sysemu/kvm.h"
 #include "hw/i386/apic_internal.h"
 #include "kvm_i386.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 /* context entry operations */
hw/i386/kvm/clock.c +1 -0
index a5cda15b85..d98cf9d5d1 100644
@@ -21,6 +21,7 @@
 #include "sysemu/kvm.h"
 #include "sysemu/hw_accel.h"
 #include "kvm_i386.h"
+#include "migration/vmstate.h"
 #include "hw/sysbus.h"
 #include "hw/kvm/clock.h"
 #include "qapi/error.h"
hw/i386/kvmvapic.c +1 -0
index 9c2ab4aac5..44e40478c8 100644
@@ -19,6 +19,7 @@
 #include "hw/i386/apic_internal.h"
 #include "hw/sysbus.h"
 #include "hw/boards.h"
+#include "migration/vmstate.h"
 #include "tcg/tcg.h"
 
 #define VAPIC_IO_PORT           0x7e
hw/i386/pc.c +1 -0
index 1453696975..1e8251d327 100644
@@ -41,6 +41,7 @@
 #include "hw/firmware/smbios.h"
 #include "hw/loader.h"
 #include "elf.h"
+#include "migration/vmstate.h"
 #include "multiboot.h"
 #include "hw/timer/mc146818rtc.h"
 #include "hw/dma/i8257.h"
hw/i386/vmmouse.c +2 -0
index 5d2d278be4..a50f5d5dd4 100644
@@ -21,12 +21,14 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "ui/console.h"
 #include "hw/i386/pc.h"
 #include "hw/input/i8042.h"
 #include "hw/qdev.h"
+#include "migration/vmstate.h"
 
 /* debug only vmmouse */
 //#define DEBUG_VMMOUSE
hw/i386/xen/xen_platform.c +1 -0
index 7a972e46cf..800687a188 100644
@@ -30,6 +30,7 @@
 #include "hw/pci/pci.h"
 #include "hw/irq.h"
 #include "hw/xen/xen_common.h"
+#include "migration/vmstate.h"
 #include "hw/xen/xen-legacy-backend.h"
 #include "trace.h"
 #include "exec/address-spaces.h"
hw/i386/xen/xen_pvdevice.c +1 -0
index 23748f36a2..700db81cbc 100644
@@ -34,6 +34,7 @@
 #include "qemu/module.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 #define TYPE_XEN_PV_DEVICE  "xen-pvdevice"
hw/ide/ahci-allwinner.c +1 -0
index de08d87790..8777122c9c 100644
@@ -21,6 +21,7 @@
 #include "qemu/module.h"
 #include "sysemu/dma.h"
 #include "hw/ide/internal.h"
+#include "migration/vmstate.h"
 #include "ahci_internal.h"
 
 #include "trace.h"
hw/ide/ahci.c +1 -0
index 00ba422a48..e0b1a91fd9 100644
@@ -25,6 +25,7 @@
 #include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 
 #include "qemu/error-report.h"
 #include "qemu/log.h"
hw/ide/cmd646.c +1 -0
index e5542c9811..a3763a1d3a 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "hw/isa/isa.h"
 #include "sysemu/sysemu.h"
hw/ide/core.c +1 -0
index 6afadf894f..0453a925f9 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 #include "qemu/error-report.h"
 #include "qemu/timer.h"
 #include "sysemu/sysemu.h"
hw/ide/ich.c +1 -0
index c1ba927574..00fb43a127 100644
@@ -64,6 +64,7 @@
 #include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "hw/isa/isa.h"
 #include "sysemu/dma.h"
hw/ide/isa.c +1 -0
index 4b5784e3fd..fda912f3ed 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "sysemu/dma.h"
 
hw/ide/macio.c +1 -0
index 54571fed12..aa447cd2b5 100644
@@ -27,6 +27,7 @@
 #include "hw/hw.h"
 #include "hw/ppc/mac.h"
 #include "hw/ppc/mac_dbdma.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "hw/misc/macio/macio.h"
 #include "sysemu/block-backend.h"
hw/ide/microdrive.c +1 -0
index 92ee6e0af8..be3cf8779a 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/pcmcia.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "sysemu/dma.h"
 
hw/ide/mmio.c +1 -0
index 70a58016d0..f3de6db33e 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "sysemu/dma.h"
 
hw/ide/pci.c +1 -0
index 4c6fb9a68e..c5b081a028 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "sysemu/dma.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
hw/ide/piix.c +1 -0
index c4c6d4b760..407d3e3ce8 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/sysemu.h"
hw/ide/via.c +1 -0
index 6d54ac55f0..8fa1972d92 100644
@@ -27,6 +27,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/dma.h"
hw/input/adb-kbd.c +1 -0
index da361f56df..b3c4aeded1 100644
@@ -24,6 +24,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/input/adb.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "ui/input.h"
 #include "hw/input/adb-keys.h"
hw/input/adb-mouse.c +1 -0
index 52526fddb7..aeba41bddd 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "ui/console.h"
 #include "hw/input/adb.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "adb-internal.h"
 #include "trace.h"
hw/input/adb.c +1 -0
index 1446f32521..80ba1259bf 100644
@@ -24,6 +24,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/input/adb.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "adb-internal.h"
 
hw/input/hid.c +2 -0
index aa4fb826fd..c570ca25b1 100644
@@ -22,11 +22,13 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "ui/console.h"
 #include "qemu/timer.h"
 #include "hw/input/hid.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 #define HID_USAGE_ERROR_ROLLOVER        0x01
hw/input/lm832x.c +1 -0
index 2ab6d3290b..de03913d7c 100644
@@ -22,6 +22,7 @@
 #include "hw/hw.h"
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
 #include "sysemu/reset.h"
hw/input/milkymist-softusb.c +1 -0
index 92e07fbd8c..e17666d56b 100644
@@ -25,6 +25,7 @@
 #include "qapi/error.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "ui/console.h"
 #include "hw/input/hid.h"
hw/input/pckbd.c +1 -0
index 7e76ee7ad3..cf1690332d 100644
@@ -26,6 +26,7 @@
 #include "qemu/log.h"
 #include "hw/hw.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 #include "hw/i386/pc.h"
 #include "hw/input/ps2.h"
 #include "hw/irq.h"
hw/input/pl050.c +1 -0
index 2318dbfeac..1123037b38 100644
@@ -9,6 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/input/ps2.h"
 #include "hw/irq.h"
 #include "qemu/log.h"
hw/input/ps2.c +1 -0
index 8d922b05c9..07d07ee6bd 100644
@@ -26,6 +26,7 @@
 #include "qemu/log.h"
 #include "hw/hw.h"
 #include "hw/input/ps2.h"
+#include "migration/vmstate.h"
 #include "ui/console.h"
 #include "ui/input.h"
 #include "sysemu/reset.h"
hw/input/pxa2xx_keypad.c +1 -0
index 4788c96d19..31862a7d16 100644
@@ -14,6 +14,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "hw/arm/pxa.h"
 #include "ui/console.h"
 
hw/input/stellaris_input.c +1 -0
index ffea0542ba..7582117f0b 100644
@@ -11,6 +11,7 @@
 #include "hw/hw.h"
 #include "hw/input/gamepad.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "ui/console.h"
 
 typedef struct {
hw/input/tsc2005.c +1 -0
index e21356c18d..b92a034496 100644
@@ -26,6 +26,7 @@
 #include "ui/console.h"
 #include "hw/input/tsc2xxx.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 #define TSC_CUT_RESOLUTION(value, p)	((value) >> (16 - (p ? 12 : 10)))
hw/input/tsc210x.c +1 -0
index be7d948168..182d3725fc 100644
@@ -28,6 +28,7 @@
 #include "hw/arm/omap.h"            /* For I2SCodec */
 #include "hw/input/tsc2xxx.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 
 #define TSC_DATA_REGISTERS_PAGE		0x0
 #define TSC_CONTROL_REGISTERS_PAGE	0x1
hw/intc/allwinner-a10-pic.c +1 -0
index 9df3e18539..79959a4d23 100644
@@ -17,6 +17,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "hw/intc/allwinner-a10-pic.h"
 #include "hw/irq.h"
hw/intc/apic_common.c +1 -0
index 7045761281..fbb6e25cf4 100644
@@ -32,6 +32,7 @@
 #include "hw/qdev.h"
 #include "hw/sysbus.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 
 static int apic_irq_delivered;
 bool apic_report_tpr_access;
hw/intc/arm_gic_common.c +1 -0
index ccc50d00b6..5d506bebb5 100644
@@ -23,6 +23,7 @@
 #include "qemu/module.h"
 #include "gic_internal.h"
 #include "hw/arm/linux-boot-if.h"
+#include "migration/vmstate.h"
 
 static int gic_pre_save(void *opaque)
 {
hw/intc/arm_gicv3_common.c +1 -0
index 5edabb928f..12479f94a8 100644
@@ -26,6 +26,7 @@
 #include "qemu/module.h"
 #include "qom/cpu.h"
 #include "hw/intc/arm_gicv3_common.h"
+#include "migration/vmstate.h"
 #include "gicv3_internal.h"
 #include "hw/arm/linux-boot-if.h"
 #include "sysemu/kvm.h"
hw/intc/arm_gicv3_its_common.c +1 -0
index efb3d51fb5..66c4c6a188 100644
@@ -20,6 +20,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/pci/msi.h"
+#include "migration/vmstate.h"
 #include "hw/intc/arm_gicv3_its_common.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/intc/armv7m_nvic.c +1 -0
index 69670a2d97..0c7fc7078b 100644
@@ -14,6 +14,7 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/timer.h"
 #include "hw/intc/armv7m_nvic.h"
 #include "hw/irq.h"
hw/intc/aspeed_vic.c +1 -0
index e17343cd73..5ba06c5262 100644
@@ -30,6 +30,7 @@
 #include "qemu/osdep.h"
 #include "hw/intc/aspeed_vic.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/intc/bcm2835_ic.c +1 -0
index 20db52bd8e..05bd28e4f9 100644
@@ -15,6 +15,7 @@
 #include "qemu/osdep.h"
 #include "hw/intc/bcm2835_ic.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/intc/bcm2836_control.c +1 -0
index a983fe565f..04229b8a17 100644
@@ -18,6 +18,7 @@
 #include "qemu/osdep.h"
 #include "hw/intc/bcm2836_control.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/intc/exynos4210_combiner.c +1 -0
index ed558115f6..3b49ce4d27 100644
@@ -29,6 +29,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 #include "hw/arm/exynos4210.h"
hw/intc/exynos4210_gic.c +1 -0
index e37d457fcf..7fa4583b0f 100644
@@ -22,6 +22,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "hw/irq.h"
 #include "hw/arm/exynos4210.h"
hw/intc/heathrow_pic.c +1 -0
index ac1f7c0c8f..572e9115aa 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/ppc/mac.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "hw/intc/heathrow_pic.h"
 #include "hw/irq.h"
hw/intc/i8259_common.c +2 -0
index c75c880157..c7ff2b3274 100644
@@ -22,9 +22,11 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+
 #include "qemu/osdep.h"
 #include "hw/i386/pc.h"
 #include "hw/isa/i8259_internal.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 
 static int irq_level[16];
hw/intc/imx_avic.c +1 -0
index 022ed05b6f..63fc602a1a 100644
@@ -18,6 +18,7 @@
 #include "qemu/osdep.h"
 #include "hw/intc/imx_avic.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/intc/imx_gpcv2.c +1 -0
index a83333bdea..17007a4078 100644
@@ -11,6 +11,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/intc/imx_gpcv2.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/intc/ioapic_common.c +1 -0
index fa50382d43..5538b5b86e 100644
@@ -22,6 +22,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "hw/i386/ioapic.h"
 #include "hw/i386/ioapic_internal.h"
hw/intc/lm32_pic.c +1 -0
index c133d30cf2..4df4eef7df 100644
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 
 #include "hw/hw.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "qemu/module.h"
 #include "hw/sysbus.h"
hw/intc/ompic.c +1 -0
index 31004ac613..77591f827d 100644
@@ -13,6 +13,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "exec/memory.h"
 
 #define TYPE_OR1K_OMPIC "or1k-ompic"
hw/intc/openpic.c +1 -0
index 49d64bccfe..bb869ca221 100644
@@ -42,6 +42,7 @@
 #include "hw/ppc/openpic.h"
 #include "hw/ppc/ppc_e500.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/pci/msi.h"
 #include "qapi/error.h"
 #include "qemu/bitops.h"
hw/intc/pl190.c +1 -0
index 1a5e760f0f..e3bd3dd121 100644
@@ -10,6 +10,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/intc/slavio_intctl.c +1 -0
index e97afcadf6..c4cf9096eb 100644
@@ -23,6 +23,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "qemu/module.h"
 #include "hw/sysbus.h"
hw/intc/spapr_xive.c +1 -0
index 2e39cc1e47..2fdd68035a 100644
@@ -15,6 +15,7 @@
 #include "target/ppc/cpu.h"
 #include "sysemu/cpus.h"
 #include "sysemu/reset.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "hw/ppc/fdt.h"
 #include "hw/ppc/spapr.h"
hw/intc/xics.c +1 -0
index beb37b1a2b..41da9b3091 100644
@@ -35,6 +35,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "qapi/visitor.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "hw/intc/intc.h"
 #include "hw/irq.h"
hw/intc/xive.c +1 -0
index d977ed568f..b925ea9530 100644
@@ -16,6 +16,7 @@
 #include "sysemu/dma.h"
 #include "sysemu/reset.h"
 #include "hw/qdev-properties.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "hw/irq.h"
 #include "hw/ppc/xive.h"
hw/intc/xlnx-pmu-iomod-intc.c +1 -0
index 9fcd17c6fd..f2ba9b4ada 100644
@@ -26,6 +26,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/register.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
hw/intc/xlnx-zynqmp-ipi.c +1 -0
index 43a1b789b5..adc1179014 100644
@@ -27,6 +27,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/register.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
hw/ipack/ipack.c +1 -0
index b8ff979d72..9a520806d7 100644
@@ -13,6 +13,7 @@
 #include "qemu/module.h"
 #include "hw/ipack/ipack.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 
 IPackDevice *ipack_device_find(IPackBus *bus, int32_t slot)
 {
hw/ipack/tpci200.c +1 -0
index 7ee9d01771..f931d4df62 100644
@@ -13,6 +13,7 @@
 #include "hw/ipack/ipack.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "qemu/bitops.h"
 #include "qemu/module.h"
 
hw/ipmi/ipmi_bmc_extern.c +1 -0
index c0a8dac346..eb2eba891c 100644
@@ -35,6 +35,7 @@
 #include "chardev/char-fe.h"
 #include "sysemu/sysemu.h"
 #include "hw/ipmi/ipmi.h"
+#include "migration/vmstate.h"
 
 #define VM_MSG_CHAR        0xA0 /* Marks end of message */
 #define VM_CMD_CHAR        0xA1 /* Marks end of a command */
hw/ipmi/ipmi_bmc_sim.c +1 -0
index 1980536517..91e1484103 100644
@@ -29,6 +29,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "hw/loader.h"
+#include "migration/vmstate.h"
 
 #define IPMI_NETFN_CHASSIS            0x00
 
hw/ipmi/isa_ipmi_bt.c +1 -0
index af07278c19..588dfbac34 100644
@@ -30,6 +30,7 @@
 #include "hw/ipmi/ipmi.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 
 /* Control register */
 #define IPMI_BT_CLR_WR_BIT         0
hw/ipmi/isa_ipmi_kcs.c +1 -0
index 583497685a..e63753f03e 100644
@@ -30,6 +30,7 @@
 #include "hw/ipmi/ipmi.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 
 #define IPMI_KCS_OBF_BIT        0
 #define IPMI_KCS_IBF_BIT        1
hw/isa/apm.c +1 -0
index c3101ef52f..f22b2d78a4 100644
@@ -24,6 +24,7 @@
 #include "hw/isa/apm.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 
 //#define DEBUG
 
hw/isa/i82378.c +1 -0
index 90ebba59b7..de276cdf10 100644
@@ -22,6 +22,7 @@
 #include "hw/i386/pc.h"
 #include "hw/irq.h"
 #include "hw/timer/i8254.h"
+#include "migration/vmstate.h"
 #include "hw/audio/pcspk.h"
 
 #define TYPE_I82378 "i82378"
hw/isa/lpc_ich9.c +1 -0
index 42a1232787..79d44c1b41 100644
@@ -35,6 +35,7 @@
 #include "qemu/range.h"
 #include "hw/isa/isa.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/i386/pc.h"
 #include "hw/irq.h"
 #include "hw/isa/apm.h"
hw/isa/pc87312.c +1 -0
index 85dbc94439..60845f3ff0 100644
@@ -25,6 +25,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/isa/pc87312.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
hw/isa/piix4.c +1 -0
index 3677976ef7..8abd5daaae 100644
@@ -28,6 +28,7 @@
 #include "hw/pci/pci.h"
 #include "hw/isa/isa.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "sysemu/reset.h"
 
 PCIDevice *piix4_dev;
hw/isa/vt82c686.c +1 -0
index 81bffb1fb9..d98b94ab05 100644
@@ -18,6 +18,7 @@
 #include "hw/isa/isa.h"
 #include "hw/isa/superio.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/mips/mips.h"
 #include "hw/isa/apm.h"
 #include "hw/acpi/acpi.h"
hw/mem/pc-dimm.c +1 -0
index 29c785799c..ff43150e7d 100644
@@ -20,6 +20,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/mem/pc-dimm.h"
+#include "migration/vmstate.h"
 #include "hw/mem/nvdimm.h"
 #include "hw/mem/memory-device.h"
 #include "qapi/error.h"
hw/mips/gt64xxx_pci.c +1 -0
index 15d4adb3cd..b4412c6c24 100644
@@ -29,6 +29,7 @@
 #include "hw/mips/mips.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_host.h"
+#include "migration/vmstate.h"
 #include "hw/i386/pc.h"
 #include "hw/irq.h"
 #include "exec/address-spaces.h"
hw/misc/a9scu.c +1 -0
index 4307f0082b..62bc60b2ae 100644
@@ -10,6 +10,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/misc/a9scu.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 static uint64_t a9_scu_read(void *opaque, hwaddr offset,
hw/misc/arm_l2x0.c +1 -0
index b88f40ae7e..454a942ce0 100644
@@ -20,6 +20,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/misc/arm_sysctl.c +1 -0
index be8c9c0a7f..47051436f4 100644
@@ -13,6 +13,7 @@
 #include "qemu/timer.h"
 #include "qemu/bitops.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/arm/primecell.h"
 #include "sysemu/sysemu.h"
 #include "qemu/log.h"
hw/misc/armsse-mhu.c +1 -0
index f8d4187bb8..34b6205f11 100644
@@ -22,6 +22,7 @@
 #include "qapi/error.h"
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/registerfields.h"
 #include "hw/irq.h"
 #include "hw/misc/armsse-mhu.h"
hw/misc/aspeed_scu.c +1 -0
index 71a0d4b7be..268cb24e56 100644
@@ -12,6 +12,7 @@
 #include "qemu/osdep.h"
 #include "hw/misc/aspeed_scu.h"
 #include "hw/qdev-properties.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
 #include "qemu/bitops.h"
hw/misc/aspeed_sdmc.c +1 -0
index b84676d36d..cb13c63ec8 100644
@@ -14,6 +14,7 @@
 #include "hw/misc/aspeed_sdmc.h"
 #include "hw/misc/aspeed_scu.h"
 #include "hw/qdev-properties.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "trace.h"
 
hw/misc/aspeed_xdma.c +1 -0
index 18a83bcc6c..dca5585a75 100644
@@ -11,6 +11,7 @@
 #include "qemu/error-report.h"
 #include "hw/irq.h"
 #include "hw/misc/aspeed_xdma.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 
 #include "trace.h"
hw/misc/bcm2835_mbox.c +1 -0
index e484d25c29..79bad11631 100644
@@ -12,6 +12,7 @@
 #include "qapi/error.h"
 #include "hw/irq.h"
 #include "hw/misc/bcm2835_mbox.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/misc/bcm2835_property.c +1 -0
index 51cd93fc8b..0d078f15f9 100644
@@ -6,6 +6,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/misc/bcm2835_property.h"
+#include "migration/vmstate.h"
 #include "hw/irq.h"
 #include "hw/misc/bcm2835_mbox_defs.h"
 #include "sysemu/dma.h"
hw/misc/bcm2835_rng.c +1 -0
index e882c87568..d0c4e64e88 100644
@@ -12,6 +12,7 @@
 #include "qemu/guest-random.h"
 #include "qemu/module.h"
 #include "hw/misc/bcm2835_rng.h"
+#include "migration/vmstate.h"
 
 static uint32_t get_random_bytes(void)
 {
hw/misc/eccmemctl.c +1 -0
index c16d56c8c7..3300a46bb3 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "trace.h"
 
hw/misc/exynos4210_clk.c +1 -0
index 821d9eab3f..bc1463ff89 100644
@@ -19,6 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/misc/exynos4210_pmu.c +1 -0
index 8712774768..4817165121 100644
@@ -26,6 +26,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "sysemu/sysemu.h"
 
hw/misc/exynos4210_rng.c +1 -0
index b88fe3a26d..38cd61c7ea 100644
@@ -19,6 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qemu/log.h"
 #include "qemu/guest-random.h"
hw/misc/imx25_ccm.c +1 -0
index 693ea81040..d3107e5ca2 100644
@@ -13,6 +13,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/misc/imx25_ccm.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/misc/imx31_ccm.c +1 -0
index 38a19aa0d0..6e246827ab 100644
@@ -13,6 +13,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/misc/imx31_ccm.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/misc/imx6_ccm.c +1 -0
index 9478007f41..7fec8f0a47 100644
@@ -12,6 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/misc/imx6_ccm.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/misc/imx6_src.c +1 -0
index 878ffcdc71..0be683de06 100644
@@ -10,6 +10,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/misc/imx6_src.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
hw/misc/imx6ul_ccm.c +1 -0
index 37b472d125..a2fc1d0364 100644
@@ -12,6 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/registerfields.h"
+#include "migration/vmstate.h"
 #include "hw/misc/imx6ul_ccm.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/misc/imx7_ccm.c +1 -0
index d9bdcf1027..02fc1ae8d0 100644
@@ -14,6 +14,7 @@
 #include "qemu/module.h"
 
 #include "hw/misc/imx7_ccm.h"
+#include "migration/vmstate.h"
 
 static void imx7_analog_reset(DeviceState *dev)
 {
hw/misc/iotkit-secctl.c +1 -0
index 963fd6efd3..609869821a 100644
@@ -15,6 +15,7 @@
 #include "qapi/error.h"
 #include "trace.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/registerfields.h"
 #include "hw/irq.h"
 #include "hw/misc/iotkit-secctl.h"
hw/misc/iotkit-sysctl.c +1 -0
index 00d4faa6db..31fe9a5997 100644
@@ -24,6 +24,7 @@
 #include "qapi/error.h"
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/registerfields.h"
 #include "hw/misc/iotkit-sysctl.h"
 #include "target/arm/arm-powerctl.h"
hw/misc/ivshmem.c +1 -0
index f9cc66aba8..d9b7ea145c 100644
@@ -27,6 +27,7 @@
 #include "hw/pci/msix.h"
 #include "sysemu/kvm.h"
 #include "migration/blocker.h"
+#include "migration/vmstate.h"
 #include "qemu/error-report.h"
 #include "qemu/event_notifier.h"
 #include "qemu/module.h"
hw/misc/macio/cuda.c +1 -0
index 4f532efe34..feb80df0ff 100644
@@ -27,6 +27,7 @@
 #include "qemu-common.h"
 #include "hw/hw.h"
 #include "hw/ppc/mac.h"
+#include "migration/vmstate.h"
 #include "hw/input/adb.h"
 #include "hw/misc/mos6522.h"
 #include "hw/misc/macio/cuda.h"
hw/misc/macio/gpio.c +1 -0
index 31811ab513..6f90afefb7 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/ppc/mac.h"
+#include "migration/vmstate.h"
 #include "hw/misc/macio/macio.h"
 #include "hw/misc/macio/gpio.h"
 #include "hw/nmi.h"
hw/misc/macio/mac_dbdma.c +1 -0
index 8a1de8c31d..beaf083578 100644
@@ -41,6 +41,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ppc/mac_dbdma.h"
+#include "migration/vmstate.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/log.h"
hw/misc/macio/macio.c +1 -0
index 82492096f8..c797bbd698 100644
@@ -31,6 +31,7 @@
 #include "hw/misc/macio/cuda.h"
 #include "hw/pci/pci.h"
 #include "hw/ppc/mac_dbdma.h"
+#include "migration/vmstate.h"
 #include "hw/char/escc.h"
 #include "hw/misc/macio/macio.h"
 #include "hw/intc/heathrow_pic.h"
hw/misc/macio/pmu.c +1 -0
index 6280bcbc61..507f62ba64 100644
@@ -32,6 +32,7 @@
 #include "qemu-common.h"
 #include "hw/hw.h"
 #include "hw/ppc/mac.h"
+#include "migration/vmstate.h"
 #include "hw/input/adb.h"
 #include "hw/irq.h"
 #include "hw/misc/mos6522.h"
hw/misc/max111x.c +1 -0
index 6fd7210c67..a713149f16 100644
@@ -13,6 +13,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/ssi/ssi.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 typedef struct {
hw/misc/milkymist-hpdmc.c +1 -0
index 701c79e81c..e9722d6c76 100644
@@ -24,6 +24,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
hw/misc/milkymist-pfpu.c +1 -0
index fb21b898d1..8c6baf5406 100644
@@ -26,6 +26,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/misc/mips_cmgcr.c +1 -0
index edec164605..6dcdb4a225 100644
@@ -14,6 +14,7 @@
 #include "qemu/module.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "hw/misc/mips_cmgcr.h"
 #include "hw/misc/mips_cpc.h"
hw/misc/mips_cpc.c +1 -0
index 446b1ad397..caa618f582 100644
@@ -23,6 +23,7 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 
 #include "hw/misc/mips_cpc.h"
 
hw/misc/mos6522.c +1 -0
index 84c677c131..7e6dead089 100644
@@ -29,6 +29,7 @@
 #include "hw/input/adb.h"
 #include "hw/irq.h"
 #include "hw/misc/mos6522.h"
+#include "migration/vmstate.h"
 #include "qemu/timer.h"
 #include "sysemu/sysemu.h"
 #include "qemu/cutils.h"
hw/misc/mps2-fpgaio.c +1 -0
index b97ad42d75..4824dc09b2 100644
@@ -21,6 +21,7 @@
 #include "qapi/error.h"
 #include "trace.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/registerfields.h"
 #include "hw/misc/mps2-fpgaio.h"
 #include "qemu/timer.h"
hw/misc/mps2-scc.c +1 -0
index 1fdf5d22bd..042ce130ba 100644
@@ -22,6 +22,7 @@
 #include "qemu/module.h"
 #include "trace.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/registerfields.h"
 #include "hw/misc/mps2-scc.h"
 
hw/misc/msf2-sysreg.c +1 -0
index 21a2863821..da0f7c26e1 100644
@@ -17,6 +17,7 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/misc/msf2-sysreg.h"
+#include "migration/vmstate.h"
 #include "qemu/error-report.h"
 #include "trace.h"
 
hw/misc/mst_fpga.c +1 -0
index 256746ac15..d002870e56 100644
@@ -15,6 +15,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 /* Mainstone FPGA for extern irqs */
hw/misc/nrf51_rng.c +1 -0
index cf1bec223e..8528c8880c 100644
@@ -16,6 +16,7 @@
 #include "hw/arm/nrf51.h"
 #include "hw/irq.h"
 #include "hw/misc/nrf51_rng.h"
+#include "migration/vmstate.h"
 #include "qemu/guest-random.h"
 
 static void update_irq(NRF51RNGState *s)
hw/misc/pca9552.c +1 -0
index 3422397f89..bb05811e1f 100644
@@ -15,6 +15,7 @@
 #include "hw/hw.h"
 #include "hw/misc/pca9552.h"
 #include "hw/misc/pca9552_regs.h"
+#include "migration/vmstate.h"
 
 #define PCA9552_LED_ON   0x0
 #define PCA9552_LED_OFF  0x1
hw/misc/slavio_misc.c +1 -0
index 5f351950db..7ef73506ae 100644
@@ -26,6 +26,7 @@
 #include "sysemu/sysemu.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "trace.h"
 
hw/misc/tmp105.c +1 -0
index 2e304218f4..28996473cb 100644
@@ -22,6 +22,7 @@
 #include "hw/hw.h"
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "tmp105.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
hw/misc/tmp421.c +1 -0
index 69ee5db4b7..6728aa7e10 100644
@@ -27,6 +27,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/i2c/i2c.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
 #include "qemu/module.h"
hw/misc/tz-mpc.c +1 -0
index 802aeb7377..deb7796ec2 100644
@@ -15,6 +15,7 @@
 #include "qapi/error.h"
 #include "trace.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/registerfields.h"
 #include "hw/irq.h"
 #include "hw/misc/tz-mpc.h"
hw/misc/tz-msc.c +1 -0
index 7d1a536ce4..5b664d760f 100644
@@ -15,6 +15,7 @@
 #include "qapi/error.h"
 #include "trace.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/registerfields.h"
 #include "hw/irq.h"
 #include "hw/misc/tz-msc.h"
hw/misc/tz-ppc.c +1 -0
index 54db7fc152..ccc4468c11 100644
@@ -15,6 +15,7 @@
 #include "qapi/error.h"
 #include "trace.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/registerfields.h"
 #include "hw/irq.h"
 #include "hw/misc/tz-ppc.h"
hw/misc/vmcoreinfo.c +1 -0
index 49e87d462b..326a3ce8f4 100644
@@ -15,6 +15,7 @@
 #include "qemu/module.h"
 #include "sysemu/reset.h"
 #include "hw/nvram/fw_cfg.h"
+#include "migration/vmstate.h"
 #include "hw/misc/vmcoreinfo.h"
 
 static void fw_cfg_vmci_write(void *dev, off_t offset, size_t len)
hw/misc/zynq-xadc.c +1 -0
index c5cff5a8a9..edfe76ba20 100644
@@ -17,6 +17,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/misc/zynq-xadc.h"
+#include "migration/vmstate.h"
 #include "qemu/timer.h"
 #include "sysemu/sysemu.h"
 #include "qemu/log.h"
hw/misc/zynq_slcr.c +1 -0
index 6b51ae5ff1..82430a146a 100644
@@ -18,6 +18,7 @@
 #include "hw/hw.h"
 #include "qemu/timer.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/net/allwinner_emac.c +1 -0
index dad25bd4e9..f4b8c4fa67 100644
@@ -19,6 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "net/net.h"
 #include "qemu/fifo8.h"
 #include "hw/irq.h"
hw/net/cadence_gem.c +1 -0
index f4e4a4dd87..ab6f7e8262 100644
@@ -27,6 +27,7 @@
 
 #include "hw/irq.h"
 #include "hw/net/cadence_gem.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/net/can/can_kvaser_pci.c +1 -0
index 3b8e38eb83..10963ef58c 100644
@@ -39,6 +39,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "net/can_emu.h"
 
 #include "can_sja1000.h"
hw/net/can/can_mioe3680_pci.c +1 -0
index c09ae69261..9e060dff01 100644
@@ -35,6 +35,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "net/can_emu.h"
 
 #include "can_sja1000.h"
hw/net/can/can_pcm3680_pci.c +1 -0
index 843a76cf37..5d12f0c552 100644
@@ -35,6 +35,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "net/can_emu.h"
 
 #include "can_sja1000.h"
hw/net/can/can_sja1000.c +1 -0
index ee079d355f..6c84be6d29 100644
@@ -30,6 +30,7 @@
 #include "chardev/char.h"
 #include "hw/hw.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "net/can_emu.h"
 
 #include "can_sja1000.h"
hw/net/dp8393x.c +1 -0
index 70a78ad337..8d0cafc6ba 100644
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "net/net.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
hw/net/e1000.c +1 -0
index a023ceb27c..e4e91382f0 100644
@@ -28,6 +28,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "net/net.h"
 #include "net/checksum.h"
 #include "sysemu/sysemu.h"
hw/net/e1000e.c +1 -0
index 581f7d03d5..22e3132581 100644
@@ -42,6 +42,7 @@
 #include "sysemu/sysemu.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
+#include "migration/vmstate.h"
 
 #include "e1000_regs.h"
 
hw/net/eepro100.c +1 -0
index e0cf0c46d7..3c1c534cbf 100644
@@ -44,6 +44,7 @@
 #include "qemu/units.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "net/net.h"
 #include "net/eth.h"
 #include "hw/nvram/eeprom93xx.h"
hw/net/ftgmac100.c +1 -0
index 2848bff3e5..4d0f56c123 100644
@@ -20,6 +20,7 @@
 #include "net/checksum.h"
 #include "net/eth.h"
 #include "hw/net/mii.h"
+#include "migration/vmstate.h"
 
 /* For crc32 */
 #include <zlib.h>
hw/net/imx_fec.c +1 -0
index fe9d9028fa..5a22542aaf 100644
@@ -24,6 +24,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/net/imx_fec.h"
+#include "migration/vmstate.h"
 #include "sysemu/dma.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/net/lan9118.c +1 -0
index e2da54cbd8..937d5603e2 100644
@@ -12,6 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "net/net.h"
 #include "net/eth.h"
 #include "hw/irq.h"
hw/net/lance.c +1 -0
index 2978c01d58..0d094327cb 100644
@@ -39,6 +39,7 @@
 #include "qemu/module.h"
 #include "qemu/timer.h"
 #include "hw/sparc/sparc32_dma.h"
+#include "migration/vmstate.h"
 #include "hw/net/lance.h"
 #include "trace.h"
 #include "sysemu/sysemu.h"
hw/net/milkymist-minimac2.c +1 -0
index bad1066781..a7d879f0ab 100644
@@ -28,6 +28,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "net/net.h"
 #include "qemu/log.h"
hw/net/mipsnet.c +1 -0
index 007c94aa30..3910beb9a6 100644
@@ -5,6 +5,7 @@
 #include "qemu/module.h"
 #include "trace.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 
 /* MIPSnet register offsets */
 
hw/net/ne2000-isa.c +1 -0
index 3490e54c5a..5195c107d0 100644
@@ -26,6 +26,7 @@
 #include "hw/isa/isa.h"
 #include "hw/net/ne2000-isa.h"
 #include "hw/qdev.h"
+#include "migration/vmstate.h"
 #include "ne2000.h"
 #include "sysemu/sysemu.h"
 #include "qapi/error.h"
hw/net/ne2000-pci.c +1 -0
index 4f28e31baa..084d92f955 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "ne2000.h"
 #include "sysemu/sysemu.h"
 
hw/net/ne2000.c +1 -0
index 4b9231c495..7731b5acd1 100644
@@ -26,6 +26,7 @@
 #include "net/eth.h"
 #include "qemu/module.h"
 #include "hw/irq.h"
+#include "migration/vmstate.h"
 #include "ne2000.h"
 #include "sysemu/sysemu.h"
 #include "trace.h"
hw/net/pcnet-pci.c +1 -0
index df8cb6621f..a77d2c9368 100644
@@ -30,6 +30,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "net/net.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
hw/net/pcnet.c +1 -0
index f73e3422f4..bfcfcf5be3 100644
@@ -39,6 +39,7 @@
 #include "qemu/log.h"
 #include "hw/irq.h"
 #include "hw/qdev.h"
+#include "migration/vmstate.h"
 #include "net/net.h"
 #include "net/eth.h"
 #include "qemu/timer.h"
hw/net/rocker/rocker.c +1 -0
index bd54612f2a..4ce8f62a2a 100644
@@ -18,6 +18,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "hw/pci/msix.h"
 #include "net/net.h"
 #include "net/eth.h"
hw/net/rtl8139.c +1 -0
index 09273171e5..9975af44dd 100644
@@ -55,6 +55,7 @@
 
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "sysemu/dma.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
hw/net/smc91c111.c +1 -0
index f5149124e6..67e3f2408e 100644
@@ -9,6 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "net/net.h"
 #include "hw/irq.h"
 #include "hw/net/smc91c111.h"
hw/net/spapr_llan.c +1 -0
index 1867c355e3..0ce5e37a28 100644
@@ -33,6 +33,7 @@
 #include "qemu/module.h"
 #include "net/net.h"
 #include "hw/qdev.h"
+#include "migration/vmstate.h"
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/spapr_vio.h"
 #include "sysemu/sysemu.h"
hw/net/stellaris_enet.c +1 -0
index 756ac5600b..154214ca1d 100644
@@ -10,6 +10,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "net/net.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/net/sungem.c +1 -0
index 89bcf749d1..f5e30725be 100644
@@ -9,6 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "net/net.h"
hw/net/sunhme.c +1 -0
index 8b8603e696..9d8fd70f51 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "hw/net/mii.h"
 #include "net/net.h"
 #include "qemu/module.h"
hw/net/vmxnet3.c +1 -0
index 10d01d0058..88a7c13a96 100644
@@ -26,6 +26,7 @@
 #include "hw/pci/msix.h"
 #include "hw/pci/msi.h"
 #include "migration/register.h"
+#include "migration/vmstate.h"
 
 #include "vmxnet3.h"
 #include "vmxnet3_defs.h"
hw/net/xgmac.c +1 -0
index c2efc77452..ded8b9cf9d 100644
@@ -27,6 +27,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "net/net.h"
hw/nvram/ds1225y.c +1 -0
index fd49283f41..9cddb37925 100644
@@ -24,6 +24,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
hw/nvram/eeprom93xx.c +1 -0
index 5fc23df1d4..c2b012d583 100644
@@ -39,6 +39,7 @@
 #include "hw/hw.h"
 #include "hw/nvram/eeprom93xx.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 
 /* Debug EEPROM emulation. */
 //~ #define DEBUG_EEPROM
hw/nvram/fw_cfg.c +1 -0
index 8db0297d59..a5e614016a 100644
@@ -32,6 +32,7 @@
 #include "hw/nvram/fw_cfg.h"
 #include "hw/sysbus.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "qemu/error-report.h"
 #include "qemu/option.h"
hw/nvram/mac_nvram.c +1 -0
index a60426c469..4f0d2f6bd4 100644
@@ -27,6 +27,7 @@
 #include "hw/hw.h"
 #include "hw/nvram/chrp_nvram.h"
 #include "hw/ppc/mac.h"
+#include "migration/vmstate.h"
 #include "qemu/cutils.h"
 #include "qemu/module.h"
 #include <zlib.h>
hw/nvram/nrf51_nvm.c +1 -0
index eca0cb35b5..e13ff4b2fe 100644
@@ -24,6 +24,7 @@
 #include "exec/address-spaces.h"
 #include "hw/arm/nrf51.h"
 #include "hw/nvram/nrf51_nvm.h"
+#include "migration/vmstate.h"
 
 /*
  * FICR Registers Assignments
hw/nvram/spapr_nvram.c +1 -0
index 09efd886bf..ef22962767 100644
@@ -32,6 +32,7 @@
 #include "sysemu/block-backend.h"
 #include "sysemu/device_tree.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/nvram/chrp_nvram.h"
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/spapr_vio.h"
hw/openrisc/cputimer.c +1 -0
index fe95efc41c..e9f89333dc 100644
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "hw/hw.h"
+#include "migration/vmstate.h"
 #include "qemu/timer.h"
 
 #define TIMER_PERIOD 50 /* 50 ns period for 20 MHz timer */
hw/pci-bridge/gen_pcie_root_port.c +1 -0
index 44acda7cb9..fb78cf1905 100644
@@ -15,6 +15,7 @@
 #include "qemu/module.h"
 #include "hw/pci/msix.h"
 #include "hw/pci/pcie_port.h"
+#include "migration/vmstate.h"
 
 #define TYPE_GEN_PCIE_ROOT_PORT                "pcie-root-port"
 #define GEN_PCIE_ROOT_PORT(obj) \
hw/pci-bridge/i82801b11.c +1 -0
index db77a3541b..2b3907655b 100644
@@ -43,6 +43,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "hw/i386/ich9.h"
 
hw/pci-bridge/ioh3420.c +1 -0
index 310af04af9..f1e16135a3 100644
@@ -25,6 +25,7 @@
 #include "hw/pci/msi.h"
 #include "hw/pci/pcie.h"
 #include "hw/pci/pcie_port.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 #define PCI_DEVICE_ID_IOH_EPORT         0x3420  /* D0:F0 express mode */
hw/pci-bridge/xio3130_downstream.c +1 -0
index 182e164f74..1d62e31272 100644
@@ -24,6 +24,7 @@
 #include "hw/pci/msi.h"
 #include "hw/pci/pcie.h"
 #include "hw/pci/pcie_port.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
 
hw/pci-bridge/xio3130_upstream.c +1 -0
index b8cb31355f..5cd3af4fbc 100644
@@ -24,6 +24,7 @@
 #include "hw/pci/msi.h"
 #include "hw/pci/pcie.h"
 #include "hw/pci/pcie_port.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 #define PCI_DEVICE_ID_TI_XIO3130U       0x8232  /* upstream port */
hw/pci-host/bonito.c +1 -0
index ca526bd71b..58870e0d87 100644
@@ -45,6 +45,7 @@
 #include "hw/irq.h"
 #include "hw/mips/mips.h"
 #include "hw/pci/pci_host.h"
+#include "migration/vmstate.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
 #include "exec/address-spaces.h"
hw/pci-host/designware.c +1 -0
index de4300d554..083f5bb1a6 100644
@@ -25,6 +25,7 @@
 #include "hw/pci/pci_bridge.h"
 #include "hw/pci/pci_host.h"
 #include "hw/pci/pcie_port.h"
+#include "migration/vmstate.h"
 #include "hw/irq.h"
 #include "hw/pci-host/designware.h"
 
hw/pci-host/gpex.c +1 -0
index 72c58a054b..1a45c30505 100644
@@ -34,6 +34,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/pci-host/gpex.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 /****************************************************************************
hw/pci-host/piix.c +1 -0
index ecf634a04d..9e8c8542d3 100644
@@ -34,6 +34,7 @@
 #include "qemu/range.h"
 #include "hw/xen/xen.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 #include "hw/pci-host/pam.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
hw/pci-host/ppce500.c +1 -0
index 406ebf0438..840869f19c 100644
@@ -18,6 +18,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ppc/e500-ccsr.h"
+#include "migration/vmstate.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_host.h"
 #include "qemu/bswap.h"
hw/pci-host/prep.c +1 -0
index 2b68af9811..34a36812ea 100644
@@ -31,6 +31,7 @@
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
 #include "hw/pci/pci_host.h"
+#include "migration/vmstate.h"
 #include "hw/i386/pc.h"
 #include "hw/irq.h"
 #include "hw/loader.h"
hw/pci-host/q35.c +1 -0
index 0a010be4cf..25335a8b71 100644
@@ -31,6 +31,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/pci-host/q35.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
 #include "qemu/module.h"
hw/pci-host/versatile.c +1 -0
index 221cc40134..1cd832a393 100644
@@ -9,6 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
hw/pci/msix.c +1 -0
index ebe804b473..81a23accf3 100644
@@ -21,6 +21,7 @@
 #include "hw/pci/pci.h"
 #include "hw/xen/xen.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 #include "qemu/range.h"
 #include "qapi/error.h"
 #include "trace.h"
hw/pci/pci.c +1 -0
index bc7ce92dcb..de3691eee4 100644
@@ -31,6 +31,7 @@
 #include "hw/pci/pci_bus.h"
 #include "hw/pci/pci_host.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
hw/pci/pcie_aer.c +1 -0
index 939da0b778..27f9cc56af 100644
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/sysemu.h"
 #include "qapi/qmp/qdict.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "hw/pci/pci_bridge.h"
 #include "hw/pci/pcie.h"
hw/ppc/ppc.c +1 -0
index 163a34ee4c..5cc321828e 100644
@@ -35,6 +35,7 @@
 #include "qemu/error-report.h"
 #include "sysemu/kvm.h"
 #include "kvm_ppc.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 //#define PPC_DEBUG_IRQ
hw/ppc/ppc4xx_pci.c +1 -0
index 27f25f4e58..7334d75890 100644
@@ -24,6 +24,7 @@
 #include "hw/irq.h"
 #include "hw/ppc/ppc.h"
 #include "hw/ppc/ppc4xx.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "sysemu/reset.h"
 #include "hw/pci/pci.h"
hw/ppc/prep_systemio.c +1 -0
index 898ab1533f..d46792d366 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 #include "exec/address-spaces.h"
 #include "qemu/error-report.h" /* for error_report() */
 #include "qemu/module.h"
hw/ppc/rs6000_mc.c +1 -0
index 45cb95e08a..daea13cdea 100644
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 #include "exec/address-spaces.h"
 #include "hw/boards.h"
 #include "qapi/error.h"
hw/ppc/spapr_caps.c +1 -0
index bbb001f84a..7830d66d77 100644
@@ -32,6 +32,7 @@
 #include "target/ppc/mmu-hash64.h"
 #include "cpu-models.h"
 #include "kvm_ppc.h"
+#include "migration/vmstate.h"
 #include "sysemu/qtest.h"
 #include "sysemu/tcg.h"
 
hw/ppc/spapr_cpu_core.c +1 -0
index ccc8970c7c..f86f773d42 100644
@@ -10,6 +10,7 @@
 #include "qemu/osdep.h"
 #include "hw/cpu/core.h"
 #include "hw/ppc/spapr_cpu_core.h"
+#include "migration/vmstate.h"
 #include "target/ppc/cpu.h"
 #include "hw/ppc/spapr.h"
 #include "hw/boards.h"
hw/ppc/spapr_drc.c +1 -0
index 678493a9c5..c09bbcc22d 100644
@@ -18,6 +18,7 @@
 #include "hw/ppc/spapr_drc.h"
 #include "qom/object.h"
 #include "hw/qdev.h"
+#include "migration/vmstate.h"
 #include "qapi/visitor.h"
 #include "qemu/error-report.h"
 #include "hw/ppc/spapr.h" /* for RTAS return codes */
hw/ppc/spapr_iommu.c +1 -0
index bd3d0256a6..57834e6a39 100644
@@ -25,6 +25,7 @@
 #include "sysemu/kvm.h"
 #include "hw/qdev.h"
 #include "kvm_ppc.h"
+#include "migration/vmstate.h"
 #include "sysemu/dma.h"
 #include "exec/address-spaces.h"
 #include "trace.h"
hw/ppc/spapr_ovec.c +1 -0
index a65b7c7da9..811fadf143 100644
@@ -13,6 +13,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/ppc/spapr_ovec.h"
+#include "migration/vmstate.h"
 #include "qemu/bitmap.h"
 #include "exec/address-spaces.h"
 #include "qemu/error-report.h"
hw/ppc/spapr_pci.c +1 -0
index 54d0a32c17..e5f592322f 100644
@@ -29,6 +29,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
hw/ppc/spapr_rtc.c +1 -0
index 6cf0113b34..42ff72c269 100644
@@ -31,6 +31,7 @@
 #include "qemu/timer.h"
 #include "sysemu/sysemu.h"
 #include "hw/ppc/spapr.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qapi/qapi-events-misc-target.h"
 #include "qemu/cutils.h"
hw/ppc/spapr_vio.c +1 -0
index 0f4f4bedd3..1095aa5f00 100644
@@ -34,6 +34,7 @@
 #include "sysemu/kvm.h"
 #include "sysemu/device_tree.h"
 #include "kvm_ppc.h"
+#include "migration/vmstate.h"
 #include "sysemu/qtest.h"
 
 #include "hw/ppc/spapr.h"
hw/riscv/sifive_gpio.c +1 -0
index da19daa880..5c7c596e6b 100644
@@ -15,6 +15,7 @@
 #include "qemu/log.h"
 #include "hw/irq.h"
 #include "hw/riscv/sifive_gpio.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 static void update_output_irq(SIFIVEGPIOState *s)
hw/s390x/event-facility.c +1 -0
index 61f3b74714..056f0711fa 100644
@@ -21,6 +21,7 @@
 #include "sysemu/sysemu.h"
 
 #include "hw/s390x/sclp.h"
+#include "migration/vmstate.h"
 #include "hw/s390x/event-facility.h"
 
 typedef struct SCLPEventsBus {
hw/s390x/sclpquiesce.c +1 -0
index 4f73471537..6dfb087568 100644
@@ -16,6 +16,7 @@
 #include "hw/qdev.h"
 #include "sysemu/sysemu.h"
 #include "hw/s390x/sclp.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "hw/s390x/event-facility.h"
 
hw/scsi/esp-pci.c +1 -0
index f945502f3a..d5a1f9e017 100644
@@ -28,6 +28,7 @@
 #include "hw/irq.h"
 #include "hw/nvram/eeprom93xx.h"
 #include "hw/scsi/esp.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "qapi/error.h"
 #include "qemu/log.h"
hw/scsi/esp.c +1 -0
index 3b717e9526..841d79b60e 100644
@@ -25,6 +25,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/irq.h"
 #include "hw/scsi/esp.h"
 #include "trace.h"
hw/scsi/lsi53c895a.c +1 -0
index 1a042aa00b..175eb79260 100644
@@ -19,6 +19,7 @@
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
 #include "hw/scsi/scsi.h"
+#include "migration/vmstate.h"
 #include "sysemu/dma.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/scsi/megasas.c +1 -0
index 0c4399930a..970b10048f 100644
@@ -33,6 +33,7 @@
 #include "trace.h"
 #include "qapi/error.h"
 #include "mfi.h"
+#include "migration/vmstate.h"
 
 #define MEGASAS_VERSION_GEN1 "1.70"
 #define MEGASAS_VERSION_GEN2 "1.80"
hw/scsi/mptsas.c +1 -0
index 6d2c15a2bc..79501777d4 100644
@@ -35,6 +35,7 @@
 #include "qapi/error.h"
 #include "mptsas.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 #include "mpi.h"
 
 #define NAA_LOCALLY_ASSIGNED_ID 0x3ULL
hw/scsi/scsi-bus.c +1 -0
index 81fe7c3301..42928a6aec 100644
@@ -6,6 +6,7 @@
 #include "qemu/option.h"
 #include "hw/scsi/scsi.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 #include "scsi/constants.h"
 #include "hw/qdev.h"
 #include "sysemu/block-backend.h"
hw/scsi/scsi-disk.c +1 -0
index 558fa11511..5fbdecb434 100644
@@ -26,6 +26,7 @@
 #include "qemu/module.h"
 #include "hw/scsi/scsi.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 #include "hw/scsi/emulation.h"
 #include "scsi/constants.h"
 #include "sysemu/sysemu.h"
hw/scsi/spapr_vscsi.c +1 -0
index 0e491c911d..5290f7569a 100644
@@ -37,6 +37,7 @@
 #include "cpu.h"
 #include "hw/hw.h"
 #include "hw/scsi/scsi.h"
+#include "migration/vmstate.h"
 #include "scsi/constants.h"
 #include "srp.h"
 #include "hw/qdev.h"
hw/scsi/vmw_pvscsi.c +1 -0
index 14641df1c8..85af638bc7 100644
@@ -29,6 +29,7 @@
 #include "qapi/error.h"
 #include "qemu/module.h"
 #include "hw/scsi/scsi.h"
+#include "migration/vmstate.h"
 #include "scsi/constants.h"
 #include "hw/pci/msi.h"
 #include "vmw_pvscsi.h"
hw/sd/bcm2835_sdhost.c +1 -0
index 4609cc031c..4a80fbcc86 100644
@@ -17,6 +17,7 @@
 #include "sysemu/blockdev.h"
 #include "hw/irq.h"
 #include "hw/sd/bcm2835_sdhost.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 #define TYPE_BCM2835_SDHOST_BUS "bcm2835-sdhost-bus"
hw/sd/milkymist-memcard.c +1 -0
index b8d2347d46..dcb7169166 100644
@@ -26,6 +26,7 @@
 #include "qemu/module.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "trace.h"
 #include "qapi/error.h"
hw/sd/pl181.c +1 -0
index 3c615f2b8f..8033fe455d 100644
@@ -10,6 +10,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/blockdev.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/irq.h"
 #include "hw/sd/sd.h"
 #include "qemu/log.h"
hw/sd/pxa2xx_mmci.c +1 -0
index 1eb1248cad..020cd5464c 100644
@@ -15,6 +15,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/arm/pxa.h"
 #include "hw/sd/sd.h"
 #include "hw/qdev.h"
hw/sd/sd.c +1 -0
index 21adf2be16..02924329bf 100644
@@ -38,6 +38,7 @@
 #include "hw/registerfields.h"
 #include "sysemu/block-backend.h"
 #include "hw/sd/sd.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qemu/bitmap.h"
 #include "hw/qdev-properties.h"
hw/sd/sdhci.c +1 -0
index 46c7fbd677..f9db39c834 100644
@@ -32,6 +32,7 @@
 #include "qemu/timer.h"
 #include "qemu/bitops.h"
 #include "hw/sd/sdhci.h"
+#include "migration/vmstate.h"
 #include "sdhci-internal.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/sd/ssi-sd.c +1 -0
index 9bd6511ec8..571aabea5c 100644
@@ -13,6 +13,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/blockdev.h"
 #include "hw/ssi/ssi.h"
+#include "migration/vmstate.h"
 #include "hw/sd/sd.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
hw/sparc/sun4m.c +1 -0
index 0f9cda19f3..99b8693a0c 100644
@@ -32,6 +32,7 @@
 #include "qemu/timer.h"
 #include "hw/sparc/sun4m_iommu.h"
 #include "hw/timer/m48t59.h"
+#include "migration/vmstate.h"
 #include "hw/sparc/sparc32_dma.h"
 #include "hw/block/fdc.h"
 #include "sysemu/reset.h"
hw/sparc/sun4m_iommu.c +1 -0
index 36b5c0c133..a5681ded6a 100644
@@ -26,6 +26,7 @@
 #include "hw/irq.h"
 #include "hw/sparc/sun4m_iommu.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "exec/address-spaces.h"
 #include "trace.h"
hw/sparc64/sun4u.c +2 -0
index 5d87be811d..c95ed94d2e 100644
@@ -21,6 +21,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
+
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "qemu/error-report.h"
@@ -36,6 +37,7 @@
 #include "hw/char/serial.h"
 #include "hw/char/parallel.h"
 #include "hw/timer/m48t59.h"
+#include "migration/vmstate.h"
 #include "hw/input/i8042.h"
 #include "hw/block/fdc.h"
 #include "net/net.h"
hw/ssi/aspeed_smc.c +1 -0
index eb6eee6586..7ace5780a3 100644
@@ -24,6 +24,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/ssi/imx_spi.c +1 -0
index 79c8a6dae7..c918e8cac8 100644
@@ -11,6 +11,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/ssi/imx_spi.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/ssi/mss-spi.c +1 -0
index d000c91341..3050fabb69 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/ssi/mss-spi.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/ssi/pl022.c +1 -0
index 286b08438d..cade2e92a8 100644
@@ -9,6 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "hw/irq.h"
 #include "hw/ssi/pl022.h"
 #include "hw/ssi/ssi.h"
hw/ssi/ssi.c +1 -0
index cda7c96a64..c6415eb6e3 100644
@@ -14,6 +14,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/ssi/ssi.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 struct SSIBus {
hw/ssi/stm32f2xx_spi.c +1 -0
index 4249101386..cd6e8443db 100644
@@ -26,6 +26,7 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/ssi/stm32f2xx_spi.h"
+#include "migration/vmstate.h"
 
 #ifndef STM_SPI_ERR_DEBUG
 #define STM_SPI_ERR_DEBUG 0
hw/ssi/xilinx_spi.c +1 -0
index 5495d3e3cb..081433c2f0 100644
@@ -26,6 +26,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/ssi/xilinx_spips.c +1 -0
index 451d5a0783..a28cd8f8f0 100644
@@ -35,6 +35,7 @@
 #include "hw/register.h"
 #include "sysemu/dma.h"
 #include "migration/blocker.h"
+#include "migration/vmstate.h"
 
 #ifndef XILINX_SPIPS_ERR_DEBUG
 #define XILINX_SPIPS_ERR_DEBUG 0
hw/timer/a9gtimer.c +1 -0
index 0d18497322..b310dfb1b3 100644
@@ -23,6 +23,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/timer/a9gtimer.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qemu/timer.h"
 #include "qemu/bitops.h"
hw/timer/allwinner-a10-pit.c +1 -0
index 490e584604..b9d057df5d 100644
@@ -20,6 +20,7 @@
 #include "hw/sysbus.h"
 #include "sysemu/sysemu.h"
 #include "hw/timer/allwinner-a10-pit.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/timer/arm_mptimer.c +1 -0
index 3092b85d91..a13255d308 100644
@@ -23,6 +23,7 @@
 #include "hw/irq.h"
 #include "hw/ptimer.h"
 #include "hw/timer/arm_mptimer.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
hw/timer/arm_timer.c +1 -0
index 30ad2245da..0b121252fd 100644
@@ -9,6 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/timer.h"
 #include "hw/qdev.h"
 #include "hw/irq.h"
hw/timer/armv7m_systick.c +1 -0
index 8a91ba345b..85d122dbcb 100644
@@ -11,6 +11,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/timer/armv7m_systick.h"
+#include "migration/vmstate.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "qemu/timer.h"
hw/timer/aspeed_rtc.c +1 -0
index 19f061c846..5313017353 100644
@@ -9,6 +9,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "hw/timer/aspeed_rtc.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/timer.h"
 
hw/timer/aspeed_timer.c +1 -0
index c8e4892989..ed81d5c44c 100644
@@ -14,6 +14,7 @@
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "hw/timer/aspeed_timer.h"
+#include "migration/vmstate.h"
 #include "qemu/bitops.h"
 #include "qemu/timer.h"
 #include "qemu/log.h"
hw/timer/cadence_ttc.c +1 -0
index 810c08a0ae..5e3128c1e3 100644
@@ -19,6 +19,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
 
hw/timer/cmsdk-apb-dualtimer.c +1 -0
index 7328abb40b..6a084a91dd 100644
@@ -26,6 +26,7 @@
 #include "hw/irq.h"
 #include "hw/registerfields.h"
 #include "hw/timer/cmsdk-apb-dualtimer.h"
+#include "migration/vmstate.h"
 
 REG32(TIMER1LOAD, 0x0)
 REG32(TIMER1VALUE, 0x4)
hw/timer/cmsdk-apb-timer.c +1 -0
index 07f82e5fa1..c83e26566a 100644
@@ -37,6 +37,7 @@
 #include "hw/irq.h"
 #include "hw/registerfields.h"
 #include "hw/timer/cmsdk-apb-timer.h"
+#include "migration/vmstate.h"
 
 REG32(CTRL, 0)
     FIELD(CTRL, EN, 0, 1)
hw/timer/digic-timer.c +1 -0
index c818ed1d98..021c4ef714 100644
@@ -34,6 +34,7 @@
 #include "qemu/log.h"
 
 #include "hw/timer/digic-timer.h"
+#include "migration/vmstate.h"
 
 static const VMStateDescription vmstate_digic_timer = {
     .name = "digic.timer",
hw/timer/ds1338.c +1 -0
index 30d2d21408..588a9ba9be 100644
@@ -13,6 +13,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "hw/i2c/i2c.h"
+#include "migration/vmstate.h"
 #include "qemu/bcd.h"
 #include "qemu/module.h"
 
hw/timer/exynos4210_mct.c +1 -0
index 25e2125af8..7f2af5287c 100644
@@ -55,6 +55,7 @@
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/timer.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
hw/timer/exynos4210_pwm.c +1 -0
index 2af7b374cc..b7fad2ad44 100644
@@ -23,6 +23,7 @@
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/timer.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
hw/timer/exynos4210_rtc.c +1 -0
index b9dfaf51f7..561451059e 100644
@@ -30,6 +30,7 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/timer.h"
 #include "qemu/bcd.h"
 #include "hw/ptimer.h"
hw/timer/hpet.c +1 -0
index 17838df783..305704a339 100644
@@ -35,6 +35,7 @@
 #include "hw/timer/hpet.h"
 #include "hw/sysbus.h"
 #include "hw/timer/mc146818rtc.h"
+#include "migration/vmstate.h"
 #include "hw/timer/i8254.h"
 
 //#define HPET_DEBUG
hw/timer/i8254_common.c +1 -0
index 3e980f2dee..062e8690c4 100644
@@ -31,6 +31,7 @@
 #include "hw/timer/i8254.h"
 #include "hw/timer/i8254_internal.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 
 /* val must be 0 or 1 */
 void pit_set_gate(ISADevice *dev, int channel, int val)
hw/timer/imx_epit.c +1 -0
index afeb74339a..f54e059910 100644
@@ -14,6 +14,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/timer/imx_epit.h"
+#include "migration/vmstate.h"
 #include "hw/irq.h"
 #include "hw/misc/imx_ccm.h"
 #include "qemu/main-loop.h"
hw/timer/imx_gpt.c +1 -0
index b4cfc52019..49a441f451 100644
@@ -15,6 +15,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/timer/imx_gpt.h"
+#include "migration/vmstate.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/log.h"
hw/timer/lm32_timer.c +1 -0
index 4beffc1396..bfa9de76ba 100644
@@ -25,6 +25,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
hw/timer/m48t59.c +1 -0
index e2479c504a..1240315206 100644
@@ -36,6 +36,7 @@
 #include "qemu/module.h"
 
 #include "m48t59-internal.h"
+#include "migration/vmstate.h"
 
 #define TYPE_M48TXX_SYS_BUS "sysbus-m48txx"
 #define M48TXX_SYS_BUS_GET_CLASS(obj) \
hw/timer/mc146818rtc.c +1 -0
index 0410cccafa..b432662bc4 100644
@@ -34,6 +34,7 @@
 #include "sysemu/replay.h"
 #include "sysemu/reset.h"
 #include "hw/timer/mc146818rtc.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qapi/qapi-commands-misc-target.h"
 #include "qapi/qapi-events-misc-target.h"
hw/timer/milkymist-sysctl.c +1 -0
index 0f9c39715d..7c56224710 100644
@@ -25,6 +25,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "trace.h"
 #include "qemu/timer.h"
hw/timer/mss-timer.c +1 -0
index 1be9baf9c0..084e02199d 100644
@@ -29,6 +29,7 @@
 #include "qemu/log.h"
 #include "hw/irq.h"
 #include "hw/timer/mss-timer.h"
+#include "migration/vmstate.h"
 
 #ifndef MSS_TIMER_ERR_DEBUG
 #define MSS_TIMER_ERR_DEBUG  0
hw/timer/nrf51_timer.c +1 -0
index 297403c4fd..e04046eb15 100644
@@ -17,6 +17,7 @@
 #include "hw/arm/nrf51.h"
 #include "hw/irq.h"
 #include "hw/timer/nrf51_timer.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 
 #define TIMER_CLK_FREQ 16000000UL
hw/timer/pl031.c +1 -0
index 435c4a6c7e..39abd08643 100644
@@ -14,6 +14,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "hw/timer/pl031.h"
+#include "migration/vmstate.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "qemu/timer.h"
hw/timer/pxa2xx_timer.c +1 -0
index 9c3b2b80ab..f61053b3c6 100644
@@ -14,6 +14,7 @@
 #include "sysemu/sysemu.h"
 #include "hw/arm/pxa.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/timer/slavio_timer.c +1 -0
index 310a0a126a..931ffd483f 100644
@@ -27,6 +27,7 @@
 #include "hw/irq.h"
 #include "hw/ptimer.h"
 #include "hw/sysbus.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
hw/timer/stm32f2xx_timer.c +1 -0
index d7af928667..b41822f047 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/irq.h"
 #include "hw/timer/stm32f2xx_timer.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/timer/twl92230.c +1 -0
index 795f894a39..6b2a25b9c9 100644
@@ -26,6 +26,7 @@
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "ui/console.h"
 #include "qemu/bcd.h"
hw/timer/xlnx-zynqmp-rtc.c +1 -0
index 48c3fba677..5692db98c2 100644
@@ -37,6 +37,7 @@
 #include "sysemu/sysemu.h"
 #include "trace.h"
 #include "hw/timer/xlnx-zynqmp-rtc.h"
+#include "migration/vmstate.h"
 
 #ifndef XLNX_ZYNQMP_RTC_ERR_DEBUG
 #define XLNX_ZYNQMP_RTC_ERR_DEBUG 0
hw/tpm/tpm_emulator.c +1 -0
index fc0b512f4f..76c1e16fa1 100644
@@ -37,6 +37,7 @@
 #include "tpm_util.h"
 #include "tpm_ioctl.h"
 #include "migration/blocker.h"
+#include "migration/vmstate.h"
 #include "qapi/error.h"
 #include "qapi/clone-visitor.h"
 #include "qapi/qapi-visit-tpm.h"
hw/tpm/tpm_tis.c +1 -0
index 747e943c42..774d12a5e1 100644
@@ -30,6 +30,7 @@
 
 #include "hw/acpi/tpm.h"
 #include "hw/pci/pci_ids.h"
+#include "migration/vmstate.h"
 #include "sysemu/tpm_backend.h"
 #include "tpm_int.h"
 #include "tpm_util.h"
hw/usb/bus.c +1 -0
index a28e9e3b33..6aff15e504 100644
@@ -6,6 +6,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "sysemu/sysemu.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "trace.h"
 #include "qemu/cutils.h"
hw/usb/ccid-card-passthru.c +1 -0
index d1dac6e012..9e42547fc8 100644
@@ -13,6 +13,7 @@
 #include "qemu/units.h"
 #include <libcacard.h>
 #include "chardev/char-fe.h"
+#include "migration/vmstate.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "qemu/sockets.h"
hw/usb/dev-audio.c +1 -0
index 718ab53cbb..d4074edfc3 100644
@@ -32,6 +32,7 @@
 #include "qemu/osdep.h"
 #include "qemu/module.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "desc.h"
 #include "hw/hw.h"
 #include "audio/audio.h"
hw/usb/dev-bluetooth.c +1 -0
index 670ba32290..f6944fa74f 100644
@@ -22,6 +22,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "desc.h"
 #include "sysemu/bt.h"
 #include "hw/bt.h"
hw/usb/dev-hid.c +1 -0
index 62793eaf26..c7c65a8782 100644
@@ -27,6 +27,7 @@
 #include "hw/hw.h"
 #include "ui/console.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "desc.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
hw/usb/dev-hub.c +1 -0
index 89f55dd25c..886423bdec 100644
@@ -27,6 +27,7 @@
 #include "qemu/timer.h"
 #include "trace.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "desc.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
hw/usb/dev-mtp.c +1 -0
index fd1b3394a5..2e2a47ff7c 100644
@@ -24,6 +24,7 @@
 #include "qemu/filemonitor.h"
 #include "trace.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "desc.h"
 #include "qemu/units.h"
 
hw/usb/dev-network.c +1 -0
index 889069dd5a..db928d7cdf 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "desc.h"
 #include "net/net.h"
 #include "qemu/error-report.h"
hw/usb/dev-serial.c +1 -0
index b82f854103..039dc4889f 100644
@@ -14,6 +14,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "desc.h"
 #include "chardev/char-serial.h"
 #include "chardev/char-fe.h"
hw/usb/dev-smartcard-reader.c +1 -0
index 8d7e516fe7..57a0cbcae7 100644
@@ -41,6 +41,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "desc.h"
 
 #include "ccid.h"
hw/usb/dev-storage.c +1 -0
index 9ffb88ea5b..8bc5d8728a 100644
@@ -17,6 +17,7 @@
 #include "desc.h"
 #include "hw/scsi/scsi.h"
 #include "ui/console.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/block-backend.h"
hw/usb/dev-uas.c +1 -0
index abd8070d0c..525bc1e590 100644
@@ -17,6 +17,7 @@
 #include "qemu/module.h"
 
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "desc.h"
 #include "hw/scsi/scsi.h"
 #include "scsi/constants.h"
hw/usb/dev-wacom.c +1 -0
index 8c43db9335..9a8a2d3081 100644
@@ -30,6 +30,7 @@
 #include "hw/hw.h"
 #include "ui/console.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "desc.h"
 
hw/usb/hcd-ehci-pci.c +1 -0
index 03d3a39067..7232dee882 100644
@@ -17,6 +17,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/usb/hcd-ehci.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 #include "qemu/range.h"
 
hw/usb/hcd-ehci-sysbus.c +1 -0
index cd1f3c70a4..9a509f3b08 100644
@@ -17,6 +17,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/usb/hcd-ehci.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 static const VMStateDescription vmstate_ehci_sysbus = {
hw/usb/hcd-ehci.c +1 -0
index d2189fc844..45ff4f4115 100644
@@ -31,6 +31,7 @@
 #include "hw/irq.h"
 #include "hw/usb/ehci-regs.h"
 #include "hw/usb/hcd-ehci.h"
+#include "migration/vmstate.h"
 #include "trace.h"
 #include "qemu/error-report.h"
 
hw/usb/hcd-ohci-pci.c +1 -0
index e8f372c6ad..67fcfc4d7c 100644
@@ -23,6 +23,7 @@
 #include "qapi/error.h"
 #include "qemu/timer.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "hw/pci/pci.h"
 #include "hw/sysbus.h"
 #include "hw/qdev-dma.h"
hw/usb/hcd-ohci.c +1 -0
index 1ced5cd71a..438dfb4b83 100644
@@ -32,6 +32,7 @@
 #include "qemu/module.h"
 #include "qemu/timer.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "hw/sysbus.h"
 #include "hw/qdev-dma.h"
 #include "trace.h"
hw/usb/hcd-uhci.c +1 -0
index 98bd5cf49d..887885efa0 100644
@@ -30,6 +30,7 @@
 #include "hw/hw.h"
 #include "hw/usb.h"
 #include "hw/usb/uhci-regs.h"
+#include "migration/vmstate.h"
 #include "hw/pci/pci.h"
 #include "qapi/error.h"
 #include "qemu/timer.h"
hw/usb/hcd-xhci.c +1 -0
index 5894a18663..fc67476100 100644
@@ -25,6 +25,7 @@
 #include "qemu/module.h"
 #include "qemu/queue.h"
 #include "hw/usb.h"
+#include "migration/vmstate.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
hw/usb/host-libusb.c +1 -0
index 83ebc51620..6f5338832a 100644
@@ -40,6 +40,7 @@
 #include <libusb.h>
 
 #include "qapi/error.h"
+#include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
hw/usb/redirect.c +1 -0
index 846e60f3bb..84ec3d5219 100644
@@ -42,6 +42,7 @@
 
 #include "hw/usb.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 
 /* ERROR is defined below. Remove any previous definition. */
 #undef ERROR
hw/vfio/amd-xgbe.c +1 -0
index eedd48cfc1..96bd608b8d 100644
@@ -13,6 +13,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/vfio/vfio-amd-xgbe.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 static void amd_xgbe_realize(DeviceState *dev, Error **errp)
hw/vfio/ap.c +1 -0
index a995b86cd4..d1c86abb76 100644
@@ -25,6 +25,7 @@
 #include "qemu/config-file.h"
 #include "cpu.h"
 #include "kvm_s390x.h"
+#include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
 #include "hw/s390x/ap-bridge.h"
 #include "exec/address-spaces.h"
hw/vfio/calxeda-xgmac.c +1 -0
index 59233e8d7e..87c382e736 100644
@@ -13,6 +13,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/vfio/vfio-calxeda-xgmac.h"
+#include "migration/vmstate.h"
 #include "qemu/module.h"
 
 static void calxeda_xgmac_realize(DeviceState *dev, Error **errp)
hw/vfio/pci.c +1 -0
index d7a4e1875c..8a58ad670c 100644
@@ -25,6 +25,7 @@
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
 #include "hw/pci/pci_bridge.h"
+#include "migration/vmstate.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
hw/vfio/platform.c +1 -0
index 708df2ec0d..2ec9c9f49b 100644
@@ -20,6 +20,7 @@
 #include <linux/vfio.h>
 
 #include "hw/vfio/vfio-platform.h"
+#include "migration/vmstate.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "qemu/range.h"
hw/watchdog/cmsdk-apb-watchdog.c +1 -0
index a79da39dd5..3140e91959 100644
@@ -31,6 +31,7 @@
 #include "hw/irq.h"
 #include "hw/registerfields.h"
 #include "hw/watchdog/cmsdk-apb-watchdog.h"
+#include "migration/vmstate.h"
 
 REG32(WDOGLOAD, 0x0)
 REG32(WDOGVALUE, 0x4)
hw/watchdog/wdt_aspeed.c +1 -0
index 57fe24ae6b..49415f132d 100644
@@ -17,6 +17,7 @@
 #include "hw/misc/aspeed_scu.h"
 #include "hw/sysbus.h"
 #include "hw/watchdog/wdt_aspeed.h"
+#include "migration/vmstate.h"
 
 #define WDT_STATUS                      (0x00 / 4)
 #define WDT_RELOAD_VALUE                (0x04 / 4)
hw/watchdog/wdt_diag288.c +1 -0
index fec046ef09..5b6eb2b09f 100644
@@ -17,6 +17,7 @@
 #include "hw/sysbus.h"
 #include "qemu/timer.h"
 #include "hw/watchdog/wdt_diag288.h"
+#include "migration/vmstate.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 
hw/watchdog/wdt_i6300esb.c +1 -0
index 6780f01add..288be8f73c 100644
@@ -26,6 +26,7 @@
 #include "sysemu/watchdog.h"
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 
 /*#define I6300ESB_DEBUG 1*/
 
hw/watchdog/wdt_ib700.c +1 -0
index e0e5beb99d..e233945c2e 100644
@@ -25,6 +25,7 @@
 #include "sysemu/watchdog.h"
 #include "hw/hw.h"
 #include "hw/isa/isa.h"
+#include "migration/vmstate.h"
 
 /*#define IB700_DEBUG 1*/
 
hw/xtensa/xtfpga.c +1 -0
index 0a2cce3c64..83103974ab 100644
@@ -47,6 +47,7 @@
 #include "bootparam.h"
 #include "xtensa_memory.h"
 #include "hw/xtensa/mx_pic.h"
+#include "migration/vmstate.h"
 
 typedef struct XtfpgaFlashDesc {
     hwaddr base;
include/hw/acpi/tco.h +0 -1
index 726f840cce..a1e0da8213 100644
@@ -11,7 +11,6 @@
 #define HW_ACPI_TCO_H
 
 #include "exec/memory.h"
-#include "migration/vmstate.h"
 
 /* As per ICH9 spec, the internal timer has an error of ~0.6s on every tick */
 #define TCO_TICK_NSEC 600000000LL
include/hw/block/flash.h +0 -1
index 83a75f3170..1acaf7de80 100644
@@ -4,7 +4,6 @@
 /* NOR flash devices */
 
 #include "exec/memory.h"
-#include "migration/vmstate.h"
 
 /* pflash_cfi01.c */
 
include/hw/hw.h +0 -1
index 86ff26b712..e547008b17 100644
@@ -8,7 +8,6 @@
 
 #include "qom/object.h"
 #include "exec/memory.h"
-#include "migration/vmstate.h"
 
 void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
 
include/hw/input/hid.h +0 -1
index 2127c7ce45..6a9d7bf466 100644
@@ -1,7 +1,6 @@
 #ifndef QEMU_HID_H
 #define QEMU_HID_H
 
-#include "migration/vmstate.h"
 #include "ui/input.h"
 
 #define HID_MOUSE     1
include/hw/pci/shpc.h +1 -0
index bd8204f64e..d5683b7399 100644
@@ -4,6 +4,7 @@
 #include "exec/memory.h"
 #include "hw/hotplug.h"
 #include "hw/pci/pci.h"
+#include "migration/vmstate.h"
 
 struct SHPCDevice {
     /* Capability offset in device's config space */
include/hw/ppc/spapr_ovec.h +0 -1
index 5de5ecf5de..7891e9caac 100644
@@ -38,7 +38,6 @@
 #define SPAPR_OVEC_H
 
 #include "cpu.h"
-#include "migration/vmstate.h"
 
 typedef struct SpaprOptionVector SpaprOptionVector;
 
include/hw/ptimer.h +0 -1
index 2b866902aa..9c77055229 100644
@@ -9,7 +9,6 @@
 #define PTIMER_H
 
 #include "qemu/timer.h"
-#include "migration/vmstate.h"
 
 /* The ptimer API implements a simple periodic countdown timer.
  * The countdown timer has a value (which can be read and written via
include/hw/virtio/virtio.h +1 -0
index b189788cb2..5da749e2b0 100644
@@ -18,6 +18,7 @@
 #include "net/net.h"
 #include "hw/qdev.h"
 #include "sysemu/sysemu.h"
+#include "migration/vmstate.h"
 #include "qemu/event_notifier.h"
 #include "standard-headers/linux/virtio_config.h"
 #include "standard-headers/linux/virtio_ring.h"
include/migration/cpu.h +1 -0
index 2a22470d0d..65abe3c8cc 100644
@@ -5,6 +5,7 @@
 
 #include "exec/cpu-defs.h"
 #include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 
 #if TARGET_LONG_BITS == 64
 #define qemu_put_betl qemu_put_be64
include/net/net.h +0 -1
index acf0451fc4..e175ba9677 100644
@@ -4,7 +4,6 @@
 #include "qemu/queue.h"
 #include "qapi/qapi-types-net.h"
 #include "net/queue.h"
-#include "migration/vmstate.h"
 
 #define MAC_FMT "%02X:%02X:%02X:%02X:%02X:%02X"
 #define MAC_ARG(x) ((uint8_t *)(x))[0], ((uint8_t *)(x))[1], \
include/qemu/fifo8.h +0 -1
index 24b364462d..489c354291 100644
@@ -1,7 +1,6 @@
 #ifndef QEMU_FIFO8_H
 #define QEMU_FIFO8_H
 
-#include "migration/vmstate.h"
 
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

migration/savevm.c +1 -0
index 79ed44d475..89e8f4c180 100644

Lines of this file are not shown. View the raw message.

target/s390x/machine.c +1 -0
index 1e9526e937..12a2cd65b0 100644

Lines of this file are not shown. View the raw message.

util/fifo8.c +1 -0
index a9aa20a9f7..a5dd789ce5 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.21.0

Part of the diff is not shown here. View the raw message.

#18 lore raw

PATCH v3 16/29 Include exec/memory.h slightly less

In reply to Markus Armbruster

Drop unnecessary inclusions from headers. Downgrade a few more to exec/hwaddr.h.

---
 hw/audio/lm4549.h                   | 1 +
 hw/display/edid-region.c            | 1 +
 hw/display/tc6393xb.c               | 1 +
 hw/net/can/can_sja1000.h            | 1 +
 hw/net/ne2000.c                     | 1 +
 hw/xtensa/xtensa_memory.h           | 1 -
 include/hw/arm/boot.h               | 1 -
 include/hw/arm/fsl-imx7.h           | 1 -
 include/hw/arm/soc_dma.h            | 2 +-
 include/hw/block/flash.h            | 2 +-
 include/hw/boards.h                 | 1 +
 include/hw/char/parallel.h          | 1 -
 include/hw/display/milkymist_tmu2.h | 1 +
 include/hw/display/tc6393xb.h       | 2 --
 include/hw/display/vga.h            | 2 +-
 include/hw/hw.h                     | 1 -
 include/hw/i2c/pm_smbus.h           | 1 +
 include/hw/i2c/smbus_eeprom.h       | 1 +
 include/hw/misc/auxbus.h            | 1 +
 include/hw/ppc/xics.h               | 1 +
 include/hw/usb.h                    | 1 +
 include/hw/virtio/virtio.h          | 1 +
 migration/colo.c                    | 1 +
 migration/migration.h               | 1 +
 migration/postcopy-ram.c            | 1 +
 migration/rdma.c                    | 1 +
 26 files changed, 20 insertions(+), 10 deletions(-)
hw/audio/lm4549.h +1 -0
index 74c3ee8934..aba9bb5b07 100644
@@ -13,6 +13,7 @@
 #define HW_LM4549_H
 
 #include "audio/audio.h"
+#include "exec/hwaddr.h"
 
 typedef void (*lm4549_callback)(void *opaque);
 
hw/display/edid-region.c +1 -0
index d0d31bad3d..675429dc18 100644
@@ -1,4 +1,5 @@
 #include "qemu/osdep.h"
+#include "exec/memory.h"
 #include "hw/display/edid.h"
 
 static uint64_t edid_region_read(void *ptr, hwaddr addr, unsigned size)
hw/display/tc6393xb.c +1 -0
index 10e7f74c74..74a77eb43b 100644
@@ -17,6 +17,7 @@
 #include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/display/tc6393xb.h"
+#include "exec/memory.h"
 #include "hw/block/flash.h"
 #include "ui/console.h"
 #include "ui/pixel_ops.h"
hw/net/can/can_sja1000.h +1 -0
index 4731cbbd2a..220a622087 100644
@@ -27,6 +27,7 @@
 #ifndef HW_CAN_SJA1000_H
 #define HW_CAN_SJA1000_H
 
+#include "exec/hwaddr.h"
 #include "net/can_emu.h"
 
 #define CAN_SJA_MEM_SIZE      128
hw/net/ne2000.c +1 -0
index 7731b5acd1..a1a1046494 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "net/eth.h"
 #include "qemu/module.h"
+#include "exec/memory.h"
 #include "hw/irq.h"
 #include "migration/vmstate.h"
 #include "ne2000.h"
hw/xtensa/xtensa_memory.h +0 -1
index d50a3cccc0..af7e8025e3 100644
@@ -29,7 +29,6 @@
 #define XTENSA_MEMORY_H
 
 #include "cpu.h"
-#include "exec/memory.h"
 
 void xtensa_create_memory_regions(const XtensaMemory *memory,
                                   const char *name,
include/hw/arm/boot.h +0 -1
index 350d4b0498..5714dea1a2 100644
@@ -11,7 +11,6 @@
 #ifndef HW_ARM_BOOT_H
 #define HW_ARM_BOOT_H
 
-#include "exec/memory.h"
 #include "target/arm/cpu-qom.h"
 #include "qemu/notify.h"
 
include/hw/arm/fsl-imx7.h +0 -1
index 8003d45d1e..706aef2e7e 100644
@@ -38,7 +38,6 @@
 #include "hw/net/imx_fec.h"
 #include "hw/pci-host/designware.h"
 #include "hw/usb/chipidea.h"
-#include "exec/memory.h"
 #include "cpu.h"
 
 #define TYPE_FSL_IMX7 "fsl,imx7"
include/hw/arm/soc_dma.h +1 -1
index 7886291d54..e93a7499a8 100644
@@ -21,7 +21,7 @@
 #ifndef HW_SOC_DMA_H
 #define HW_SOC_DMA_H
 
-#include "exec/memory.h"
+#include "exec/hwaddr.h"
 
 struct soc_dma_s;
 struct soc_dma_ch_s;
include/hw/block/flash.h +1 -1
index 1acaf7de80..2136a2d5e4 100644
@@ -3,7 +3,7 @@
 
 /* NOR flash devices */
 
-#include "exec/memory.h"
+#include "exec/hwaddr.h"
 
 /* pflash_cfi01.c */
 
include/hw/boards.h +1 -0
index a71d1a53a5..3a0be3131a 100644
@@ -3,6 +3,7 @@
 #ifndef HW_BOARDS_H
 #define HW_BOARDS_H
 
+#include "exec/memory.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/accel.h"
 #include "hw/qdev.h"
include/hw/char/parallel.h +0 -1
index d6dd62fb9f..0a23c0f57e 100644
@@ -1,7 +1,6 @@
 #ifndef HW_PARALLEL_H
 #define HW_PARALLEL_H
 
-#include "exec/memory.h"
 #include "hw/isa/isa.h"
 #include "chardev/char.h"
 
include/hw/display/milkymist_tmu2.h +1 -0
index 148a119a1d..1fd978dcc5 100644
@@ -27,6 +27,7 @@
 #ifndef HW_DISPLAY_MILKYMIST_TMU2_H
 #define HW_DISPLAY_MILKYMIST_TMU2_H
 
+#include "exec/hwaddr.h"
 #include "hw/qdev.h"
 
 #if defined(CONFIG_X11) && defined(CONFIG_OPENGL)
include/hw/display/tc6393xb.h +0 -2
index c653ef717b..f9263bf98a 100644
@@ -12,8 +12,6 @@
 #ifndef HW_DISPLAY_TC6393XB_H
 #define HW_DISPLAY_TC6393XB_H
 
-#include "exec/memory.h"
-
 typedef struct TC6393xbState TC6393xbState;
 
 TC6393xbState *tc6393xb_init(struct MemoryRegion *sysmem,
include/hw/display/vga.h +1 -1
index 0401a3a292..ca0003dbfd 100644
@@ -9,7 +9,7 @@
 #ifndef QEMU_HW_DISPLAY_VGA_H
 #define QEMU_HW_DISPLAY_VGA_H
 
-#include "exec/memory.h"
+#include "exec/hwaddr.h"
 
 enum vga_retrace_method {
     VGA_RETRACE_DUMB,
include/hw/hw.h +0 -1
index e547008b17..8e18358e6a 100644
@@ -7,7 +7,6 @@
 #endif
 
 #include "qom/object.h"
-#include "exec/memory.h"
 
 void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
 
include/hw/i2c/pm_smbus.h +1 -0
index fb55c44444..0d74207efb 100644
@@ -1,6 +1,7 @@
 #ifndef PM_SMBUS_H
 #define PM_SMBUS_H
 
+#include "exec/memory.h"
 #include "hw/i2c/smbus_master.h"
 
 #define PM_SMBUS_MAX_MSG_SIZE 32
include/hw/i2c/smbus_eeprom.h +1 -0
index 0f96836bab..15e2151b50 100644
@@ -23,6 +23,7 @@
 #ifndef HW_SMBUS_EEPROM_H
 #define HW_SMBUS_EEPROM_H
 
+#include "exec/cpu-common.h"
 #include "hw/i2c/i2c.h"
 
 void smbus_eeprom_init_one(I2CBus *bus, uint8_t address, uint8_t *eeprom_buf);
include/hw/misc/auxbus.h +1 -0
index c15b444748..ee0ca3dd51 100644
@@ -25,6 +25,7 @@
 #ifndef HW_MISC_AUXBUS_H
 #define HW_MISC_AUXBUS_H
 
+#include "exec/memory.h"
 #include "hw/qdev.h"
 
 typedef struct AUXBus AUXBus;
include/hw/ppc/xics.h +1 -0
index 1eb7b5cd68..457aa98f81 100644
@@ -28,6 +28,7 @@
 #ifndef XICS_H
 #define XICS_H
 
+#include "exec/memory.h"
 #include "hw/qdev.h"
 
 #define XICS_IPI        0x2
include/hw/usb.h +1 -0
index c21f41c8a9..96971a4c26 100644
@@ -25,6 +25,7 @@
  * THE SOFTWARE.
  */
 
+#include "exec/memory.h"
 #include "hw/qdev.h"
 #include "qemu/iov.h"
 #include "qemu/queue.h"
include/hw/virtio/virtio.h +1 -0
index 5da749e2b0..e6a2a0a6e0 100644
@@ -14,6 +14,7 @@
 #ifndef QEMU_VIRTIO_H
 #define QEMU_VIRTIO_H
 
+#include "exec/memory.h"
 #include "hw/hw.h"
 #include "net/net.h"
 #include "hw/qdev.h"
migration/colo.c +1 -0
index 9f84b1fa3c..0b5b620391 100644
@@ -23,6 +23,7 @@
 #include "io/channel-buffer.h"
 #include "trace.h"
 #include "qemu/error-report.h"
+#include "qemu/rcu.h"
 #include "migration/failover.h"
 #ifdef CONFIG_REPLICATION
 #include "replication.h"
migration/migration.h +1 -0
index 26f01d00f6..a7882af67a 100644
@@ -14,6 +14,7 @@
 #ifndef QEMU_MIGRATION_H
 #define QEMU_MIGRATION_H
 
+#include "exec/cpu-common.h"
 #include "qapi/qapi-types-migration.h"
 #include "qemu/thread.h"
 #include "qemu/coroutine_int.h"
migration/postcopy-ram.c +1 -0
index 9faacacc9e..56054d0a73 100644
@@ -25,6 +25,7 @@
 #include "ram.h"
 #include "qapi/error.h"
 #include "qemu/notify.h"
+#include "qemu/rcu.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/balloon.h"
 #include "qemu/error-report.h"
migration/rdma.c +1 -0
index 3036221ee8..b0e27b6174 100644
@@ -25,6 +25,7 @@
 #include "qemu/error-report.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
+#include "qemu/rcu.h"
 #include "qemu/sockets.h"
 #include "qemu/bitmap.h"
 #include "qemu/coroutine.h"
Signature · 1 line
2.21.0
Reviewed-by Tested-by on v3 16/29
#19 lore raw

Re: [Qemu-devel] [PATCH v3 16/29] Include exec/memory.h slightly less

Quoted 24 lines · Markus Armbruster

Drop unnecessary inclusions from headers. Downgrade a few more to exec/hwaddr.h.

---
 hw/audio/lm4549.h                   | 1 +
 hw/display/edid-region.c            | 1 +
 hw/display/tc6393xb.c               | 1 +
 hw/net/can/can_sja1000.h            | 1 +
 hw/net/ne2000.c                     | 1 +
 hw/xtensa/xtensa_memory.h           | 1 -
 include/hw/arm/boot.h               | 1 -
 include/hw/arm/fsl-imx7.h           | 1 -
 include/hw/arm/soc_dma.h            | 2 +-
 include/hw/block/flash.h            | 2 +-
 include/hw/boards.h                 | 1 +
 include/hw/char/parallel.h          | 1 -
 include/hw/display/milkymist_tmu2.h | 1 +
 include/hw/display/tc6393xb.h       | 2 --
 include/hw/display/vga.h            | 2 +-
 include/hw/hw.h                     | 1 -
 include/hw/i2c/pm_smbus.h           | 1 +
 include/hw/i2c/smbus_eeprom.h       | 1 +
 include/hw/misc/auxbus.h            | 1 +
Quoted 8 lines
 include/hw/ppc/xics.h               | 1 +
 include/hw/usb.h                    | 1 +
 include/hw/virtio/virtio.h          | 1 +
 migration/colo.c                    | 1 +
 migration/migration.h               | 1 +
 migration/postcopy-ram.c            | 1 +
 migration/rdma.c                    | 1 +
 26 files changed, 20 insertions(+), 10 deletions(-)
#20 lore raw

PATCH v3 17/29 Include qom/object.h slightly less

In reply to Markus Armbruster

hw/hw.h used to include headers hardware emulation "usually" needs. The previous commits removed all but one of them, to good effect. Only qom/object.h is left. Remove that one, too.

---
 include/hw/display/edid.h | 2 +-
 include/hw/hw.h           | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
include/hw/display/edid.h +1 -1
index 7948bd2c40..ff99dc0a05 100644
@@ -1,7 +1,7 @@
 #ifndef EDID_H
 #define EDID_H
 
-#include "hw/hw.h"
+#include "qom/object.h"
 
 typedef struct qemu_edid_info {
     const char *vendor; /* http://www.uefi.org/pnp_id_list */
include/hw/hw.h +0 -2
index 8e18358e6a..8079b911fa 100644
@@ -6,8 +6,6 @@
 #error Cannot include hw/hw.h from user emulation
 #endif
 
-#include "qom/object.h"
-
 void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
 
 #endif
Signature · 1 line
2.21.0
#21 lore raw

PATCH v3 18/29 Include hw/hw.h exactly where needed

In reply to Markus Armbruster

In my "build everything" tree, changing hw/hw.h triggers a recompile of some 2600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h).

The previous commits have left only the declaration of hw_error() in hw/hw.h. This permits dropping most of its inclusions. Touching it now recompiles less than 200 objects.

---
 accel/kvm/kvm-all.c                      | 1 -
 audio/audio.c                            | 1 -
 audio/spiceaudio.c                       | 1 -
 audio/wavcapture.c                       | 1 -
 cpus.c                                   | 1 +
 device-hotplug.c                         | 1 -
 exec.c                                   | 1 -
 hw/9pfs/xen-9p-backend.c                 | 1 -
 hw/acpi/core.c                           | 1 -
 hw/acpi/cpu_hotplug.c                    | 1 -
 hw/acpi/ich9.c                           | 1 -
 hw/acpi/pcihp.c                          | 1 -
 hw/acpi/piix4.c                          | 1 -
 hw/adc/stm32f2xx_adc.c                   | 1 -
 hw/alpha/dp264.c                         | 1 -
 hw/alpha/typhoon.c                       | 1 -
 hw/arm/boot.c                            | 1 -
 hw/arm/collie.c                          | 1 -
 hw/arm/gumstix.c                         | 1 -
 hw/arm/integratorcp.c                    | 1 +
 hw/arm/mainstone.c                       | 1 -
 hw/arm/musicpal.c                        | 1 +
 hw/arm/omap2.c                           | 1 -
 hw/arm/omap_sx1.c                        | 1 -
 hw/arm/palm.c                            | 1 -
 hw/arm/pxa2xx_pic.c                      | 1 -
 hw/arm/spitz.c                           | 1 -
 hw/arm/tosa.c                            | 1 -
 hw/arm/virt-acpi-build.c                 | 1 -
 hw/arm/z2.c                              | 1 -
 hw/audio/ac97.c                          | 1 -
 hw/audio/adlib.c                         | 1 -
 hw/audio/cs4231a.c                       | 1 -
 hw/audio/es1370.c                        | 1 -
 hw/audio/gus.c                           | 1 -
 hw/audio/hda-codec.c                     | 1 -
 hw/audio/intel-hda.c                     | 1 -
 hw/audio/marvell_88w8618.c               | 1 -
 hw/audio/milkymist-ac97.c                | 1 -
 hw/audio/pcspk.c                         | 1 -
 hw/audio/sb16.c                          | 1 -
 hw/block/dataplane/xen-block.c           | 1 -
 hw/block/ecc.c                           | 1 -
 hw/block/fdc.c                           | 1 -
 hw/block/m25p80.c                        | 1 -
 hw/block/nvme.c                          | 1 -
 hw/block/pflash_cfi01.c                  | 1 -
 hw/block/pflash_cfi02.c                  | 1 -
 hw/block/tc58128.c                       | 1 -
 hw/block/xen-block.c                     | 1 -
 hw/char/debugcon.c                       | 1 -
 hw/char/digic-uart.c                     | 1 -
 hw/char/escc.c                           | 1 -
 hw/char/lm32_juart.c                     | 1 -
 hw/char/lm32_uart.c                      | 1 -
 hw/char/mcf_uart.c                       | 1 -
 hw/char/milkymist-uart.c                 | 1 -
 hw/char/omap_uart.c                      | 1 -
 hw/char/parallel.c                       | 1 -
 hw/char/sh_serial.c                      | 1 -
 hw/char/xen_console.c                    | 1 -
 hw/char/xilinx_uartlite.c                | 1 +
 hw/core/empty_slot.c                     | 1 -
 hw/core/null-machine.c                   | 1 -
 hw/core/ptimer.c                         | 1 -
 hw/cris/boot.c                           | 1 -
 hw/display/ati.c                         | 1 -
 hw/display/bcm2835_fb.c                  | 1 +
 hw/display/bochs-display.c               | 1 -
 hw/display/cirrus_vga.c                  | 1 -
 hw/display/cirrus_vga_isa.c              | 1 -
 hw/display/exynos4210_fimd.c             | 1 +
 hw/display/framebuffer.c                 | 1 -
 hw/display/milkymist-tmu2.c              | 1 -
 hw/display/omap_lcdc.c                   | 1 -
 hw/display/qxl.h                         | 1 -
 hw/display/sm501.c                       | 1 -
 hw/display/tc6393xb.c                    | 1 -
 hw/display/vga-isa-mm.c                  | 1 -
 hw/display/vga-isa.c                     | 1 -
 hw/display/vga-pci.c                     | 1 -
 hw/display/vga.c                         | 1 -
 hw/display/virtio-vga.c                  | 1 -
 hw/display/vmware_vga.c                  | 1 -
 hw/display/xenfb.c                       | 1 -
 hw/dma/i8257.c                           | 1 -
 hw/dma/pl080.c                           | 1 +
 hw/dma/puv3_dma.c                        | 1 -
 hw/dma/rc4030.c                          | 1 -
 hw/dma/sparc32_dma.c                     | 1 -
 hw/dma/xilinx_axidma.c                   | 1 +
 hw/gpio/max7310.c                        | 1 +
 hw/gpio/omap_gpio.c                      | 1 -
 hw/gpio/puv3_gpio.c                      | 1 -
 hw/gpio/zaurus.c                         | 1 -
 hw/hppa/dino.c                           | 1 -
 hw/hppa/machine.c                        | 1 -
 hw/i2c/bitbang_i2c.c                     | 1 -
 hw/i2c/omap_i2c.c                        | 1 -
 hw/i2c/pm_smbus.c                        | 1 -
 hw/i2c/ppc4xx_i2c.c                      | 1 -
 hw/i2c/smbus_eeprom.c                    | 1 -
 hw/i2c/smbus_ich9.c                      | 1 -
 hw/i2c/smbus_master.c                    | 1 -
 hw/i2c/smbus_slave.c                     | 1 -
 hw/i386/amd_iommu.h                      | 1 -
 hw/i386/multiboot.c                      | 1 -
 hw/i386/pc.c                             | 1 -
 hw/i386/pc_piix.c                        | 1 -
 hw/i386/pc_q35.c                         | 1 -
 hw/i386/pc_sysfw.c                       | 1 -
 hw/i386/vmmouse.c                        | 1 -
 hw/i386/vmport.c                         | 1 -
 hw/i386/xen/xen-hvm.c                    | 1 +
 hw/i386/xen/xen_platform.c               | 1 -
 hw/i386/xen/xen_pvdevice.c               | 1 -
 hw/ide/ahci-allwinner.c                  | 1 -
 hw/ide/ahci.c                            | 1 -
 hw/ide/cmd646.c                          | 1 -
 hw/ide/core.c                            | 1 -
 hw/ide/ich.c                             | 1 -
 hw/ide/ioport.c                          | 1 -
 hw/ide/isa.c                             | 1 -
 hw/ide/macio.c                           | 1 -
 hw/ide/microdrive.c                      | 1 -
 hw/ide/mmio.c                            | 1 -
 hw/ide/pci.c                             | 1 -
 hw/ide/piix.c                            | 1 -
 hw/ide/qdev.c                            | 1 -
 hw/ide/via.c                             | 1 -
 hw/input/hid.c                           | 1 -
 hw/input/lm832x.c                        | 1 -
 hw/input/milkymist-softusb.c             | 1 -
 hw/input/pckbd.c                         | 1 -
 hw/input/ps2.c                           | 1 -
 hw/input/stellaris_input.c               | 1 -
 hw/input/tsc2005.c                       | 1 -
 hw/intc/etraxfs_pic.c                    | 1 -
 hw/intc/exynos4210_combiner.c            | 1 +
 hw/intc/heathrow_pic.c                   | 1 -
 hw/intc/i8259.c                          | 1 -
 hw/intc/ioapic.c                         | 1 -
 hw/intc/lm32_pic.c                       | 1 -
 hw/intc/mips_gic.c                       | 1 -
 hw/intc/omap_intc.c                      | 1 -
 hw/intc/ompic.c                          | 1 -
 hw/intc/openpic.c                        | 1 -
 hw/intc/openpic_kvm.c                    | 1 -
 hw/intc/sh_intc.c                        | 1 -
 hw/intc/xics.c                           | 1 -
 hw/intc/xics_kvm.c                       | 1 -
 hw/intc/xics_spapr.c                     | 1 -
 hw/intc/xilinx_intc.c                    | 1 -
 hw/ipmi/ipmi.c                           | 1 -
 hw/ipmi/isa_ipmi_bt.c                    | 1 -
 hw/ipmi/isa_ipmi_kcs.c                   | 1 -
 hw/isa/apm.c                             | 1 -
 hw/isa/lpc_ich9.c                        | 1 -
 hw/isa/piix4.c                           | 1 -
 hw/isa/vt82c686.c                        | 1 -
 hw/lm32/lm32_boards.c                    | 1 -
 hw/lm32/milkymist.c                      | 1 -
 hw/m68k/an5206.c                         | 1 -
 hw/microblaze/boot.h                     | 1 -
 hw/microblaze/petalogix_ml605_mmu.c      | 1 -
 hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 -
 hw/mips/addr.c                           | 1 -
 hw/mips/boston.c                         | 1 -
 hw/mips/gt64xxx_pci.c                    | 1 -
 hw/mips/mips_fulong2e.c                  | 1 -
 hw/mips/mips_int.c                       | 1 -
 hw/mips/mips_jazz.c                      | 1 -
 hw/mips/mips_malta.c                     | 1 -
 hw/mips/mips_mipssim.c                   | 1 -
 hw/mips/mips_r4k.c                       | 1 -
 hw/misc/applesmc.c                       | 1 -
 hw/misc/arm_integrator_debug.c           | 1 -
 hw/misc/arm_sysctl.c                     | 1 -
 hw/misc/debugexit.c                      | 1 -
 hw/misc/edu.c                            | 1 +
 hw/misc/ivshmem.c                        | 1 -
 hw/misc/macio/cuda.c                     | 1 -
 hw/misc/macio/gpio.c                     | 1 -
 hw/misc/macio/mac_dbdma.c                | 1 -
 hw/misc/macio/macio.c                    | 1 -
 hw/misc/macio/pmu.c                      | 1 -
 hw/misc/milkymist-hpdmc.c                | 1 -
 hw/misc/milkymist-pfpu.c                 | 1 -
 hw/misc/mips_cmgcr.c                     | 1 -
 hw/misc/mos6522.c                        | 1 -
 hw/misc/mst_fpga.c                       | 1 -
 hw/misc/omap_gpmc.c                      | 1 -
 hw/misc/omap_l4.c                        | 1 -
 hw/misc/omap_sdrc.c                      | 1 -
 hw/misc/pc-testdev.c                     | 1 -
 hw/misc/pca9552.c                        | 1 -
 hw/misc/pci-testdev.c                    | 1 -
 hw/misc/puv3_pm.c                        | 1 -
 hw/misc/tmp105.c                         | 1 -
 hw/misc/tmp421.c                         | 1 -
 hw/misc/unimp.c                          | 1 -
 hw/misc/zynq-xadc.c                      | 1 -
 hw/misc/zynq_slcr.c                      | 1 -
 hw/moxie/moxiesim.c                      | 1 -
 hw/net/can/can_kvaser_pci.c              | 1 -
 hw/net/can/can_mioe3680_pci.c            | 1 -
 hw/net/can/can_pcm3680_pci.c             | 1 -
 hw/net/can/can_sja1000.c                 | 1 -
 hw/net/e1000.c                           | 1 -
 hw/net/e1000e.c                          | 1 +
 hw/net/e1000e_core.c                     | 1 +
 hw/net/e1000x_common.c                   | 1 -
 hw/net/eepro100.c                        | 1 -
 hw/net/lan9118.c                         | 1 +
 hw/net/milkymist-minimac2.c              | 1 -
 hw/net/mipsnet.c                         | 1 -
 hw/net/ne2000.h                          | 1 -
 hw/net/opencores_eth.c                   | 1 -
 hw/net/rocker/rocker.c                   | 1 -
 hw/net/rocker/rocker_desc.c              | 1 -
 hw/net/rtl8139.c                         | 1 -
 hw/net/spapr_llan.c                      | 1 -
 hw/net/sunhme.c                          | 1 -
 hw/net/xen_nic.c                         | 1 -
 hw/net/xilinx_axienet.c                  | 1 +
 hw/net/xilinx_ethlite.c                  | 1 -
 hw/nios2/10m50_devboard.c                | 1 -
 hw/nios2/boot.h                          | 1 -
 hw/nios2/generic_nommu.c                 | 1 -
 hw/nvram/chrp_nvram.c                    | 1 -
 hw/nvram/eeprom93xx.c                    | 1 -
 hw/nvram/eeprom_at24c.c                  | 1 -
 hw/nvram/fw_cfg.c                        | 1 -
 hw/nvram/mac_nvram.c                     | 1 -
 hw/openrisc/cputimer.c                   | 1 -
 hw/openrisc/openrisc_sim.c               | 1 -
 hw/openrisc/pic_cpu.c                    | 1 -
 hw/pci-host/bonito.c                     | 1 -
 hw/pci-host/gpex.c                       | 1 -
 hw/pci-host/piix.c                       | 1 -
 hw/pci-host/ppce500.c                    | 1 -
 hw/pci-host/prep.c                       | 1 -
 hw/pci-host/q35.c                        | 1 -
 hw/pci-host/uninorth.c                   | 1 -
 hw/pci/msix.c                            | 1 -
 hw/pci/pci.c                             | 1 -
 hw/pci/pcie_host.c                       | 1 -
 hw/pcmcia/pcmcia.c                       | 1 -
 hw/pcmcia/pxa2xx.c                       | 1 -
 hw/ppc/e500.c                            | 1 -
 hw/ppc/mac_newworld.c                    | 1 -
 hw/ppc/mac_oldworld.c                    | 1 -
 hw/ppc/mpc8544_guts.c                    | 1 -
 hw/ppc/pnv.c                             | 1 -
 hw/ppc/pnv_bmc.c                         | 1 -
 hw/ppc/pnv_occ.c                         | 1 -
 hw/ppc/pnv_psi.c                         | 1 -
 hw/ppc/pnv_xscom.c                       | 1 -
 hw/ppc/ppc.c                             | 1 -
 hw/ppc/ppc405_boards.c                   | 1 -
 hw/ppc/ppc405_uc.c                       | 1 -
 hw/ppc/ppc440_bamboo.c                   | 1 -
 hw/ppc/ppc440_pcix.c                     | 1 -
 hw/ppc/ppc440_uc.c                       | 1 -
 hw/ppc/ppc4xx_devs.c                     | 1 -
 hw/ppc/ppc4xx_pci.c                      | 1 -
 hw/ppc/ppc_booke.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/spapr_vio.c                       | 1 -
 hw/ppc/virtex_ml507.c                    | 1 -
 hw/rdma/vmw/pvrdma_cmd.c                 | 1 -
 hw/rdma/vmw/pvrdma_main.c                | 1 -
 hw/riscv/sifive_e.c                      | 1 -
 hw/riscv/sifive_prci.c                   | 1 +
 hw/riscv/sifive_test.c                   | 1 +
 hw/riscv/sifive_u.c                      | 1 -
 hw/riscv/sifive_uart.c                   | 1 +
 hw/riscv/spike.c                         | 1 -
 hw/riscv/virt.c                          | 1 -
 hw/s390x/virtio-ccw.c                    | 1 -
 hw/scsi/lsi53c895a.c                     | 1 -
 hw/scsi/megasas.c                        | 1 -
 hw/scsi/mptconfig.c                      | 1 -
 hw/scsi/mptendian.c                      | 1 -
 hw/scsi/mptsas.c                         | 1 -
 hw/scsi/scsi-bus.c                       | 1 -
 hw/scsi/spapr_vscsi.c                    | 1 -
 hw/sd/milkymist-memcard.c                | 1 -
 hw/sd/omap_mmc.c                         | 1 -
 hw/sd/pxa2xx_mmci.c                      | 1 -
 hw/sd/sd.c                               | 1 -
 hw/sd/sdhci-pci.c                        | 1 -
 hw/sd/sdhci.c                            | 1 -
 hw/sh4/r2d.c                             | 1 -
 hw/sh4/sh7750.c                          | 1 -
 hw/sh4/sh7750_regnames.c                 | 1 -
 hw/sh4/shix.c                            | 1 -
 hw/sparc/leon3.c                         | 1 -
 hw/sparc64/niagara.c                     | 1 -
 hw/sparc64/sun4u.c                       | 1 -
 hw/timer/a9gtimer.c                      | 1 +
 hw/timer/arm_mptimer.c                   | 1 +
 hw/timer/exynos4210_mct.c                | 1 +
 hw/timer/exynos4210_rtc.c                | 1 -
 hw/timer/hpet.c                          | 1 -
 hw/timer/i8254.c                         | 1 -
 hw/timer/i8254_common.c                  | 1 -
 hw/timer/lm32_timer.c                    | 1 -
 hw/timer/m48t59.c                        | 1 -
 hw/timer/mc146818rtc.c                   | 1 -
 hw/timer/milkymist-sysctl.c              | 1 -
 hw/timer/mips_gictimer.c                 | 1 -
 hw/timer/omap_gptimer.c                  | 1 -
 hw/timer/omap_synctimer.c                | 1 -
 hw/timer/pxa2xx_timer.c                  | 1 -
 hw/timer/sun4v-rtc.c                     | 1 -
 hw/timer/twl92230.c                      | 1 -
 hw/tpm/tpm_emulator.c                    | 1 -
 hw/tpm/tpm_passthrough.c                 | 1 -
 hw/tricore/tricore_testboard.c           | 1 -
 hw/usb/bus.c                             | 1 -
 hw/usb/dev-audio.c                       | 1 -
 hw/usb/dev-hid.c                         | 1 -
 hw/usb/dev-wacom.c                       | 1 -
 hw/usb/hcd-ehci.h                        | 1 -
 hw/usb/hcd-ohci-pci.c                    | 1 -
 hw/usb/hcd-ohci.c                        | 1 -
 hw/usb/hcd-uhci.c                        | 1 -
 hw/usb/hcd-xhci-nec.c                    | 1 -
 hw/usb/hcd-xhci.c                        | 1 -
 hw/usb/libhw.c                           | 1 -
 hw/usb/tusb6010.c                        | 1 +
 hw/vfio/pci-quirks.c                     | 1 +
 hw/vfio/pci.c                            | 1 +
 hw/virtio/vhost.c                        | 1 -
 hw/virtio/virtio-bus.c                   | 1 -
 hw/watchdog/wdt_i6300esb.c               | 1 -
 hw/watchdog/wdt_ib700.c                  | 1 -
 hw/xen/xen-bus-helper.c                  | 1 -
 hw/xen/xen-bus.c                         | 1 -
 hw/xen/xen-legacy-backend.c              | 1 -
 hw/xen/xen_pt_load_rom.c                 | 1 -
 hw/xenpv/xen_machine_pv.c                | 1 -
 hw/xtensa/mx_pic.c                       | 1 -
 hw/xtensa/pic_cpu.c                      | 1 -
 include/hw/audio/pcspk.h                 | 1 -
 include/hw/audio/wm8750.h                | 1 -
 include/hw/char/serial.h                 | 1 -
 include/hw/char/stm32f2xx_usart.h        | 1 -
 include/hw/dma/i8257.h                   | 1 -
 include/hw/hw.h                          | 1 -
 include/hw/i386/ich9.h                   | 1 -
 include/hw/i386/ioapic_internal.h        | 1 -
 include/hw/input/i8042.h                 | 1 -
 include/hw/isa/apm.h                     | 1 -
 include/hw/isa/i8259_internal.h          | 1 -
 include/hw/misc/stm32f2xx_syscfg.h       | 1 -
 include/hw/net/ne2000-isa.h              | 1 -
 include/hw/pci-host/designware.h         | 1 -
 include/hw/pci-host/gpex.h               | 1 -
 include/hw/pci-host/q35.h                | 1 -
 include/hw/pci-host/uninorth.h           | 1 -
 include/hw/pci-host/xilinx-pcie.h        | 1 -
 include/hw/pci/pcie.h                    | 1 -
 include/hw/pci/pcie_aer.h                | 1 -
 include/hw/qdev.h                        | 1 -
 include/hw/riscv/riscv_htif.h            | 1 -
 include/hw/ssi/stm32f2xx_spi.h           | 1 -
 include/hw/timer/aspeed_rtc.h            | 1 -
 include/hw/timer/i8254.h                 | 1 -
 include/hw/timer/i8254_internal.h        | 1 -
 include/hw/virtio/vhost.h                | 1 -
 include/hw/virtio/virtio.h               | 1 -
 include/hw/xen/xen_common.h              | 1 -
 include/sysemu/dma.h                     | 1 -
 include/sysemu/hax.h                     | 1 -
 include/sysemu/hvf.h                     | 1 -
 monitor/misc.c                           | 1 -
 target/alpha/machine.c                   | 1 -
 target/arm/machine.c                     | 1 -
 target/cris/machine.c                    | 1 -
 target/hppa/machine.c                    | 1 -
 target/i386/cpu.c                        | 1 -
 target/i386/machine.c                    | 1 -
 target/lm32/machine.c                    | 1 -
 target/mips/machine.c                    | 1 -
 target/moxie/machine.c                   | 1 -
 target/openrisc/machine.c                | 1 -
 target/ppc/kvm.c                         | 1 +
 target/ppc/machine.c                     | 1 -
 target/s390x/cpu.c                       | 1 -
 target/s390x/kvm.c                       | 1 -
 target/s390x/machine.c                   | 1 -
 target/s390x/mmu_helper.c                | 1 +
 target/sparc/machine.c                   | 1 -
 ui/spice-core.c                          | 1 -
 vl.c                                     | 1 -
 401 files changed, 27 insertions(+), 374 deletions(-)
accel/kvm/kvm-all.c +0 -1
index f450f25295..d20da99c21 100644
@@ -23,7 +23,6 @@
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
 #include "hw/s390x/adapter.h"
audio/audio.c +0 -1
index cf65ae49f4..b9b2d07e54 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "audio.h"
 #include "migration/vmstate.h"
 #include "monitor/monitor.h"
audio/spiceaudio.c +0 -1
index 0ead5ae43a..ec1c8fe936 100644
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "qemu/host-utils.h"
 #include "qemu/module.h"
 #include "qemu/error-report.h"
audio/wavcapture.c +0 -1
index 74320dfecc..493edc60e4 100644
@@ -1,5 +1,4 @@
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "monitor/monitor.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
cpus.c +1 -0
index 4ebdacdd44..e70cc58e31 100644
@@ -56,6 +56,7 @@
 #include "hw/nmi.h"
 #include "sysemu/replay.h"
 #include "hw/boards.h"
+#include "hw/hw.h"
 
 #ifdef CONFIG_LINUX
 
device-hotplug.c +0 -1
index 6153259d71..f01d53774b 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
exec.c +0 -1
index 3e78de3b8f..78f849de99 100644
@@ -42,7 +42,6 @@
 #if defined(CONFIG_USER_ONLY)
 #include "qemu.h"
 #else /* !CONFIG_USER_ONLY */
-#include "hw/hw.h"
 #include "exec/memory.h"
 #include "exec/ioport.h"
 #include "sysemu/dma.h"
hw/9pfs/xen-9p-backend.c +0 -1
index 25ab04d95a..c50b1961d3 100644
@@ -10,7 +10,6 @@
 
 #include "qemu/osdep.h"
 
-#include "hw/hw.h"
 #include "hw/9pfs/9p.h"
 #include "hw/xen/xen-legacy-backend.h"
 #include "hw/9pfs/xen-9pfs.h"
hw/acpi/core.c +0 -1
index 39e9fb1a6c..f36d60f619 100644
@@ -21,7 +21,6 @@
 
 #include "qemu/osdep.h"
 #include "sysemu/sysemu.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/acpi/acpi.h"
 #include "hw/nvram/fw_cfg.h"
hw/acpi/cpu_hotplug.c +0 -1
index 5243918125..a83567e6aa 100644
@@ -10,7 +10,6 @@
  * See the COPYING file in the top-level directory.
  */
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/acpi/cpu_hotplug.h"
 #include "qapi/error.h"
 #include "qom/cpu.h"
hw/acpi/ich9.c +0 -1
index 88eb7dbab1..39649cbe6a 100644
@@ -25,7 +25,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
 #include "hw/i386/pc.h"
hw/acpi/pcihp.c +0 -1
index 912ff6dd5c..ac49a5a77b 100644
@@ -27,7 +27,6 @@
 #include "qemu/osdep.h"
 #include "hw/acpi/pcihp.h"
 
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bridge.h"
hw/acpi/piix4.c +0 -1
index 1896dbbfb9..ec47a9143b 100644
@@ -20,7 +20,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/irq.h"
 #include "hw/isa/apm.h"
hw/adc/stm32f2xx_adc.c +0 -1
index 9684653e5e..4f9d485ecf 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
-#include "hw/hw.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/adc/stm32f2xx_adc.h"
hw/alpha/dp264.c +0 -1
index 9dfb835013..546b89bbcc 100644
@@ -9,7 +9,6 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "elf.h"
 #include "hw/loader.h"
 #include "hw/boards.h"
hw/alpha/typhoon.c +0 -1
index 6797eb0abe..5d7f8f3342 100644
@@ -11,7 +11,6 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "sysemu/sysemu.h"
 #include "alpha_sys.h"
hw/arm/boot.c +0 -1
index d082daf6f2..8563672942 100644
@@ -12,7 +12,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include <libfdt.h>
-#include "hw/hw.h"
 #include "hw/arm/boot.h"
 #include "hw/arm/linux-boot-if.h"
 #include "sysemu/kvm.h"
hw/arm/collie.c +0 -1
index 3db3c56004..219643c633 100644
@@ -10,7 +10,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/boards.h"
 #include "strongarm.h"
hw/arm/gumstix.c +0 -1
index 343cbfd7da..f26a0e8010 100644
@@ -36,7 +36,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
-#include "hw/hw.h"
 #include "hw/arm/pxa.h"
 #include "net/net.h"
 #include "hw/block/flash.h"
hw/arm/integratorcp.c +1 -0
index f8fbe402db..ecccb4125a 100644
@@ -21,6 +21,7 @@
 #include "sysemu/sysemu.h"
 #include "qemu/error-report.h"
 #include "hw/char/pl011.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 
 #define TYPE_INTEGRATOR_CM "integrator_core"
hw/arm/mainstone.c +0 -1
index cd1f904c6c..1bad1aea76 100644
@@ -14,7 +14,6 @@
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/arm/pxa.h"
 #include "hw/arm/boot.h"
 #include "net/net.h"
hw/arm/musicpal.c +1 -0
index 72e522a629..a3cfdc3077 100644
@@ -19,6 +19,7 @@
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
 #include "hw/char/serial.h"
+#include "hw/hw.h"
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
 #include "hw/block/flash.h"
hw/arm/omap2.c +0 -1
index 397630e2f2..af5e3d0ba7 100644
@@ -25,7 +25,6 @@
 #include "sysemu/qtest.h"
 #include "sysemu/reset.h"
 #include "hw/boards.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/arm/boot.h"
 #include "hw/arm/omap.h"
hw/arm/omap_sx1.c +0 -1
index cae78d0a36..75a05c36b0 100644
@@ -27,7 +27,6 @@
  */
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "ui/console.h"
 #include "hw/arm/omap.h"
 #include "hw/boards.h"
hw/arm/palm.c +0 -1
index a5eccb7290..bea47b917d 100644
@@ -19,7 +19,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "audio/audio.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/qtest.h"
hw/arm/pxa2xx_pic.c +0 -1
index c8bd497e99..203d4d28af 100644
@@ -11,7 +11,6 @@
 #include "qemu/osdep.h"
 #include "qemu/module.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/arm/pxa.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/arm/spitz.c +0 -1
index 003929b3e0..2eabb9c814 100644
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/arm/pxa.h"
 #include "hw/arm/boot.h"
 #include "sysemu/sysemu.h"
hw/arm/tosa.c +0 -1
index 80c61aef16..7f136bf187 100644
@@ -13,7 +13,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/arm/pxa.h"
 #include "hw/arm/boot.h"
 #include "hw/arm/sharpsl.h"
hw/arm/virt-acpi-build.c +0 -1
index 4f85eb575c..fa9afd2b7e 100644
@@ -36,7 +36,6 @@
 #include "hw/acpi/acpi.h"
 #include "hw/nvram/fw_cfg.h"
 #include "hw/acpi/bios-linker-loader.h"
-#include "hw/hw.h"
 #include "hw/acpi/aml-build.h"
 #include "hw/acpi/utils.h"
 #include "hw/acpi/pci.h"
hw/arm/z2.c +0 -1
index 810922d74e..1e3db425ef 100644
@@ -12,7 +12,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/arm/pxa.h"
 #include "hw/arm/boot.h"
 #include "hw/i2c/i2c.h"
hw/audio/ac97.c +0 -1
index 26ac84b388..9af584fb12 100644
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/audio/soundhw.h"
 #include "audio/audio.h"
 #include "hw/pci/pci.h"
hw/audio/adlib.c +0 -1
index 7dd9a89b89..62e59ccee6 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/audio/soundhw.h"
 #include "audio/audio.h"
 #include "hw/isa/isa.h"
hw/audio/cs4231a.c +0 -1
index f7a39c0af4..383200e1e2 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/audio/soundhw.h"
 #include "audio/audio.h"
 #include "hw/irq.h"
hw/audio/es1370.c +0 -1
index 0289f771c1..39deecbbc6 100644
@@ -27,7 +27,6 @@
 #define SILENT_ES1370
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/audio/soundhw.h"
 #include "audio/audio.h"
 #include "hw/pci/pci.h"
hw/audio/gus.c +0 -1
index 1a78cc47cd..787e04774a 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/audio/soundhw.h"
 #include "audio/audio.h"
 #include "hw/irq.h"
hw/audio/hda-codec.c +0 -1
index 4f6fbb8b13..4c33c477e1 100644
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "intel-hda.h"
 #include "migration/vmstate.h"
hw/audio/intel-hda.c +0 -1
index e6f150bb0d..5a1fcded55 100644
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/msi.h"
 #include "qemu/timer.h"
hw/audio/marvell_88w8618.c +0 -1
index 6345bc1d5c..158a456a41 100644
@@ -13,7 +13,6 @@
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/audio/wm8750.h"
 #include "audio/audio.h"
hw/audio/milkymist-ac97.c +0 -1
index 890a5fe89e..481dde10a1 100644
@@ -22,7 +22,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/audio/pcspk.c +0 -1
index 9039c9786d..016946d4b2 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "hw/audio/soundhw.h"
 #include "audio/audio.h"
hw/audio/sb16.c +0 -1
index 599194779d..818659546f 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/audio/soundhw.h"
 #include "audio/audio.h"
 #include "hw/irq.h"
hw/block/dataplane/xen-block.c +0 -1
index 0f200c5fb0..71c63330ac 100644
@@ -21,7 +21,6 @@
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/xen/xen_common.h"
 #include "hw/block/xen_blkif.h"
 #include "sysemu/block-backend.h"
hw/block/ecc.c +0 -1
index f846ab3e01..1a182367ee 100644
@@ -12,7 +12,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "migration/vmstate.h"
 #include "hw/block/flash.h"
 
hw/block/fdc.c +0 -1
index 88feb0f451..7542c8f273 100644
@@ -28,7 +28,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/block/fdc.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
hw/block/m25p80.c +0 -1
index 9d395169b2..c213e2ed7b 100644
@@ -23,7 +23,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "sysemu/block-backend.h"
 #include "hw/ssi/ssi.h"
 #include "migration/vmstate.h"
hw/block/nvme.c +0 -1
index 079a8ffe80..e08853fe5e 100644
@@ -28,7 +28,6 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "hw/block/block.h"
-#include "hw/hw.h"
 #include "hw/pci/msix.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
hw/block/pflash_cfi01.c +0 -1
index 2d6f260491..7bfe9de2a3 100644
@@ -37,7 +37,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/block/block.h"
 #include "hw/block/flash.h"
 #include "sysemu/block-backend.h"
hw/block/pflash_cfi02.c +0 -1
index b7070cd8ec..18ea50f4ba 100644
@@ -33,7 +33,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/block/block.h"
 #include "hw/block/flash.h"
 #include "qapi/error.h"
hw/block/tc58128.c +0 -1
index d0fae248dc..9888f01ac6 100644
@@ -1,6 +1,5 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "hw/sh4/sh.h"
 #include "hw/loader.h"
 #include "sysemu/qtest.h"
hw/block/xen-block.c +0 -1
index 69d73196e2..848a0ad0ea 100644
@@ -17,7 +17,6 @@
 #include "qapi/visitor.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qstring.h"
-#include "hw/hw.h"
 #include "hw/xen/xen_common.h"
 #include "hw/block/xen_blkif.h"
 #include "hw/xen/xen-block.h"
hw/char/debugcon.c +0 -1
index e1b6d1190f..b38d82891f 100644
@@ -27,7 +27,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "chardev/char-fe.h"
 #include "hw/isa/isa.h"
 
hw/char/digic-uart.c +0 -1
index 79ea92249c..cc501678ce 100644
@@ -27,7 +27,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
 #include "chardev/char-fe.h"
hw/char/escc.c +0 -1
index 404002b899..35c6952bbd 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/char/lm32_juart.c +0 -1
index f4488fa736..69dd7ac72b 100644
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
 #include "qemu/module.h"
hw/char/lm32_uart.c +0 -1
index 4b3215fe96..00832fba86 100644
@@ -23,7 +23,6 @@
 
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/char/mcf_uart.c +0 -1
index c403a1fdc6..1712b2296e 100644
@@ -7,7 +7,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "qemu/module.h"
hw/char/milkymist-uart.c +0 -1
index 53c1ca789d..e90f84d53e 100644
@@ -22,7 +22,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/char/omap_uart.c +0 -1
index b3bb1cfcec..13e4f43c4c 100644
@@ -19,7 +19,6 @@
  */
 #include "qemu/osdep.h"
 #include "chardev/char.h"
-#include "hw/hw.h"
 #include "hw/arm/omap.h"
 #include "hw/char/serial.h"
 #include "exec/address-spaces.h"
hw/char/parallel.c +0 -1
index 1798fd0c44..3980eb5909 100644
@@ -26,7 +26,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "chardev/char-parallel.h"
 #include "chardev/char-fe.h"
 #include "hw/irq.h"
hw/char/sh_serial.c +0 -1
index 7a40aa90af..07dc16be13 100644
@@ -26,7 +26,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sh4/sh.h"
 #include "chardev/char-fe.h"
hw/char/xen_console.c +0 -1
index 47e1092263..8cc9328b3f 100644
@@ -24,7 +24,6 @@
 #include <termios.h>
 
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "chardev/char-fe.h"
 #include "hw/xen/xen-legacy-backend.h"
 
hw/char/xilinx_uartlite.c +1 -0
index 250eed945c..fa7451fd67 100644
@@ -23,6 +23,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "qemu/module.h"
hw/core/empty_slot.c +0 -1
index c694532046..3ba450e1ca 100644
@@ -10,7 +10,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "qemu/module.h"
 #include "hw/empty_slot.h"
hw/core/null-machine.c +0 -1
index 04a1e2b02a..30b1991b52 100644
@@ -13,7 +13,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "sysemu/sysemu.h"
 #include "exec/address-spaces.h"
hw/core/ptimer.c +0 -1
index 49b60282cf..d58e2dfdb0 100644
@@ -7,7 +7,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
 #include "migration/vmstate.h"
hw/cris/boot.c +0 -1
index d44fdec43f..2d2cc0c7a5 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/loader.h"
 #include "elf.h"
 #include "boot.h"
hw/display/ati.c +0 -1
index a747c4cc98..df978a420d 100644
@@ -24,7 +24,6 @@
 #include "qemu/module.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "ui/console.h"
 #include "hw/display/i2c-ddc.h"
 #include "trace.h"
hw/display/bcm2835_fb.c +1 -0
index 3d99d99e2b..e606893f28 100644
@@ -26,6 +26,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/display/bcm2835_fb.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 #include "framebuffer.h"
 #include "ui/pixel_ops.h"
hw/display/bochs-display.c +0 -1
index ce40aea354..0a535de40c 100644
@@ -8,7 +8,6 @@
 #include "qemu/osdep.h"
 #include "qemu/module.h"
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "hw/display/bochs-vbe.h"
hw/display/cirrus_vga.c +0 -1
index 3120b3cfaf..0f5465bc14 100644
@@ -38,7 +38,6 @@
 #include "sysemu/reset.h"
 #include "qapi/error.h"
 #include "trace.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "ui/pixel_ops.h"
hw/display/cirrus_vga_isa.c +0 -1
index 69cdb9e066..49f409b638 100644
@@ -26,7 +26,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/loader.h"
 #include "hw/isa/isa.h"
 #include "cirrus_vga_internal.h"
hw/display/exynos4210_fimd.c +1 -0
index 8e1508a3e6..c1071ecd46 100644
@@ -23,6 +23,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/display/framebuffer.c +0 -1
index 36e3db189a..4485aa335b 100644
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "ui/console.h"
 #include "framebuffer.h"
 
hw/display/milkymist-tmu2.c +0 -1
index 7bfffa52da..199f1227e7 100644
@@ -25,7 +25,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/display/omap_lcdc.c +0 -1
index b00ce04b3b..6ad13f2e9e 100644
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "ui/console.h"
 #include "hw/arm/omap.h"
hw/display/qxl.h +0 -1
index 4adfdb1e5d..80eb0d2672 100644
@@ -2,7 +2,6 @@
 #define HW_QXL_H
 
 
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "vga_int.h"
 #include "qemu/thread.h"
hw/display/sm501.c +0 -1
index 6f88aaaa08..603396358d 100644
@@ -29,7 +29,6 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/char/serial.h"
 #include "ui/console.h"
 #include "hw/sysbus.h"
hw/display/tc6393xb.c +0 -1
index 74a77eb43b..49a676d1b0 100644
@@ -14,7 +14,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/host-utils.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/display/tc6393xb.h"
 #include "exec/memory.h"
hw/display/vga-isa-mm.c +0 -1
index 1c4f43b52b..e9c43e5530 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "qemu/bitops.h"
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "migration/vmstate.h"
 #include "hw/display/vga.h"
 #include "vga_int.h"
hw/display/vga-isa.c +0 -1
index 945952a9b0..189a4afc15 100644
@@ -25,7 +25,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "vga_int.h"
 #include "ui/pixel_ops.h"
hw/display/vga-pci.c +0 -1
index cb956b4545..86299f5e97 100644
@@ -25,7 +25,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "vga_int.h"
hw/display/vga.c +0 -1
index f8098f63e9..573d223d46 100644
@@ -26,7 +26,6 @@
 #include "qemu/units.h"
 #include "sysemu/reset.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/display/vga.h"
 #include "hw/pci/pci.h"
 #include "vga_int.h"
hw/display/virtio-vga.c +0 -1
index 79a145e284..e5227fac28 100644
@@ -1,5 +1,4 @@
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/virtio/virtio-gpu.h"
 #include "qapi/error.h"
hw/display/vmware_vga.c +0 -1
index ebfcc46a2d..f0b136eb16 100644
@@ -26,7 +26,6 @@
 #include "qemu/module.h"
 #include "qemu/units.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/loader.h"
 #include "trace.h"
 #include "ui/vnc.h"
hw/display/xenfb.c +0 -1
index 3c79913b31..838260b6ad 100644
@@ -27,7 +27,6 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 
-#include "hw/hw.h"
 #include "ui/input.h"
 #include "ui/console.h"
 #include "hw/xen/xen-legacy-backend.h"
hw/dma/i8257.c +0 -1
index b7404cff60..c626bd958a 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "migration/vmstate.h"
 #include "hw/dma/i8257.h"
hw/dma/pl080.c +1 -0
index 59bc929363..3713d5dadd 100644
@@ -14,6 +14,7 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "hw/dma/pl080.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 #include "qapi/error.h"
 
hw/dma/puv3_dma.c +0 -1
index 122f87aff1..5488d388a9 100644
@@ -10,7 +10,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 
 #undef DEBUG_PUV3
hw/dma/rc4030.c +0 -1
index d35fb59eee..d54e296d3a 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/mips/mips.h"
 #include "hw/sysbus.h"
hw/dma/sparc32_dma.c +0 -1
index 8955fe262e..16d53b92dd 100644
@@ -26,7 +26,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sparc/sparc32_dma.h"
 #include "hw/sparc/sun4m_iommu.h"
hw/dma/xilinx_axidma.c +1 -0
index 83b52e4ac7..2c2d567a95 100644
@@ -26,6 +26,7 @@
 #include "hw/sysbus.h"
 #include "qapi/error.h"
 #include "qemu/timer.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ptimer.h"
 #include "qemu/log.h"
hw/gpio/max7310.c +1 -0
index 432f0b00fe..87b0f24747 100644
@@ -8,6 +8,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "hw/hw.h"
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
 #include "migration/vmstate.h"
hw/gpio/omap_gpio.c +0 -1
index 6ab51a9428..46a721779c 100644
@@ -19,7 +19,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/arm/omap.h"
 #include "hw/sysbus.h"
hw/gpio/puv3_gpio.c +0 -1
index 54d30cada2..d19e342514 100644
@@ -10,7 +10,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 
 #undef DEBUG_PUV3
hw/gpio/zaurus.c +0 -1
index a1ba09c6f2..9a12c68342 100644
@@ -17,7 +17,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/arm/sharpsl.h"
 #include "hw/sysbus.h"
hw/hppa/dino.c +0 -1
index dfb9d7a742..bb9d0e033c 100644
@@ -15,7 +15,6 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "sysemu/sysemu.h"
 #include "hw/pci/pci.h"
hw/hppa/machine.c +0 -1
index bc74438496..2736ce835e 100644
@@ -6,7 +6,6 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "elf.h"
 #include "hw/loader.h"
 #include "hw/boards.h"
hw/i2c/bitbang_i2c.c +0 -1
index 2289128aaf..b000952b98 100644
@@ -11,7 +11,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/i2c/bitbang_i2c.h"
 #include "hw/sysbus.h"
hw/i2c/omap_i2c.c +0 -1
index 309a37b1fa..34f34e3b05 100644
@@ -20,7 +20,6 @@
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
 #include "hw/arm/omap.h"
hw/i2c/pm_smbus.c +0 -1
index d9e3bad90d..36994ff585 100644
@@ -19,7 +19,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "hw/i2c/pm_smbus.h"
 #include "hw/i2c/smbus_master.h"
hw/i2c/ppc4xx_i2c.c +0 -1
index d110b417c6..3f015a1581 100644
@@ -28,7 +28,6 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/i2c/ppc4xx_i2c.h"
 #include "hw/irq.h"
 
hw/i2c/smbus_eeprom.c +0 -1
index e05bc8c39c..8642f0036d 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "hw/i2c/i2c.h"
 #include "hw/i2c/smbus_slave.h"
hw/i2c/smbus_ich9.c +0 -1
index f7e626e95a..564198dae9 100644
@@ -21,7 +21,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/i2c/pm_smbus.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
hw/i2c/smbus_master.c +0 -1
index 0a6223744c..dc43b8637d 100644
@@ -12,7 +12,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/i2c/i2c.h"
 #include "hw/i2c/smbus_master.h"
 
hw/i2c/smbus_slave.c +0 -1
index 7b145a384d..5d10e27664 100644
@@ -14,7 +14,6 @@
 /* TODO: Implement PEC.  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/i2c/i2c.h"
 #include "hw/i2c/smbus_slave.h"
 #include "migration/vmstate.h"
hw/i386/amd_iommu.h +0 -1
index 3a694b186b..e05a4eff5d 100644
@@ -21,7 +21,6 @@
 #ifndef AMD_IOMMU_H
 #define AMD_IOMMU_H
 
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/i386/x86-iommu.h"
 
hw/i386/multiboot.c +0 -1
index a3e33fbe5e..9a59f95497 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "qemu/option.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/nvram/fw_cfg.h"
 #include "multiboot.h"
 #include "hw/loader.h"
hw/i386/pc.c +0 -1
index 1e8251d327..14fe8233ae 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/char/serial.h"
 #include "hw/char/parallel.h"
hw/i386/pc_piix.c +0 -1
index 129f47493b..2fbb581c46 100644
@@ -26,7 +26,6 @@
 #include "config-devices.h"
 
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "hw/loader.h"
 #include "hw/i386/pc.h"
 #include "hw/i386/apic.h"
hw/i386/pc_q35.c +0 -1
index 397e1fdd2f..060b47f845 100644
@@ -30,7 +30,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "hw/loader.h"
 #include "sysemu/arch_init.h"
 #include "hw/i2c/smbus_eeprom.h"
hw/i386/pc_sysfw.c +0 -1
index de43943af8..defea37fe4 100644
@@ -31,7 +31,6 @@
 #include "qemu/option.h"
 #include "qemu/units.h"
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
hw/i386/vmmouse.c +0 -1
index a50f5d5dd4..4f81504577 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "ui/console.h"
 #include "hw/i386/pc.h"
 #include "hw/input/i8042.h"
hw/i386/vmport.c +0 -1
index 3bf8cfe041..26fcbe3827 100644
@@ -22,7 +22,6 @@
  * THE SOFTWARE.
  */
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "hw/i386/pc.h"
 #include "hw/input/i8042.h"
hw/i386/xen/xen-hvm.c +1 -0
index f769cd91f2..63abace70a 100644
@@ -15,6 +15,7 @@
 #include "hw/pci/pci_host.h"
 #include "hw/i386/pc.h"
 #include "hw/irq.h"
+#include "hw/hw.h"
 #include "hw/i386/apic-msidef.h"
 #include "hw/xen/xen_common.h"
 #include "hw/xen/xen-legacy-backend.h"
hw/i386/xen/xen_platform.c +0 -1
index 800687a188..0f7b05e5e1 100644
@@ -25,7 +25,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/ide.h"
 #include "hw/pci/pci.h"
 #include "hw/irq.h"
hw/i386/xen/xen_pvdevice.c +0 -1
index 700db81cbc..10c89cda41 100644
@@ -32,7 +32,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "trace.h"
hw/ide/ahci-allwinner.c +0 -1
index 8777122c9c..bb8393d2b6 100644
@@ -16,7 +16,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "sysemu/dma.h"
hw/ide/ahci.c +0 -1
index e0b1a91fd9..1d5a54b29e 100644
@@ -22,7 +22,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
hw/ide/cmd646.c +0 -1
index a3763a1d3a..c2ee427f56 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "qemu/module.h"
hw/ide/core.c +0 -1
index 0453a925f9..005b4d5ef4 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "migration/vmstate.h"
 #include "qemu/error-report.h"
hw/ide/ich.c +0 -1
index 00fb43a127..eff3188fff 100644
@@ -61,7 +61,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
hw/ide/ioport.c +0 -1
index a0b3c1f6a1..e6085612d4 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "qemu/error-report.h"
 #include "qemu/timer.h"
hw/ide/isa.c +0 -1
index fda912f3ed..939b473dad 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "migration/vmstate.h"
 #include "qemu/module.h"
hw/ide/macio.c +0 -1
index aa447cd2b5..44f2ff92bb 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/ppc/mac.h"
 #include "hw/ppc/mac_dbdma.h"
 #include "migration/vmstate.h"
hw/ide/microdrive.c +0 -1
index be3cf8779a..b0272ea14b 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pcmcia.h"
 #include "migration/vmstate.h"
 #include "qemu/module.h"
hw/ide/mmio.c +0 -1
index f3de6db33e..d2a377f326 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
 #include "qemu/module.h"
hw/ide/pci.c +0 -1
index c5b081a028..cce1da804d 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "sysemu/dma.h"
hw/ide/piix.c +0 -1
index 407d3e3ce8..bcfd119a8e 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "qemu/module.h"
hw/ide/qdev.c +0 -1
index eea22c09f4..d85c31a0ee 100644
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "sysemu/dma.h"
 #include "qapi/error.h"
 #include "qapi/qapi-types-block.h"
hw/ide/via.c +0 -1
index 8fa1972d92..45f929395f 100644
@@ -25,7 +25,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "qemu/module.h"
hw/input/hid.c +0 -1
index c570ca25b1..89239b5634 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "ui/console.h"
 #include "qemu/timer.h"
 #include "hw/input/hid.h"
hw/input/lm832x.c +0 -1
index de03913d7c..a37eb854b9 100644
@@ -19,7 +19,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
 #include "migration/vmstate.h"
hw/input/milkymist-softusb.c +0 -1
index e17666d56b..8f6fdf2d97 100644
@@ -23,7 +23,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
 #include "trace.h"
hw/input/pckbd.c +0 -1
index cf1690332d..f2e32a1ed5 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "migration/vmstate.h"
 #include "hw/i386/pc.h"
hw/input/ps2.c +0 -1
index 07d07ee6bd..68b30229f4 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
-#include "hw/hw.h"
 #include "hw/input/ps2.h"
 #include "migration/vmstate.h"
 #include "ui/console.h"
hw/input/stellaris_input.c +0 -1
index 7582117f0b..59892b07fc 100644
@@ -8,7 +8,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/input/gamepad.h"
 #include "hw/irq.h"
 #include "migration/vmstate.h"
hw/input/tsc2005.c +0 -1
index b92a034496..55d61cc843 100644
@@ -20,7 +20,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
-#include "hw/hw.h"
 #include "qemu/timer.h"
 #include "sysemu/reset.h"
 #include "ui/console.h"
hw/intc/etraxfs_pic.c +0 -1
index dc72dd5412..88d3b0c36f 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 //#include "pc.h"
 //#include "etraxfs.h"
hw/intc/exynos4210_combiner.c +1 -0
index 3b49ce4d27..833e164350 100644
@@ -33,6 +33,7 @@
 #include "qemu/module.h"
 
 #include "hw/arm/exynos4210.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 
 //#define DEBUG_COMBINER
hw/intc/heathrow_pic.c +0 -1
index 572e9115aa..cb97c315da 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/ppc/mac.h"
 #include "migration/vmstate.h"
 #include "qemu/module.h"
hw/intc/i8259.c +0 -1
index e581e6b0ab..211a98962e 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
hw/intc/ioapic.c +0 -1
index e99c37cceb..c346f50df9 100644
@@ -23,7 +23,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "monitor/monitor.h"
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/i386/apic.h"
 #include "hw/i386/ioapic.h"
hw/intc/lm32_pic.c +0 -1
index 4df4eef7df..36de670c9e 100644
@@ -19,7 +19,6 @@
 
 #include "qemu/osdep.h"
 
-#include "hw/hw.h"
 #include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "qemu/module.h"
hw/intc/mips_gic.c +0 -1
index 166eb6ecce..6b4322bc5c 100644
@@ -13,7 +13,6 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "exec/memory.h"
 #include "sysemu/sysemu.h"
hw/intc/omap_intc.c +0 -1
index 4b3ddc0a67..f740578e7e 100644
@@ -19,7 +19,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/arm/omap.h"
 #include "hw/sysbus.h"
hw/intc/ompic.c +0 -1
index 77591f827d..8a4a422142 100644
@@ -10,7 +10,6 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/intc/openpic.c +0 -1
index bb869ca221..312ac54c7c 100644
@@ -35,7 +35,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ppc/mac.h"
 #include "hw/pci/pci.h"
hw/intc/openpic_kvm.c +0 -1
index 49fc6fa0cf..e91910b331 100644
@@ -27,7 +27,6 @@
 #include "cpu.h"
 #include <sys/ioctl.h>
 #include "exec/address-spaces.h"
-#include "hw/hw.h"
 #include "hw/ppc/openpic.h"
 #include "hw/ppc/openpic_kvm.h"
 #include "hw/pci/msi.h"
hw/intc/sh_intc.c +0 -1
index 62521500f9..72a55e32dd 100644
@@ -11,7 +11,6 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "hw/sh4/sh_intc.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sh4/sh.h"
 
hw/intc/xics.c +0 -1
index 41da9b3091..88709d4b90 100644
@@ -28,7 +28,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "trace.h"
 #include "qemu/timer.h"
 #include "hw/ppc/xics.h"
hw/intc/xics_kvm.c +0 -1
index 65c35f90f9..a4d2e876cc 100644
@@ -29,7 +29,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "trace.h"
 #include "sysemu/kvm.h"
 #include "hw/ppc/spapr.h"
hw/intc/xics_spapr.c +0 -1
index 7cd3c93d71..6577be0d92 100644
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "trace.h"
 #include "qemu/timer.h"
 #include "hw/ppc/spapr.h"
hw/intc/xilinx_intc.c +0 -1
index baf5353cd1..3a5c7f82f4 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 
 #define D(x)
hw/ipmi/ipmi.c +0 -1
index a837f91782..2090c6f73a 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/ipmi/ipmi.h"
 #include "sysemu/sysemu.h"
 #include "qom/object_interfaces.h"
hw/ipmi/isa_ipmi_bt.c +0 -1
index 588dfbac34..33c800acb5 100644
@@ -26,7 +26,6 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/ipmi/ipmi.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
hw/ipmi/isa_ipmi_kcs.c +0 -1
index e63753f03e..9a1de662ba 100644
@@ -26,7 +26,6 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/ipmi/ipmi.h"
 #include "hw/irq.h"
 #include "hw/isa/isa.h"
hw/isa/apm.c +0 -1
index f22b2d78a4..6300b1ba7a 100644
@@ -22,7 +22,6 @@
 
 #include "qemu/osdep.h"
 #include "hw/isa/apm.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 
hw/isa/lpc_ich9.c +0 -1
index 79d44c1b41..a037c21104 100644
@@ -30,7 +30,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "qapi/visitor.h"
 #include "qemu/range.h"
 #include "hw/isa/isa.h"
hw/isa/piix4.c +0 -1
index 8abd5daaae..3294056cd5 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/pci/pci.h"
 #include "hw/isa/isa.h"
hw/isa/vt82c686.c +0 -1
index d98b94ab05..7379d90cf4 100644
@@ -11,7 +11,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/isa/vt82c686.h"
 #include "hw/i2c/i2c.h"
 #include "hw/pci/pci.h"
hw/lm32/lm32_boards.c +0 -1
index d710980045..5ae308bfcf 100644
@@ -22,7 +22,6 @@
 #include "qemu/error-report.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/block/flash.h"
 #include "hw/boards.h"
hw/lm32/milkymist.c +0 -1
index 864712d977..5ec3ae0300 100644
@@ -23,7 +23,6 @@
 #include "qemu-common.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
hw/m68k/an5206.c +0 -1
index 68d15a6ebe..54ccbe1a82 100644
@@ -9,7 +9,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/m68k/mcf.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
hw/microblaze/boot.h +0 -1
index dd1090d8b5..5a8c2f7975 100644
@@ -1,7 +1,6 @@
 #ifndef MICROBLAZE_BOOT_H
 #define MICROBLAZE_BOOT_H
 
-#include "hw/hw.h"
 
 void microblaze_load_kernel(MicroBlazeCPU *cpu, hwaddr ddr_base,
                             uint32_t ramsize,
hw/microblaze/petalogix_ml605_mmu.c +0 -1
index a88bf16cc8..03f6c1cc7c 100644
@@ -30,7 +30,6 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "net/net.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
hw/microblaze/petalogix_s3adsp1800_mmu.c +0 -1
index 8d83474262..849bafc186 100644
@@ -28,7 +28,6 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "net/net.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
hw/mips/addr.c +0 -1
index 4da46e1731..2f138fe1ea 100644
@@ -21,7 +21,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/mips/cpudevs.h"
 
 static int mips_um_ksegs;
hw/mips/boston.c +0 -1
index 9eeccbea9a..ce86b75664 100644
@@ -23,7 +23,6 @@
 #include "exec/address-spaces.h"
 #include "hw/boards.h"
 #include "hw/char/serial.h"
-#include "hw/hw.h"
 #include "hw/ide/pci.h"
 #include "hw/ide/ahci.h"
 #include "hw/loader.h"
hw/mips/gt64xxx_pci.c +0 -1
index b4412c6c24..f325bd6c1c 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "qemu/log.h"
-#include "hw/hw.h"
 #include "hw/mips/mips.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_host.h"
hw/mips/mips_fulong2e.c +0 -1
index 0a1bf5ef5c..6e4fba285b 100644
@@ -23,7 +23,6 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/dma/i8257.h"
 #include "hw/isa/superio.h"
hw/mips/mips_int.c +0 -1
index ae4244c32e..74cf587d5b 100644
@@ -22,7 +22,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/main-loop.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/mips/cpudevs.h"
 #include "cpu.h"
hw/mips/mips_jazz.c +0 -1
index 6ea25cd5f4..388c15c376 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "hw/hw.h"
 #include "hw/mips/mips.h"
 #include "hw/mips/cpudevs.h"
 #include "hw/i386/pc.h"
hw/mips/mips_malta.c +0 -1
index 02200ab7d4..bdba712329 100644
@@ -26,7 +26,6 @@
 #include "qemu/units.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/isa/superio.h"
 #include "hw/dma/i8257.h"
hw/mips/mips_mipssim.c +0 -1
index 280e76a482..1ca7e909d1 100644
@@ -29,7 +29,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/mips/mips.h"
 #include "hw/mips/cpudevs.h"
 #include "hw/char/serial.h"
hw/mips/mips_r4k.c +0 -1
index 191047826d..a41b0b0524 100644
@@ -13,7 +13,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/mips/mips.h"
 #include "hw/mips/cpudevs.h"
 #include "hw/i386/pc.h"
hw/misc/applesmc.c +0 -1
index 2d7eb3c7e2..d9d369777c 100644
@@ -31,7 +31,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "ui/console.h"
 #include "qemu/module.h"
hw/misc/arm_integrator_debug.c +0 -1
index 2646107b97..3e23201ae6 100644
@@ -15,7 +15,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/misc/arm_integrator_debug.h"
 #include "qemu/log.h"
hw/misc/arm_sysctl.c +0 -1
index 47051436f4..2a4e0458c7 100644
@@ -8,7 +8,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "qemu/timer.h"
 #include "qemu/bitops.h"
hw/misc/debugexit.c +0 -1
index 8e4a2fc701..752cb53cf6 100644
@@ -8,7 +8,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "qemu/module.h"
 
hw/misc/edu.c +1 -0
index 3b6dba2c72..d5e2bdbb57 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "hw/pci/pci.h"
+#include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "qemu/timer.h"
 #include "qemu/main-loop.h" /* iothread mutex */
hw/misc/ivshmem.c +0 -1
index d9b7ea145c..7a2334c98b 100644
@@ -21,7 +21,6 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 #include "qemu/cutils.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
hw/misc/macio/cuda.c +0 -1
index feb80df0ff..5e8ee80c25 100644
@@ -25,7 +25,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "hw/hw.h"
 #include "hw/ppc/mac.h"
 #include "migration/vmstate.h"
 #include "hw/input/adb.h"
hw/misc/macio/gpio.c +0 -1
index 6f90afefb7..e62b622112 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/ppc/mac.h"
 #include "migration/vmstate.h"
 #include "hw/misc/macio/macio.h"
hw/misc/macio/mac_dbdma.c +0 -1
index beaf083578..e220f1a927 100644
@@ -38,7 +38,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ppc/mac_dbdma.h"
 #include "migration/vmstate.h"
hw/misc/macio/macio.c +0 -1
index c797bbd698..222f163139 100644
@@ -26,7 +26,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/ppc/mac.h"
 #include "hw/misc/macio/cuda.h"
 #include "hw/pci/pci.h"
hw/misc/macio/pmu.c +0 -1
index 507f62ba64..d824a068d9 100644
@@ -30,7 +30,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "hw/hw.h"
 #include "hw/ppc/mac.h"
 #include "migration/vmstate.h"
 #include "hw/input/adb.h"
hw/misc/milkymist-hpdmc.c +0 -1
index e9722d6c76..61e86e6b34 100644
@@ -22,7 +22,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
 #include "trace.h"
hw/misc/milkymist-pfpu.c +0 -1
index 8c6baf5406..516825e83d 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/misc/mips_cmgcr.c +0 -1
index 6dcdb4a225..6bddb2312a 100644
@@ -12,7 +12,6 @@
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
hw/misc/mos6522.c +0 -1
index 7e6dead089..f06cf0b52a 100644
@@ -25,7 +25,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/input/adb.h"
 #include "hw/irq.h"
 #include "hw/misc/mos6522.h"
hw/misc/mst_fpga.c +0 -1
index d002870e56..81abdf8ede 100644
@@ -12,7 +12,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/misc/omap_gpmc.c +0 -1
index 6253b0b2d4..10de7a5523 100644
@@ -20,7 +20,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/block/flash.h"
 #include "hw/arm/omap.h"
hw/misc/omap_l4.c +0 -1
index c217728c78..61b6df564a 100644
@@ -18,7 +18,6 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/arm/omap.h"
 
 struct omap_l4_s {
hw/misc/omap_sdrc.c +0 -1
index 7b38c5568c..f2f72f6810 100644
@@ -18,7 +18,6 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/arm/omap.h"
 
 /* SDRAM Controller Subsystem */
hw/misc/pc-testdev.c +0 -1
index 46adb6b5fc..94cf55440e 100644
@@ -36,7 +36,6 @@
 */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/qdev.h"
 #include "qemu/module.h"
 #include "hw/irq.h"
hw/misc/pca9552.c +0 -1
index bb05811e1f..73be28d936 100644
@@ -12,7 +12,6 @@
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/misc/pca9552.h"
 #include "hw/misc/pca9552_regs.h"
 #include "migration/vmstate.h"
hw/misc/pci-testdev.c +0 -1
index d4d89df4cf..0eb9ed5469 100644
@@ -19,7 +19,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "qemu/event_notifier.h"
 #include "qemu/module.h"
hw/misc/puv3_pm.c +0 -1
index b538b4afbb..c213500d9c 100644
@@ -10,7 +10,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 
 #undef DEBUG_PUV3
hw/misc/tmp105.c +0 -1
index 28996473cb..75ddad3a12 100644
@@ -19,7 +19,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
 #include "migration/vmstate.h"
hw/misc/tmp421.c +0 -1
index 6728aa7e10..9f044705fa 100644
@@ -25,7 +25,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/i2c/i2c.h"
 #include "migration/vmstate.h"
 #include "qapi/error.h"
hw/misc/unimp.c +0 -1
index 7f8e42cc2c..0e1cb24629 100644
@@ -12,7 +12,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/misc/unimp.h"
 #include "qemu/log.h"
hw/misc/zynq-xadc.c +0 -1
index edfe76ba20..7745df4c85 100644
@@ -14,7 +14,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/misc/zynq-xadc.h"
 #include "migration/vmstate.h"
hw/misc/zynq_slcr.c +0 -1
index 82430a146a..d4fdd2c26d 100644
@@ -15,7 +15,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "qemu/timer.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/moxie/moxiesim.c +0 -1
index 16a7d58274..57af1b4891 100644
@@ -30,7 +30,6 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "net/net.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
hw/net/can/can_kvaser_pci.c +0 -1
index 10963ef58c..401da73cc8 100644
@@ -36,7 +36,6 @@
 #include "qemu/sockets.h"
 #include "qapi/error.h"
 #include "chardev/char.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
hw/net/can/can_mioe3680_pci.c +0 -1
index 9e060dff01..0f0ca912c9 100644
@@ -32,7 +32,6 @@
 #include "qemu/sockets.h"
 #include "qapi/error.h"
 #include "chardev/char.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
hw/net/can/can_pcm3680_pci.c +0 -1
index 5d12f0c552..632eb0b59b 100644
@@ -32,7 +32,6 @@
 #include "qemu/sockets.h"
 #include "qapi/error.h"
 #include "chardev/char.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
hw/net/can/can_sja1000.c +0 -1
index 6c84be6d29..1f81341554 100644
@@ -28,7 +28,6 @@
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "chardev/char.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "migration/vmstate.h"
 #include "net/can_emu.h"
hw/net/e1000.c +0 -1
index e4e91382f0..da5f3646fd 100644
@@ -26,7 +26,6 @@
 
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "net/net.h"
hw/net/e1000e.c +1 -0
index 22e3132581..270ff93841 100644
@@ -40,6 +40,7 @@
 #include "qemu/module.h"
 #include "qemu/range.h"
 #include "sysemu/sysemu.h"
+#include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
 #include "migration/vmstate.h"
hw/net/e1000e_core.c +1 -0
index 2a221c2ef9..40e41fdd92 100644
@@ -37,6 +37,7 @@
 #include "sysemu/sysemu.h"
 #include "net/net.h"
 #include "net/tap.h"
+#include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
 
hw/net/e1000x_common.c +0 -1
index 09047806f2..717f9df1c9 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "net/net.h"
 
hw/net/eepro100.c +0 -1
index 3c1c534cbf..2ad1b328e4 100644
@@ -42,7 +42,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "net/net.h"
hw/net/lan9118.c +1 -0
index 937d5603e2..1d32cb79e2 100644
@@ -15,6 +15,7 @@
 #include "migration/vmstate.h"
 #include "net/net.h"
 #include "net/eth.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/net/lan9118.h"
 #include "sysemu/sysemu.h"
hw/net/milkymist-minimac2.c +0 -1
index a7d879f0ab..1e3fb9c220 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "cpu.h" /* FIXME: why does this use TARGET_PAGE_ALIGN? */
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/net/mipsnet.c +0 -1
index 3910beb9a6..013f762d72 100644
@@ -1,5 +1,4 @@
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "net/net.h"
 #include "qemu/module.h"
hw/net/ne2000.h +0 -1
index 2cd193e4c6..fc75843703 100644
@@ -2,7 +2,6 @@
 #define HW_NE2000_H
 
 #include "qemu/units.h"
-#include "hw/hw.h"
 #include "net/net.h"
 
 #define NE2000_PMEM_SIZE    (32 * KiB)
hw/net/opencores_eth.c +0 -1
index 3e759d79d8..a9e96cdd3a 100644
@@ -32,7 +32,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/net/mii.h"
 #include "hw/sysbus.h"
hw/net/rocker/rocker.c +0 -1
index 4ce8f62a2a..789e5c4876 100644
@@ -16,7 +16,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "hw/pci/msix.h"
hw/net/rocker/rocker_desc.c +0 -1
index b009da4f89..01845f1157 100644
@@ -16,7 +16,6 @@
 
 #include "qemu/osdep.h"
 #include "net/net.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 
 #include "rocker.h"
hw/net/rtl8139.c +0 -1
index 9975af44dd..89156ed802 100644
@@ -53,7 +53,6 @@
 #include "qemu/osdep.h"
 #include <zlib.h>
 
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "sysemu/dma.h"
hw/net/spapr_llan.c +0 -1
index 0ce5e37a28..60085b1bf4 100644
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
hw/net/sunhme.c +0 -1
index 9d8fd70f51..359bd4f9f5 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 #include "hw/net/mii.h"
hw/net/xen_nic.c +0 -1
index ffb3b5898d..00a7fdf843 100644
@@ -24,7 +24,6 @@
 #include <sys/ioctl.h>
 #include <sys/wait.h>
 
-#include "hw/hw.h"
 #include "net/net.h"
 #include "net/checksum.h"
 #include "net/util.h"
hw/net/xilinx_axienet.c +1 -0
index b1247a1d9b..b22e344a4b 100644
@@ -30,6 +30,7 @@
 #include "net/net.h"
 #include "net/checksum.h"
 
+#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/stream.h"
 
hw/net/xilinx_ethlite.c +0 -1
index 27a4fc8d87..a963087f16 100644
@@ -26,7 +26,6 @@
 #include "qemu/module.h"
 #include "cpu.h" /* FIXME should not use tswap* */
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "net/net.h"
 
hw/nios2/10m50_devboard.c +0 -1
index 2c3388f5cf..3c01e4f667 100644
@@ -27,7 +27,6 @@
 #include "cpu.h"
 
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "hw/char/serial.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
hw/nios2/boot.h +0 -1
index 3116753818..59b9fbfc62 100644
@@ -1,7 +1,6 @@
 #ifndef NIOS2_BOOT_H
 #define NIOS2_BOOT_H
 
-#include "hw/hw.h"
 #include "cpu.h"
 
 void nios2_load_kernel(Nios2CPU *cpu, hwaddr ddr_base, uint32_t ramsize,
hw/nios2/generic_nommu.c +0 -1
index 1788ffa7a4..2ec91e899b 100644
@@ -32,7 +32,6 @@
 #include "cpu.h"
 
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "hw/char/serial.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
hw/nvram/chrp_nvram.c +0 -1
index 3837510dd2..d969f26704 100644
@@ -21,7 +21,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
-#include "hw/hw.h"
 #include "hw/nvram/chrp_nvram.h"
 #include "sysemu/sysemu.h"
 
hw/nvram/eeprom93xx.c +0 -1
index c2b012d583..5b01b9b03f 100644
@@ -36,7 +36,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/nvram/eeprom93xx.h"
 #include "migration/qemu-file-types.h"
 #include "migration/vmstate.h"
hw/nvram/eeprom_at24c.c +0 -1
index f75a485738..00f942db51 100644
@@ -11,7 +11,6 @@
 
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/i2c/i2c.h"
 #include "sysemu/block-backend.h"
 
hw/nvram/fw_cfg.c +0 -1
index a5e614016a..f192c3ea16 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "hw/hw.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/dma.h"
 #include "sysemu/reset.h"
hw/nvram/mac_nvram.c +0 -1
index 4f0d2f6bd4..853b693109 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/nvram/chrp_nvram.h"
 #include "hw/ppc/mac.h"
 #include "migration/vmstate.h"
hw/openrisc/cputimer.c +0 -1
index e9f89333dc..93268815d8 100644
@@ -20,7 +20,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "migration/vmstate.h"
 #include "qemu/timer.h"
 
hw/openrisc/openrisc_sim.c +0 -1
index 965d5b44ee..13572b8eff 100644
@@ -22,7 +22,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/boards.h"
 #include "elf.h"
hw/openrisc/pic_cpu.c +0 -1
index d3f179ff8d..36f9350830 100644
@@ -19,7 +19,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "cpu.h"
 
hw/pci-host/bonito.c +0 -1
index 58870e0d87..30e078763f 100644
@@ -39,7 +39,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/i386/pc.h"
 #include "hw/irq.h"
hw/pci-host/gpex.c +0 -1
index 1a45c30505..93f28efb49 100644
@@ -31,7 +31,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/pci-host/gpex.h"
 #include "migration/vmstate.h"
hw/pci-host/piix.c +0 -1
index 9e8c8542d3..bc9726057a 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
hw/pci-host/ppce500.c +0 -1
index 840869f19c..241e7e788d 100644
@@ -15,7 +15,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ppc/e500-ccsr.h"
 #include "migration/vmstate.h"
hw/pci-host/prep.c +0 -1
index 34a36812ea..588c7dc6c0 100644
@@ -27,7 +27,6 @@
 #include "qemu-common.h"
 #include "qemu/units.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
 #include "hw/pci/pci_host.h"
hw/pci-host/q35.c +0 -1
index 25335a8b71..1688a89b6a 100644
@@ -29,7 +29,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci-host/q35.h"
 #include "migration/vmstate.h"
 #include "qapi/error.h"
hw/pci-host/uninorth.c +0 -1
index 4ffb2d0d03..76293ab22b 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ppc/mac.h"
 #include "qemu/module.h"
hw/pci/msix.c +0 -1
index 81a23accf3..29187898f2 100644
@@ -15,7 +15,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
 #include "hw/pci/pci.h"
hw/pci/pci.c +0 -1
index de3691eee4..d84ecd8507 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bridge.h"
hw/pci/pcie_host.c +0 -1
index d6768b8eb6..3534006f99 100644
@@ -20,7 +20,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pcie_host.h"
 #include "qemu/module.h"
hw/pcmcia/pcmcia.c +0 -1
index c16b12db01..03d13e7d67 100644
@@ -6,7 +6,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/pcmcia.h"
 
 static const TypeInfo pcmcia_card_type_info = {
hw/pcmcia/pxa2xx.c +0 -1
index 26ab2267de..14e4dfe8b1 100644
@@ -11,7 +11,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "qemu/module.h"
hw/ppc/e500.c +0 -1
index 0451a4e338..3f0c3dea92 100644
@@ -22,7 +22,6 @@
 #include "e500-ccsr.h"
 #include "net/net.h"
 #include "qemu/config-file.h"
-#include "hw/hw.h"
 #include "hw/char/serial.h"
 #include "hw/pci/pci.h"
 #include "hw/boards.h"
hw/ppc/mac_newworld.c +0 -1
index 0f9f351eb1..94a958e5e0 100644
@@ -49,7 +49,6 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/ppc/ppc.h"
 #include "hw/ppc/mac.h"
 #include "hw/input/adb.h"
hw/ppc/mac_oldworld.c +0 -1
index 6640057473..aeeddd1d3b 100644
@@ -28,7 +28,6 @@
 #include "qemu-common.h"
 #include "qemu/units.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/ppc/ppc.h"
 #include "mac.h"
 #include "hw/input/adb.h"
hw/ppc/mpc8544_guts.c +0 -1
index 2b7cc14060..ad9c219a8f 100644
@@ -20,7 +20,6 @@
 #include "qemu/osdep.h"
 #include "qemu/module.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
 
hw/ppc/pnv.c +0 -1
index 96608883aa..114d5826df 100644
@@ -26,7 +26,6 @@
 #include "sysemu/reset.h"
 #include "sysemu/cpus.h"
 #include "sysemu/device_tree.h"
-#include "hw/hw.h"
 #include "target/ppc/cpu.h"
 #include "qemu/log.h"
 #include "hw/ppc/fdt.h"
hw/ppc/pnv_bmc.c +0 -1
index 4b76d34f0a..a27776aa99 100644
@@ -17,7 +17,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "sysemu/sysemu.h"
 #include "target/ppc/cpu.h"
 #include "qemu/log.h"
hw/ppc/pnv_occ.c +0 -1
index 636f91f311..6120405379 100644
@@ -17,7 +17,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "sysemu/sysemu.h"
 #include "target/ppc/cpu.h"
 #include "qapi/error.h"
hw/ppc/pnv_psi.c +0 -1
index e66aeec4aa..f10d519014 100644
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "target/ppc/cpu.h"
 #include "qemu/log.h"
hw/ppc/pnv_xscom.c +0 -1
index 2b81c75f56..0e31c5786b 100644
@@ -18,7 +18,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "sysemu/hw_accel.h"
hw/ppc/ppc.c +0 -1
index 5cc321828e..a1192d7889 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ppc/ppc.h"
 #include "hw/ppc/ppc_e500.h"
hw/ppc/ppc405_boards.c +0 -1
index 5b278e7791..388cae0b43 100644
@@ -27,7 +27,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/ppc/ppc.h"
 #include "ppc405.h"
 #include "hw/timer/m48t59.h"
hw/ppc/ppc405_uc.c +0 -1
index bb62714fd9..ba092f2931 100644
@@ -26,7 +26,6 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/ppc/ppc.h"
 #include "hw/boards.h"
 #include "hw/i2c/ppc4xx_i2c.h"
hw/ppc/ppc440_bamboo.c +0 -1
index 1bd92aa749..4d95c0f8a8 100644
@@ -17,7 +17,6 @@
 #include "qemu-common.h"
 #include "qemu/error-report.h"
 #include "net/net.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/boards.h"
 #include "sysemu/kvm.h"
hw/ppc/ppc440_pcix.c +0 -1
index 77a78388c1..2ee2d4f4fc 100644
@@ -23,7 +23,6 @@
 #include "qemu/error-report.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ppc/ppc.h"
 #include "hw/ppc/ppc4xx.h"
hw/ppc/ppc440_uc.c +0 -1
index 6570c2d120..e7f42d78a1 100644
@@ -15,7 +15,6 @@
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "exec/address-spaces.h"
 #include "exec/memory.h"
hw/ppc/ppc4xx_devs.c +0 -1
index 49d714756f..c2e50138aa 100644
@@ -26,7 +26,6 @@
 #include "qemu/units.h"
 #include "sysemu/reset.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ppc/ppc.h"
 #include "hw/ppc/ppc4xx.h"
hw/ppc/ppc4xx_pci.c +0 -1
index 7334d75890..3ea47df71f 100644
@@ -20,7 +20,6 @@
  * 4xx SoCs, such as the 440EP. */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ppc/ppc.h"
 #include "hw/ppc/ppc4xx.h"
hw/ppc/ppc_booke.c +0 -1
index ba5f513ca5..ce0e1406e1 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/ppc/ppc.h"
 #include "qemu/timer.h"
 #include "sysemu/reset.h"
hw/ppc/prep.c +0 -1
index 01dc7e111b..4f3c6bf190 100644
@@ -25,7 +25,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/timer/m48t59.h"
 #include "hw/char/serial.h"
 #include "hw/block/fdc.h"
hw/ppc/sam460ex.c +0 -1
index c1d6f74d5b..7ed5518dbc 100644
@@ -16,7 +16,6 @@
 #include "qemu-common.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "sysemu/kvm.h"
 #include "kvm_ppc.h"
hw/ppc/spapr.c +0 -1
index 76e815ceee..4c02ce9a08 100644
@@ -32,7 +32,6 @@
 #include "sysemu/numa.h"
 #include "sysemu/qtest.h"
 #include "sysemu/reset.h"
-#include "hw/hw.h"
 #include "qemu/log.h"
 #include "hw/fw-path-provider.h"
 #include "elf.h"
hw/ppc/spapr_iommu.c +0 -1
index 57834e6a39..8223bdb39f 100644
@@ -19,7 +19,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
-#include "hw/hw.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
 #include "sysemu/kvm.h"
hw/ppc/spapr_pci.c +0 -1
index e5f592322f..53b799fec7 100644
@@ -26,7 +26,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/ppc/spapr_vio.c +0 -1
index 1095aa5f00..31ff0be189 100644
@@ -23,7 +23,6 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "qemu/log.h"
 #include "sysemu/sysemu.h"
hw/ppc/virtex_ml507.c +0 -1
index 06f5a28601..099b94cc54 100644
@@ -27,7 +27,6 @@
 #include "qemu/units.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "hw/char/serial.h"
 #include "hw/block/flash.h"
 #include "sysemu/sysemu.h"
hw/rdma/vmw/pvrdma_cmd.c +0 -1
index 8d70c0d23d..692125ac26 100644
@@ -15,7 +15,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_ids.h"
 
hw/rdma/vmw/pvrdma_main.c +0 -1
index adcf79cd63..b924843367 100644
@@ -16,7 +16,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_ids.h"
 #include "hw/pci/msi.h"
hw/riscv/sifive_e.c +0 -1
index 2a499d8ed2..862903d6b5 100644
@@ -32,7 +32,6 @@
 #include "qemu/log.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "hw/sysbus.h"
hw/riscv/sifive_prci.c +1 -0
index f406682c91..562bc3dc4c 100644
@@ -22,6 +22,7 @@
 #include "hw/sysbus.h"
 #include "qemu/module.h"
 #include "target/riscv/cpu.h"
+#include "hw/hw.h"
 #include "hw/riscv/sifive_prci.h"
 
 static uint64_t sifive_prci_read(void *opaque, hwaddr addr, unsigned int size)
hw/riscv/sifive_test.c +1 -0
index 24a04d7b36..3a14f9f8b6 100644
@@ -22,6 +22,7 @@
 #include "hw/sysbus.h"
 #include "qemu/module.h"
 #include "target/riscv/cpu.h"
+#include "hw/hw.h"
 #include "hw/riscv/sifive_test.h"
 
 static uint64_t sifive_test_read(void *opaque, hwaddr addr, unsigned int size)
hw/riscv/sifive_u.c +0 -1
index 71b8083c05..0b3c5dff97 100644
@@ -29,7 +29,6 @@
 #include "qemu/log.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "hw/sysbus.h"
hw/riscv/sifive_uart.c +1 -0
index d18613fb33..9de42b1680 100644
@@ -22,6 +22,7 @@
 #include "chardev/char.h"
 #include "chardev/char-fe.h"
 #include "target/riscv/cpu.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/riscv/sifive_uart.h"
 
hw/riscv/spike.c +0 -1
index 2991b341a2..9cc786b6b6 100644
@@ -27,7 +27,6 @@
 #include "qemu/log.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "hw/sysbus.h"
hw/riscv/virt.c +0 -1
index 25faf3b417..c72198b720 100644
@@ -23,7 +23,6 @@
 #include "qemu/log.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "hw/sysbus.h"
hw/s390x/virtio-ccw.c +0 -1
index fa537bfba3..a371370221 100644
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
 #include "net/net.h"
hw/scsi/lsi53c895a.c +0 -1
index 175eb79260..222a286d44 100644
@@ -15,7 +15,6 @@
 
 #include "qemu/osdep.h"
 
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/pci/pci.h"
 #include "hw/scsi/scsi.h"
hw/scsi/megasas.c +0 -1
index 970b10048f..3706294a85 100644
@@ -20,7 +20,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "sysemu/dma.h"
 #include "sysemu/block-backend.h"
hw/scsi/mptconfig.c +0 -1
index 87a416a5cb..3b2a857b5c 100644
@@ -16,7 +16,6 @@
  * Lesser General Public License for more details.
  */
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/scsi/scsi.h"
 
hw/scsi/mptendian.c +0 -1
index 79f99734d2..313f40edf9 100644
@@ -21,7 +21,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "sysemu/dma.h"
 #include "hw/pci/msi.h"
hw/scsi/mptsas.c +0 -1
index 79501777d4..b32f4c0ca9 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "sysemu/dma.h"
 #include "hw/pci/msi.h"
hw/scsi/scsi-bus.c +0 -1
index 42928a6aec..1f9914739a 100644
@@ -1,5 +1,4 @@
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
hw/scsi/spapr_vscsi.c +0 -1
index 5290f7569a..fedeec676d 100644
@@ -35,7 +35,6 @@
 #include "qemu/osdep.h"
 #include "qemu/module.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/scsi/scsi.h"
 #include "migration/vmstate.h"
 #include "scsi/constants.h"
hw/sd/milkymist-memcard.c +0 -1
index dcb7169166..e3c7cf5b5f 100644
@@ -24,7 +24,6 @@
 #include "qemu/osdep.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
 #include "sysemu/sysemu.h"
hw/sd/omap_mmc.c +0 -1
index 15a0bbe87d..c6e516b611 100644
@@ -21,7 +21,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/arm/omap.h"
 #include "hw/sd/sd.h"
hw/sd/pxa2xx_mmci.c +0 -1
index 020cd5464c..db2f2adf58 100644
@@ -12,7 +12,6 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/sd/sd.c +0 -1
index 02924329bf..3f26b38786 100644
@@ -33,7 +33,6 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "hw/qdev.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/registerfields.h"
 #include "sysemu/block-backend.h"
hw/sd/sdhci-pci.c +0 -1
index 9370181993..438cb30af5 100644
@@ -18,7 +18,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
-#include "hw/hw.h"
 #include "hw/sd/sdhci.h"
 #include "sdhci-internal.h"
 
hw/sd/sdhci.c +0 -1
index f9db39c834..1adc16e3e9 100644
@@ -26,7 +26,6 @@
 #include "qemu/units.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "sysemu/dma.h"
 #include "qemu/timer.h"
hw/sh4/r2d.c +0 -1
index 9838ea3323..571e594304 100644
@@ -28,7 +28,6 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "hw/sh4/sh.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
hw/sh4/sh7750.c +0 -1
index b35d07265d..d660714443 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sh4/sh.h"
 #include "sysemu/sysemu.h"
hw/sh4/sh7750_regnames.c +0 -1
index 34b4f99b86..0630fe3cf4 100644
@@ -1,5 +1,4 @@
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sh4/sh.h"
 #include "sh7750_regs.h"
 #include "sh7750_regnames.h"
hw/sh4/shix.c +0 -1
index 6a1c7238e9..2fc2915428 100644
@@ -30,7 +30,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/sh4/sh.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/qtest.h"
hw/sparc/leon3.c +0 -1
index 9c43806690..655939a3f1 100644
@@ -28,7 +28,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
hw/sparc64/niagara.c +0 -1
index dc0ce7eda4..1efcff628a 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "hw/char/serial.h"
 #include "hw/misc/unimp.h"
hw/sparc64/sun4u.c +0 -1
index c95ed94d2e..54a385970c 100644
@@ -28,7 +28,6 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bridge.h"
 #include "hw/pci/pci_bus.h"
hw/timer/a9gtimer.c +1 -0
index b310dfb1b3..0339b92cf8 100644
@@ -21,6 +21,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/timer/a9gtimer.h"
 #include "migration/vmstate.h"
hw/timer/arm_mptimer.c +1 -0
index a13255d308..abfc5baa77 100644
@@ -20,6 +20,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/ptimer.h"
 #include "hw/timer/arm_mptimer.h"
hw/timer/exynos4210_mct.c +1 -0
index 7f2af5287c..79b291863c 100644
@@ -62,6 +62,7 @@
 #include "hw/ptimer.h"
 
 #include "hw/arm/exynos4210.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 
 //#define DEBUG_MCT
hw/timer/exynos4210_rtc.c +0 -1
index 561451059e..f79b970c5e 100644
@@ -35,7 +35,6 @@
 #include "qemu/bcd.h"
 #include "hw/ptimer.h"
 
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "sysemu/sysemu.h"
 
hw/timer/hpet.c +0 -1
index 305704a339..1ddae4e7d7 100644
@@ -25,7 +25,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/irq.h"
 #include "ui/console.h"
hw/timer/i8254.c +0 -1
index 97258757b1..a4be7330ef 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
hw/timer/i8254_common.c +0 -1
index 062e8690c4..57bf10cc94 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
hw/timer/lm32_timer.c +0 -1
index bfa9de76ba..a381e39f0a 100644
@@ -22,7 +22,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/timer/m48t59.c +0 -1
index 1240315206..199003030a 100644
@@ -25,7 +25,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/timer/m48t59.h"
 #include "qemu/timer.h"
hw/timer/mc146818rtc.c +0 -1
index b432662bc4..473935339d 100644
@@ -27,7 +27,6 @@
 #include "qemu/cutils.h"
 #include "qemu/module.h"
 #include "qemu/bcd.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "qemu/timer.h"
 #include "sysemu/sysemu.h"
hw/timer/milkymist-sysctl.c +0 -1
index 7c56224710..900b0b62a9 100644
@@ -22,7 +22,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/timer/mips_gictimer.c +0 -1
index f5c5806724..bc44cd934e 100644
@@ -7,7 +7,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "qemu/timer.h"
 #include "hw/timer/mips_gictimer.h"
hw/timer/omap_gptimer.c +0 -1
index c34f60b5d4..c407190138 100644
@@ -19,7 +19,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "qemu/timer.h"
 #include "hw/arm/omap.h"
hw/timer/omap_synctimer.c +0 -1
index 0d75a90f3a..72b997939b 100644
@@ -18,7 +18,6 @@
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "qemu/timer.h"
 #include "hw/arm/omap.h"
 struct omap_synctimer_s {
hw/timer/pxa2xx_timer.c +0 -1
index f61053b3c6..99e6c1e250 100644
@@ -8,7 +8,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "qemu/timer.h"
 #include "sysemu/sysemu.h"
hw/timer/sun4v-rtc.c +0 -1
index ba62adc826..54272a822f 100644
@@ -10,7 +10,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
hw/timer/twl92230.c +0 -1
index 6b2a25b9c9..63bd13d2ca 100644
@@ -21,7 +21,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "hw/hw.h"
 #include "qemu/timer.h"
 #include "hw/i2c/i2c.h"
 #include "hw/irq.h"
hw/tpm/tpm_emulator.c +0 -1
index 76c1e16fa1..22f9113432 100644
@@ -33,7 +33,6 @@
 #include "io/channel-socket.h"
 #include "sysemu/tpm_backend.h"
 #include "tpm_int.h"
-#include "hw/hw.h"
 #include "tpm_util.h"
 #include "tpm_ioctl.h"
 #include "migration/blocker.h"
hw/tpm/tpm_passthrough.c +0 -1
index 897e3d5864..f67244b5d4 100644
@@ -29,7 +29,6 @@
 #include "qemu/sockets.h"
 #include "sysemu/tpm_backend.h"
 #include "tpm_int.h"
-#include "hw/hw.h"
 #include "qapi/clone-visitor.h"
 #include "qapi/qapi-visit-tpm.h"
 #include "tpm_util.h"
hw/tricore/tricore_testboard.c +0 -1
index be397ebf92..c6305dcdf1 100644
@@ -22,7 +22,6 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
 #include "hw/boards.h"
hw/usb/bus.c +0 -1
index 6aff15e504..be18221ac6 100644
@@ -1,5 +1,4 @@
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/usb.h"
 #include "hw/qdev.h"
 #include "qapi/error.h"
hw/usb/dev-audio.c +0 -1
index d4074edfc3..c0f35c58d5 100644
@@ -34,7 +34,6 @@
 #include "hw/usb.h"
 #include "migration/vmstate.h"
 #include "desc.h"
-#include "hw/hw.h"
 #include "audio/audio.h"
 
 #define USBAUDIO_VENDOR_NUM     0x46f4 /* CRC16() of "QEMU" */
hw/usb/dev-hid.c +0 -1
index c7c65a8782..79b3be3c3f 100644
@@ -24,7 +24,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "ui/console.h"
 #include "hw/usb.h"
 #include "migration/vmstate.h"
hw/usb/dev-wacom.c +0 -1
index 9a8a2d3081..8ed57b3b44 100644
@@ -27,7 +27,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "ui/console.h"
 #include "hw/usb.h"
 #include "migration/vmstate.h"
hw/usb/hcd-ehci.h +0 -1
index fedf82c611..fdbcfdcbeb 100644
@@ -18,7 +18,6 @@
 #ifndef HW_USB_HCD_EHCI_H
 #define HW_USB_HCD_EHCI_H
 
-#include "hw/hw.h"
 #include "qemu/timer.h"
 #include "hw/usb.h"
 #include "sysemu/dma.h"
hw/usb/hcd-ohci-pci.c +0 -1
index 67fcfc4d7c..25b0ced804 100644
@@ -19,7 +19,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "qapi/error.h"
 #include "qemu/timer.h"
 #include "hw/usb.h"
hw/usb/hcd-ohci.c +0 -1
index 438dfb4b83..94b3410d3c 100644
@@ -26,7 +26,6 @@
 */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "qapi/error.h"
 #include "qemu/module.h"
hw/usb/hcd-uhci.c +0 -1
index 887885efa0..7c6edd17b4 100644
@@ -27,7 +27,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/usb.h"
 #include "hw/usb/uhci-regs.h"
 #include "migration/vmstate.h"
hw/usb/hcd-xhci-nec.c +0 -1
index e099382b24..aba3716875 100644
@@ -20,7 +20,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/usb.h"
 #include "qemu/module.h"
 #include "hw/pci/pci.h"
hw/usb/hcd-xhci.c +0 -1
index fc67476100..d60ad895a3 100644
@@ -20,7 +20,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "qemu/timer.h"
 #include "qemu/module.h"
 #include "qemu/queue.h"
hw/usb/libhw.c +0 -1
index adbee2f642..9c33a1640f 100644
@@ -20,7 +20,6 @@
  * THE SOFTWARE.
  */
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/usb.h"
 #include "sysemu/dma.h"
 
hw/usb/tusb6010.c +1 -0
index a61b0f6354..17580876c6 100644
@@ -24,6 +24,7 @@
 #include "qemu/timer.h"
 #include "hw/usb.h"
 #include "hw/arm/omap.h"
+#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 
hw/vfio/pci-quirks.c +1 -0
index b35a640030..62d765a4ea 100644
@@ -19,6 +19,7 @@
 #include "qapi/error.h"
 #include "qapi/visitor.h"
 #include <sys/ioctl.h>
+#include "hw/hw.h"
 #include "hw/nvram/fw_cfg.h"
 #include "pci.h"
 #include "trace.h"
hw/vfio/pci.c +1 -0
index 8a58ad670c..48ac0f5a34 100644
@@ -22,6 +22,7 @@
 #include <linux/vfio.h>
 #include <sys/ioctl.h>
 
+#include "hw/hw.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
 #include "hw/pci/pci_bridge.h"
hw/virtio/vhost.c +0 -1
index ba1006ad96..34accdf615 100644
@@ -16,7 +16,6 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "hw/virtio/vhost.h"
-#include "hw/hw.h"
 #include "qemu/atomic.h"
 #include "qemu/range.h"
 #include "qemu/error-report.h"
hw/virtio/virtio-bus.c +0 -1
index 1d29a631f3..207e955996 100644
@@ -23,7 +23,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
hw/watchdog/wdt_i6300esb.c +0 -1
index 288be8f73c..370cf92e85 100644
@@ -24,7 +24,6 @@
 #include "qemu/module.h"
 #include "qemu/timer.h"
 #include "sysemu/watchdog.h"
-#include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "migration/vmstate.h"
 
hw/watchdog/wdt_ib700.c +0 -1
index e233945c2e..985944a84a 100644
@@ -23,7 +23,6 @@
 #include "qemu/module.h"
 #include "qemu/timer.h"
 #include "sysemu/watchdog.h"
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "migration/vmstate.h"
 
hw/xen/xen-bus-helper.c +0 -1
index 5f7a4b2612..b459bb9396 100644
@@ -6,7 +6,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/xen/xen.h"
 #include "hw/xen/xen-bus.h"
hw/xen/xen-bus.c +0 -1
index 7503eea9e9..3f39a894da 100644
@@ -9,7 +9,6 @@
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/uuid.h"
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/xen/xen.h"
 #include "hw/xen/xen-backend.h"
hw/xen/xen-legacy-backend.c +0 -1
index 3715c94fa6..2831940ae7 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include <sys/signal.h>
 
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/boards.h"
 #include "qemu/log.h"
hw/xen/xen_pt_load_rom.c +0 -1
index e6a86ca818..d111ecaf7e 100644
@@ -3,7 +3,6 @@
  */
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "qemu/error-report.h"
 #include "ui/console.h"
hw/xenpv/xen_machine_pv.c +0 -1
index dcaf2a01a3..524d608eab 100644
@@ -24,7 +24,6 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "hw/xen/xen-legacy-backend.h"
 #include "hw/xen/xen-bus.h"
hw/xtensa/mx_pic.c +0 -1
index 912de66206..d889f953d1 100644
@@ -26,7 +26,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/xtensa/mx_pic.h"
 #include "qemu/log.h"
hw/xtensa/pic_cpu.c +0 -1
index b708290d7b..edd53c9241 100644
@@ -27,7 +27,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "qemu/log.h"
 #include "qemu/timer.h"
include/hw/audio/pcspk.h +0 -1
index 172afbf146..0f5d4f9919 100644
@@ -25,7 +25,6 @@
 #ifndef HW_PCSPK_H
 #define HW_PCSPK_H
 
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 
 #define TYPE_PC_SPEAKER "isa-pcspk"
include/hw/audio/wm8750.h +0 -1
index e12cb886d1..f7bafd5e38 100644
@@ -14,7 +14,6 @@
 #ifndef HW_DAC_WM8750_H
 #define HW_DAC_WM8750_H
 
-#include "hw/hw.h"
 
 #define TYPE_WM8750 "wm8750"
 #define TYPE_MV88W8618_AUDIO "mv88w8618_audio"
include/hw/char/serial.h +0 -1
index abd5cf71a9..bfcbbb6e19 100644
@@ -26,7 +26,6 @@
 #ifndef HW_SERIAL_H
 #define HW_SERIAL_H
 
-#include "hw/hw.h"
 #include "sysemu/sysemu.h"
 #include "chardev/char-fe.h"
 #include "exec/memory.h"
include/hw/char/stm32f2xx_usart.h +0 -1
index 84c4029777..8e112671e3 100644
@@ -27,7 +27,6 @@
 
 #include "hw/sysbus.h"
 #include "chardev/char-fe.h"
-#include "hw/hw.h"
 
 #define USART_SR   0x00
 #define USART_DR   0x04
include/hw/dma/i8257.h +0 -1
index 2cab50bb6c..03e2c166be 100644
@@ -1,7 +1,6 @@
 #ifndef HW_I8257_H
 #define HW_I8257_H
 
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "exec/ioport.h"
 
include/hw/hw.h +0 -1
index 8079b911fa..fc5301f293 100644
@@ -1,4 +1,3 @@
-/* Declarations for use by hardware emulation.  */
 #ifndef QEMU_HW_H
 #define QEMU_HW_H
 
include/hw/i386/ich9.h +0 -1
index 046bcf33be..72e803f6e2 100644
@@ -1,7 +1,6 @@
 #ifndef HW_ICH9_H
 #define HW_ICH9_H
 
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "hw/sysbus.h"
 #include "hw/i386/pc.h"
include/hw/i386/ioapic_internal.h +0 -1
index 3d2eec2aa7..d46c87c510 100644
@@ -22,7 +22,6 @@
 #ifndef QEMU_IOAPIC_INTERNAL_H
 #define QEMU_IOAPIC_INTERNAL_H
 
-#include "hw/hw.h"
 #include "exec/memory.h"
 #include "hw/i386/ioapic.h"
 #include "hw/sysbus.h"
include/hw/input/i8042.h +0 -1
index f6ff146364..246e6f3335 100644
@@ -8,7 +8,6 @@
 #ifndef HW_INPUT_I8042_H
 #define HW_INPUT_I8042_H
 
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 
 #define TYPE_I8042 "i8042"
include/hw/isa/apm.h +0 -1
index 0f93602936..b6e070c00e 100644
@@ -1,7 +1,6 @@
 #ifndef APM_H
 #define APM_H
 
-#include "hw/hw.h"
 #include "exec/memory.h"
 
 #define APM_CNT_IOPORT  0xb2
include/hw/isa/i8259_internal.h +0 -1
index f742c2a726..ee189e4a77 100644
@@ -25,7 +25,6 @@
 #ifndef QEMU_I8259_INTERNAL_H
 #define QEMU_I8259_INTERNAL_H
 
-#include "hw/hw.h"
 #include "hw/i386/pc.h"
 #include "hw/isa/isa.h"
 #include "hw/intc/intc.h"
include/hw/misc/stm32f2xx_syscfg.h +0 -1
index 69e6a30fc5..84e06fdecf 100644
@@ -26,7 +26,6 @@
 #define HW_STM32F2XX_SYSCFG_H
 
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 
 #define SYSCFG_MEMRMP  0x00
 #define SYSCFG_PMC     0x04
include/hw/net/ne2000-isa.h +0 -1
index 5acf4a494e..1233928a34 100644
@@ -10,7 +10,6 @@
 #ifndef HW_NET_NE2000_ISA_H
 #define HW_NET_NE2000_ISA_H
 
-#include "hw/hw.h"
 #include "hw/qdev.h"
 #include "hw/isa/isa.h"
 #include "net/net.h"
include/hw/pci-host/designware.h +0 -1
index 186bb36238..31c41231b1 100644
@@ -21,7 +21,6 @@
 #ifndef DESIGNWARE_H
 #define DESIGNWARE_H
 
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
include/hw/pci-host/gpex.h +0 -1
index 2af1c4a37e..faea040a93 100644
@@ -20,7 +20,6 @@
 #ifndef HW_GPEX_H
 #define HW_GPEX_H
 
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pcie_host.h"
include/hw/pci-host/q35.h +0 -1
index 5ed77facd0..b3bcf2e632 100644
@@ -22,7 +22,6 @@
 #ifndef HW_Q35_H
 #define HW_Q35_H
 
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "hw/sysbus.h"
 #include "hw/i386/pc.h"
include/hw/pci-host/uninorth.h +0 -1
index 9a5cabd4c5..72d2a97355 100644
@@ -25,7 +25,6 @@
 #ifndef UNINORTH_H
 #define UNINORTH_H
 
-#include "hw/hw.h"
 #include "hw/pci/pci_host.h"
 #include "hw/ppc/openpic.h"
 
include/hw/pci-host/xilinx-pcie.h +0 -1
index 74c04dc9bb..c0f15314be 100644
@@ -20,7 +20,6 @@
 #ifndef HW_XILINX_PCIE_H
 #define HW_XILINX_PCIE_H
 
-#include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bridge.h"
include/hw/pci/pcie.h +0 -1
index 8cf3361fc4..7064875835 100644
@@ -21,7 +21,6 @@
 #ifndef QEMU_PCIE_H
 #define QEMU_PCIE_H
 
-#include "hw/hw.h"
 #include "hw/pci/pci_regs.h"
 #include "hw/pci/pcie_regs.h"
 #include "hw/pci/pcie_aer.h"
include/hw/pci/pcie_aer.h +0 -1
index 502dcd7eba..65e71d98fe 100644
@@ -21,7 +21,6 @@
 #ifndef QEMU_PCIE_AER_H
 #define QEMU_PCIE_AER_H
 
-#include "hw/hw.h"
 #include "hw/pci/pci_regs.h"
 
 /* definitions which PCIExpressDevice uses */
include/hw/qdev.h +0 -1
index 5cb8b080a6..d68991ae87 100644
@@ -1,7 +1,6 @@
 #ifndef QDEV_H
 #define QDEV_H
 
-#include "hw/hw.h"
 #include "hw/qdev-core.h"
 #include "hw/qdev-properties.h"
 
include/hw/riscv/riscv_htif.h +0 -1
index fb5f88129e..aabc059f32 100644
@@ -20,7 +20,6 @@
 #ifndef HW_RISCV_HTIF_H
 #define HW_RISCV_HTIF_H
 
-#include "hw/hw.h"
 #include "chardev/char.h"
 #include "chardev/char-fe.h"
 #include "sysemu/sysemu.h"
include/hw/ssi/stm32f2xx_spi.h +0 -1
index 1cd73e4cd4..e24b007abf 100644
@@ -26,7 +26,6 @@
 #define HW_STM32F2XX_SPI_H
 
 #include "hw/sysbus.h"
-#include "hw/hw.h"
 #include "hw/ssi/ssi.h"
 
 #define STM_SPI_CR1     0x00
include/hw/timer/aspeed_rtc.h +0 -1
index 1f1155a676..15ba42912b 100644
@@ -10,7 +10,6 @@
 
 #include <stdint.h>
 
-#include "hw/hw.h"
 #include "hw/irq.h"
 #include "hw/sysbus.h"
 
include/hw/timer/i8254.h +0 -1
index 5b12eb918e..608b116fcf 100644
@@ -25,7 +25,6 @@
 #ifndef HW_I8254_H
 #define HW_I8254_H
 
-#include "hw/hw.h"
 #include "hw/qdev.h"
 #include "hw/isa/isa.h"
 
include/hw/timer/i8254_internal.h +0 -1
index e611c6f227..3db462aecd 100644
@@ -25,7 +25,6 @@
 #ifndef QEMU_I8254_INTERNAL_H
 #define QEMU_I8254_INTERNAL_H
 
-#include "hw/hw.h"
 #include "hw/isa/isa.h"
 #include "hw/timer/i8254.h"
 #include "qemu/timer.h"
include/hw/virtio/vhost.h +0 -1
index 619498c8f4..085450c6f8 100644
@@ -1,7 +1,6 @@
 #ifndef VHOST_H
 #define VHOST_H
 
-#include "hw/hw.h"
 #include "hw/virtio/vhost-backend.h"
 #include "hw/virtio/virtio.h"
 #include "exec/memory.h"
include/hw/virtio/virtio.h +0 -1
index e6a2a0a6e0..7bae09e3ae 100644
@@ -15,7 +15,6 @@
 #define QEMU_VIRTIO_H
 
 #include "exec/memory.h"
-#include "hw/hw.h"
 #include "net/net.h"
 #include "hw/qdev.h"
 #include "sysemu/sysemu.h"
include/hw/xen/xen_common.h +0 -1
index 0504b43659..1e3ec4e16e 100644
@@ -14,7 +14,6 @@
 #include <xenstore.h>
 #include "hw/xen/interface/io/xenbus.h"
 
-#include "hw/hw.h"
 #include "hw/xen/xen.h"
 #include "hw/pci/pci.h"
 #include "qemu/queue.h"
include/sysemu/dma.h +0 -1
index 5da3c4e3c5..80c5bc3e02 100644
@@ -12,7 +12,6 @@
 
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
-#include "hw/hw.h"
 #include "block/block.h"
 #include "block/accounting.h"
 
include/sysemu/hax.h +0 -1
index f005995c50..9b27e65cc7 100644
@@ -37,7 +37,6 @@ void hax_cpu_synchronize_pre_loadvm(CPUState *cpu);
 
 int hax_enabled(void);
 
-#include "hw/hw.h"
 #include "qemu/bitops.h"
 #include "exec/memory.h"
 int hax_vcpu_destroy(CPUState *cpu);
include/sysemu/hvf.h +0 -1
index dd1722f2df..d211e808e9 100644
@@ -24,7 +24,6 @@ extern bool hvf_allowed;
 #include <Hypervisor/hv_vmx.h>
 #include <Hypervisor/hv_error.h>
 #include "target/i386/cpu.h"
-#include "hw/hw.h"
 uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx,
                                  int reg);
 #define hvf_enabled() (hvf_allowed)
monitor/misc.c +0 -1
index 00338c002a..117a172928 100644
@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "monitor-internal.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "monitor/qdev.h"
 #include "hw/usb.h"
 #include "hw/pci/pci.h"
target/alpha/machine.c +0 -1
index fdab596438..b26ec29f0f 100644
@@ -1,6 +1,5 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "migration/cpu.h"
 
target/arm/machine.c +0 -1
index 3fd319a309..bf2a0a6a09 100644
@@ -1,6 +1,5 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "qemu/error-report.h"
 #include "sysemu/kvm.h"
target/cris/machine.c +0 -1
index ecec41c2c8..be38a89377 100644
@@ -20,7 +20,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "migration/cpu.h"
 
 static const VMStateDescription vmstate_tlbset = {
target/hppa/machine.c +0 -1
index 73e8121bde..9fb82a53db 100644
@@ -19,7 +19,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "migration/cpu.h"
 
target/i386/cpu.c +0 -1
index 80f1443110..ff65e11008 100644
@@ -54,7 +54,6 @@
 #include "hw/i386/topology.h"
 #ifndef CONFIG_USER_ONLY
 #include "exec/address-spaces.h"
-#include "hw/hw.h"
 #include "hw/xen/xen.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/boards.h"
target/i386/machine.c +0 -1
index b1146093b5..f8c6feea08 100644
@@ -1,7 +1,6 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "hw/i386/pc.h"
 #include "hw/isa/isa.h"
target/lm32/machine.c +0 -1
index cc46f77324..db43ef0631 100644
@@ -1,6 +1,5 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "migration/cpu.h"
 
target/mips/machine.c +0 -1
index eb2d97001d..7f4b5d524d 100644
@@ -1,7 +1,6 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "internal.h"
-#include "hw/hw.h"
 #include "migration/cpu.h"
 
 static int cpu_post_load(void *opaque, int version_id)
target/moxie/machine.c +0 -1
index 322a724e6f..675272f9e0 100644
@@ -1,6 +1,5 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "machine.h"
 #include "migration/cpu.h"
target/openrisc/machine.c +0 -1
index 9fa285217d..99c0470a44 100644
@@ -19,7 +19,6 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "migration/cpu.h"
 
target/ppc/kvm.c +1 -0
index 4bd95be9cd..4b05014a64 100644
@@ -37,6 +37,7 @@
 #include "hw/sysbus.h"
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/spapr_cpu_core.h"
+#include "hw/hw.h"
 #include "hw/ppc/ppc.h"
 #include "migration/qemu-file-types.h"
 #include "sysemu/watchdog.h"
target/ppc/machine.c +0 -1
index e82f5de9db..199f5cef8f 100644
@@ -1,7 +1,6 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "sysemu/kvm.h"
 #include "helper_regs.h"
target/s390x/cpu.c +0 -1
index 3caba8d5e1..9466cd832d 100644
@@ -37,7 +37,6 @@
 #include "sysemu/hw_accel.h"
 #include "hw/qdev-properties.h"
 #ifndef CONFIG_USER_ONLY
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "sysemu/arch_init.h"
 #include "sysemu/sysemu.h"
target/s390x/kvm.c +0 -1
index 6e814c230b..b465bb599e 100644
@@ -36,7 +36,6 @@
 #include "qemu/log.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/hw_accel.h"
-#include "hw/hw.h"
 #include "sysemu/device_tree.h"
 #include "exec/gdbstub.h"
 #include "exec/ram_addr.h"
target/s390x/machine.c +0 -1
index 12a2cd65b0..549bb6c280 100644
@@ -15,7 +15,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "hw/hw.h"
 #include "cpu.h"
 #include "internal.h"
 #include "kvm_s390x.h"
target/s390x/mmu_helper.c +1 -0
index 6e9c4d6151..7a563110f0 100644
@@ -25,6 +25,7 @@
 #include "sysemu/tcg.h"
 #include "exec/exec-all.h"
 #include "trace.h"
+#include "hw/hw.h"
 #include "hw/s390x/storage-keys.h"
 
 /* #define DEBUG_S390 */
target/sparc/machine.c +0 -1
index 32d453c008..7309c27319 100644
@@ -1,7 +1,6 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
-#include "hw/hw.h"
 #include "hw/boards.h"
 #include "qemu/timer.h"
 
ui/spice-core.c +0 -1
index 2ffc3335f0..16478ecd45 100644
@@ -34,7 +34,6 @@
 #include "qemu/notify.h"
 #include "qemu/option.h"
 #include "migration/misc.h"
-#include "hw/hw.h"
 #include "hw/pci/pci_bus.h"
 #include "ui/spice-display.h"
 
vl.c +0 -1
index 1abfd306e3..20328e682c 100644
@@ -55,7 +55,6 @@ int main(int argc, char **argv)
 
 #include "qemu/error-report.h"
 #include "qemu/sockets.h"
-#include "hw/hw.h"
 #include "sysemu/accel.h"
 #include "hw/usb.h"
 #include "hw/isa/isa.h"
Signature · 1 line
2.21.0
#22 lore raw

PATCH v3 19/29 Include qemu/queue.h slightly less

In reply to Markus Armbruster
---
 hw/scsi/vhost-scsi.c        | 1 -
 hw/vfio/ap.c                | 1 -
 include/exec/cpu-defs.h     | 1 -
 include/hw/xen/xen_common.h | 1 -
 include/net/can_emu.h       | 1 +
 include/net/filter.h        | 1 +
 include/qemu/range.h        | 2 --
 include/qom/object.h        | 1 -
 include/sysemu/cryptodev.h  | 1 +
 include/sysemu/rng.h        | 1 +
 include/sysemu/sysemu.h     | 1 -
 linux-user/elfload.c        | 1 +
 linux-user/main.c           | 1 +
 linux-user/qemu.h           | 1 -
 linux-user/syscall.c        | 1 +
 nbd/client.c                | 1 +
 nbd/nbd-internal.h          | 1 -
 nbd/server.c                | 1 +
 qapi/qapi-dealloc-visitor.c | 1 -
 target/i386/whpx-all.c      | 1 -
 ui/kbd-state.c              | 1 -
 util/vfio-helpers.c         | 1 -
 22 files changed, 9 insertions(+), 14 deletions(-)
hw/scsi/vhost-scsi.c +0 -1
index 343ca8be7a..83c9d83459 100644
@@ -20,7 +20,6 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
-#include "qemu/queue.h"
 #include "monitor/monitor.h"
 #include "migration/blocker.h"
 #include "hw/virtio/vhost-scsi.h"
hw/vfio/ap.c +0 -1
index d1c86abb76..2bfc402037 100644
@@ -20,7 +20,6 @@
 #include "hw/s390x/ap-device.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
-#include "qemu/queue.h"
 #include "qemu/option.h"
 #include "qemu/config-file.h"
 #include "cpu.h"
include/exec/cpu-defs.h +0 -1
index 9bc713a70b..57a9a4ffd9 100644
@@ -25,7 +25,6 @@
 
 #include "qemu/host-utils.h"
 #include "qemu/thread.h"
-#include "qemu/queue.h"
 #ifdef CONFIG_TCG
 #include "tcg-target.h"
 #endif
include/hw/xen/xen_common.h +0 -1
index 1e3ec4e16e..82e56339dd 100644
@@ -16,7 +16,6 @@
 
 #include "hw/xen/xen.h"
 #include "hw/pci/pci.h"
-#include "qemu/queue.h"
 #include "hw/xen/trace.h"
 
 extern xc_interface *xen_xc;
include/net/can_emu.h +1 -0
index 1da4d01b95..d4fc51b57d 100644
@@ -28,6 +28,7 @@
 #ifndef NET_CAN_EMU_H
 #define NET_CAN_EMU_H
 
+#include "qemu/queue.h"
 #include "qom/object.h"
 
 /* NOTE: the following two structures is copied from <linux/can.h>. */
include/net/filter.h +1 -0
index 9bc6fa3cc6..e8fb6259db 100644
@@ -10,6 +10,7 @@
 #define QEMU_NET_FILTER_H
 
 #include "qapi/qapi-types-net.h"
+#include "qemu/queue.h"
 #include "qom/object.h"
 #include "net/queue.h"
 
include/qemu/range.h +0 -2
index 71b8b215c6..f62b363e0d 100644
@@ -20,8 +20,6 @@
 #ifndef QEMU_RANGE_H
 #define QEMU_RANGE_H
 
-#include "qemu/queue.h"
-
 /*
  * Operations on 64 bit address ranges.
  * Notes:
include/qom/object.h +0 -1
index 7bb82a7f56..128d00c77f 100644
@@ -15,7 +15,6 @@
 #define QEMU_OBJECT_H
 
 #include "qapi/qapi-builtin-types.h"
-#include "qemu/queue.h"
 #include "qemu/module.h"
 
 struct TypeImpl;
include/sysemu/cryptodev.h +1 -0
index 92bbb79131..a9afb7e5b5 100644
@@ -23,6 +23,7 @@
 #ifndef CRYPTODEV_H
 #define CRYPTODEV_H
 
+#include "qemu/queue.h"
 #include "qom/object.h"
 
 /**
include/sysemu/rng.h +1 -0
index 2a02f47771..9b22c156f8 100644
@@ -13,6 +13,7 @@
 #ifndef QEMU_RNG_H
 #define QEMU_RNG_H
 
+#include "qemu/queue.h"
 #include "qom/object.h"
 
 #define TYPE_RNG_BACKEND "rng-backend"
include/sysemu/sysemu.h +0 -1
index 984c439ac9..77f5df59b0 100644
@@ -3,7 +3,6 @@
 /* Misc. things related to the system emulator.  */
 
 #include "qapi/qapi-types-run-state.h"
-#include "qemu/queue.h"
 #include "qemu/timer.h"
 #include "qemu/notify.h"
 #include "qemu/main-loop.h"
linux-user/elfload.c +1 -0
index bd43c4817d..3365e192eb 100644
@@ -8,6 +8,7 @@
 #include "qemu.h"
 #include "disas/disas.h"
 #include "qemu/path.h"
+#include "qemu/queue.h"
 #include "qemu/guest-random.h"
 
 #ifdef _ARCH_PPC64
linux-user/main.c +1 -0
index 8ffc525195..47917bbb20 100644
@@ -28,6 +28,7 @@
 #include "qapi/error.h"
 #include "qemu.h"
 #include "qemu/path.h"
+#include "qemu/queue.h"
 #include "qemu/config-file.h"
 #include "qemu/cutils.h"
 #include "qemu/error-report.h"
linux-user/qemu.h +0 -1
index aac0334627..f6f5fe5fbb 100644
@@ -16,7 +16,6 @@
 #include "syscall_defs.h"
 #include "target_syscall.h"
 #include "exec/gdbstub.h"
-#include "qemu/queue.h"
 
 /* This is the size of the host kernel's sigset_t, needed where we make
  * direct system calls that take a sigset_t pointer and a size.
linux-user/syscall.c +1 -0
index 8367cb138d..8b41a03901 100644
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
 #include "qemu/path.h"
+#include "qemu/queue.h"
 #include <elf.h>
 #include <endian.h>
 #include <grp.h>
nbd/client.c +1 -0
index 4de30630c7..d554ae353d 100644
@@ -19,6 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "qemu/queue.h"
 #include "trace.h"
 #include "nbd-internal.h"
 #include "qemu/cutils.h"
nbd/nbd-internal.h +0 -1
index 049f83df77..ec3d2e2ebc 100644
@@ -28,7 +28,6 @@
 #endif
 
 #include "qemu/bswap.h"
-#include "qemu/queue.h"
 #include "qemu/main-loop.h"
 
 /* This is all part of the "official" NBD API.
nbd/server.c +1 -0
index 10faedcfc5..dbd2ff8555 100644
@@ -19,6 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "qemu/queue.h"
 #include "trace.h"
 #include "nbd-internal.h"
 #include "qemu/units.h"
qapi/qapi-dealloc-visitor.c +0 -1
index 89ccd905ec..d192724b13 100644
@@ -15,7 +15,6 @@
 #include "qemu/osdep.h"
 #include "qapi/dealloc-visitor.h"
 #include "qapi/qmp/qnull.h"
-#include "qemu/queue.h"
 #include "qapi/visitor-impl.h"
 
 struct QapiDeallocVisitor
target/i386/whpx-all.c +0 -1
index ed95105eae..2cf66f7804 100644
@@ -20,7 +20,6 @@
 #include "qemu/main-loop.h"
 #include "hw/boards.h"
 #include "qemu/error-report.h"
-#include "qemu/queue.h"
 #include "qapi/error.h"
 #include "migration/blocker.h"
 #include "whp-dispatch.h"
ui/kbd-state.c +0 -1
index 1668d17dda..62d42a7a22 100644
@@ -5,7 +5,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu/bitmap.h"
-#include "qemu/queue.h"
 #include "ui/console.h"
 #include "ui/input.h"
 #include "ui/kbd-state.h"
util/vfio-helpers.c +0 -1
index 2367fe8f7f..26ffd0d6b5 100644
@@ -17,7 +17,6 @@
 #include "exec/ramlist.h"
 #include "exec/cpu-common.h"
 #include "trace.h"
-#include "qemu/queue.h"
 #include "qemu/error-report.h"
 #include "standard-headers/linux/pci_regs.h"
 #include "qemu/event_notifier.h"
Signature · 1 line
2.21.0
Reviewed-by Tested-by on v3 19/29
#23 lore raw

Re: [Qemu-devel] [PATCH v3 19/29] Include qemu/queue.h slightly less

Quoted 285 lines · Markus Armbruster
---
 hw/scsi/vhost-scsi.c        | 1 -
 hw/vfio/ap.c                | 1 -
 include/exec/cpu-defs.h     | 1 -
 include/hw/xen/xen_common.h | 1 -
 include/net/can_emu.h       | 1 +
 include/net/filter.h        | 1 +
 include/qemu/range.h        | 2 --
 include/qom/object.h        | 1 -
 include/sysemu/cryptodev.h  | 1 +
 include/sysemu/rng.h        | 1 +
 include/sysemu/sysemu.h     | 1 -
 linux-user/elfload.c        | 1 +
 linux-user/main.c           | 1 +
 linux-user/qemu.h           | 1 -
 linux-user/syscall.c        | 1 +
 nbd/client.c                | 1 +
 nbd/nbd-internal.h          | 1 -
 nbd/server.c                | 1 +
 qapi/qapi-dealloc-visitor.c | 1 -
 target/i386/whpx-all.c      | 1 -
 ui/kbd-state.c              | 1 -
 util/vfio-helpers.c         | 1 -
 22 files changed, 9 insertions(+), 14 deletions(-)
hw/scsi/vhost-scsi.c +0 -1
index 343ca8be7a..83c9d83459 100644
@@ -20,7 +20,6 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
-#include "qemu/queue.h"
 #include "monitor/monitor.h"
 #include "migration/blocker.h"
 #include "hw/virtio/vhost-scsi.h"
hw/vfio/ap.c +0 -1
index d1c86abb76..2bfc402037 100644
@@ -20,7 +20,6 @@
 #include "hw/s390x/ap-device.h"
 #include "qemu/error-report.h"
 #include "qemu/module.h"
-#include "qemu/queue.h"
 #include "qemu/option.h"
 #include "qemu/config-file.h"
 #include "cpu.h"
include/exec/cpu-defs.h +0 -1
index 9bc713a70b..57a9a4ffd9 100644
@@ -25,7 +25,6 @@
 
 #include "qemu/host-utils.h"
 #include "qemu/thread.h"
-#include "qemu/queue.h"
 #ifdef CONFIG_TCG
 #include "tcg-target.h"
 #endif
include/hw/xen/xen_common.h +0 -1
index 1e3ec4e16e..82e56339dd 100644
@@ -16,7 +16,6 @@
 
 #include "hw/xen/xen.h"
 #include "hw/pci/pci.h"
-#include "qemu/queue.h"
 #include "hw/xen/trace.h"
 
 extern xc_interface *xen_xc;
include/net/can_emu.h +1 -0
index 1da4d01b95..d4fc51b57d 100644
@@ -28,6 +28,7 @@
 #ifndef NET_CAN_EMU_H
 #define NET_CAN_EMU_H
 
+#include "qemu/queue.h"
 #include "qom/object.h"
 
 /* NOTE: the following two structures is copied from <linux/can.h>. */
include/net/filter.h +1 -0
index 9bc6fa3cc6..e8fb6259db 100644
@@ -10,6 +10,7 @@
 #define QEMU_NET_FILTER_H
 
 #include "qapi/qapi-types-net.h"
+#include "qemu/queue.h"
 #include "qom/object.h"
 #include "net/queue.h"
 
include/qemu/range.h +0 -2
index 71b8b215c6..f62b363e0d 100644
@@ -20,8 +20,6 @@
 #ifndef QEMU_RANGE_H
 #define QEMU_RANGE_H
 
-#include "qemu/queue.h"
-
 /*
  * Operations on 64 bit address ranges.
  * Notes:
include/qom/object.h +0 -1
index 7bb82a7f56..128d00c77f 100644
@@ -15,7 +15,6 @@
 #define QEMU_OBJECT_H
 
 #include "qapi/qapi-builtin-types.h"
-#include "qemu/queue.h"
 #include "qemu/module.h"
 
 struct TypeImpl;
include/sysemu/cryptodev.h +1 -0
index 92bbb79131..a9afb7e5b5 100644
@@ -23,6 +23,7 @@
 #ifndef CRYPTODEV_H
 #define CRYPTODEV_H
 
+#include "qemu/queue.h"
 #include "qom/object.h"
 
 /**
include/sysemu/rng.h +1 -0
index 2a02f47771..9b22c156f8 100644
@@ -13,6 +13,7 @@
 #ifndef QEMU_RNG_H
 #define QEMU_RNG_H
 
+#include "qemu/queue.h"
 #include "qom/object.h"
 
 #define TYPE_RNG_BACKEND "rng-backend"
include/sysemu/sysemu.h +0 -1
index 984c439ac9..77f5df59b0 100644
@@ -3,7 +3,6 @@
 /* Misc. things related to the system emulator.  */
 
 #include "qapi/qapi-types-run-state.h"
-#include "qemu/queue.h"
 #include "qemu/timer.h"
 #include "qemu/notify.h"
 #include "qemu/main-loop.h"
linux-user/elfload.c +1 -0
index bd43c4817d..3365e192eb 100644
@@ -8,6 +8,7 @@
 #include "qemu.h"
 #include "disas/disas.h"
 #include "qemu/path.h"
+#include "qemu/queue.h"
 #include "qemu/guest-random.h"
 
 #ifdef _ARCH_PPC64
linux-user/main.c +1 -0
index 8ffc525195..47917bbb20 100644
@@ -28,6 +28,7 @@
 #include "qapi/error.h"
 #include "qemu.h"
 #include "qemu/path.h"
+#include "qemu/queue.h"
 #include "qemu/config-file.h"
 #include "qemu/cutils.h"
 #include "qemu/error-report.h"
linux-user/qemu.h +0 -1
index aac0334627..f6f5fe5fbb 100644
@@ -16,7 +16,6 @@
 #include "syscall_defs.h"
 #include "target_syscall.h"
 #include "exec/gdbstub.h"
-#include "qemu/queue.h"
 
 /* This is the size of the host kernel's sigset_t, needed where we make
  * direct system calls that take a sigset_t pointer and a size.
linux-user/syscall.c +1 -0
index 8367cb138d..8b41a03901 100644
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
 #include "qemu/path.h"
+#include "qemu/queue.h"
 #include <elf.h>
 #include <endian.h>
 #include <grp.h>
nbd/client.c +1 -0
index 4de30630c7..d554ae353d 100644
@@ -19,6 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "qemu/queue.h"
 #include "trace.h"
 #include "nbd-internal.h"
 #include "qemu/cutils.h"
nbd/nbd-internal.h +0 -1
index 049f83df77..ec3d2e2ebc 100644
@@ -28,7 +28,6 @@
 #endif
 
 #include "qemu/bswap.h"
-#include "qemu/queue.h"
 #include "qemu/main-loop.h"
 
 /* This is all part of the "official" NBD API.
nbd/server.c +1 -0
index 10faedcfc5..dbd2ff8555 100644
@@ -19,6 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "qemu/queue.h"
 #include "trace.h"
 #include "nbd-internal.h"
 #include "qemu/units.h"
qapi/qapi-dealloc-visitor.c +0 -1
index 89ccd905ec..d192724b13 100644
@@ -15,7 +15,6 @@
 #include "qemu/osdep.h"
 #include "qapi/dealloc-visitor.h"
 #include "qapi/qmp/qnull.h"
-#include "qemu/queue.h"
 #include "qapi/visitor-impl.h"
 
 struct QapiDeallocVisitor
target/i386/whpx-all.c +0 -1
index ed95105eae..2cf66f7804 100644
@@ -20,7 +20,6 @@
 #include "qemu/main-loop.h"
 #include "hw/boards.h"
 #include "qemu/error-report.h"
-#include "qemu/queue.h"
 #include "qapi/error.h"
 #include "migration/blocker.h"
 #include "whp-dispatch.h"
ui/kbd-state.c +0 -1
index 1668d17dda..62d42a7a22 100644
@@ -5,7 +5,6 @@
  */
 #include "qemu/osdep.h"
 #include "qemu/bitmap.h"
-#include "qemu/queue.h"
 #include "ui/console.h"
 #include "ui/input.h"
 #include "ui/kbd-state.h"
util/vfio-helpers.c +0 -0
index 2367fe8f7f..26ffd0d6b5 100644

util/vfio-helpers.c line 22

Quoted 7 lines
util/vfio-helpers.c +0 -1
@@ -17,7 +17,6 @@
 #include "exec/ramlist.h"
 #include "exec/cpu-common.h"
 #include "trace.h"
-#include "qemu/queue.h"
 #include "qemu/error-report.h"
 #include "standard-headers/linux/pci_regs.h"
 #include "qemu/event_notifier.h"

A lot less, nice.

#24 lore raw

PATCH v3 20/29 Include qemu/main-loop.h less

In reply to Markus Armbruster

In my "build everything" tree, changing qemu/main-loop.h triggers a recompile of some 5600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). It includes block/aio.h, which in turn includes qemu/event_notifier.h, qemu/notify.h, qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h, qemu/thread.h, qemu/timer.h, and a few more.

Include qemu/main-loop.h only where it's needed. Touching it now recompiles only some 1700 objects. For block/aio.h and qemu/event_notifier.h, these numbers drop from 5600 to 2800. For the others, they shrink only slightly.

---
 accel/kvm/kvm-all.c             | 1 +
 block.c                         | 1 +
 block/block-backend.c           | 1 +
 block/create.c                  | 1 +
 block/io.c                      | 1 +
 block/nbd.c                     | 1 +
 block/nfs.c                     | 1 +
 block/nvme.c                    | 1 +
 block/qcow2.c                   | 1 +
 block/qed.c                     | 1 +
 block/sheepdog.c                | 1 +
 block/throttle-groups.c         | 1 +
 blockdev.c                      | 1 +
 blockjob.c                      | 1 +
 chardev/baum.c                  | 1 +
 chardev/char-pipe.c             | 1 +
 chardev/char-win-stdio.c        | 1 +
 chardev/char-win.c              | 1 +
 dump/dump.c                     | 1 +
 fsdev/qemu-fsdev-throttle.c     | 1 +
 fsdev/qemu-fsdev-throttle.h     | 1 -
 hw/9pfs/9p.c                    | 1 +
 hw/9pfs/codir.c                 | 1 +
 hw/9pfs/cofile.c                | 1 +
 hw/9pfs/cofs.c                  | 1 +
 hw/9pfs/coth.c                  | 1 +
 hw/9pfs/coth.h                  | 1 -
 hw/9pfs/coxattr.c               | 1 +
 hw/9pfs/xen-9p-backend.c        | 1 +
 hw/arm/omap1.c                  | 1 +
 hw/block/dataplane/virtio-blk.c | 1 +
 hw/block/dataplane/xen-block.c  | 1 +
 hw/block/fdc.c                  | 1 +
 hw/block/xen-block.c            | 1 +
 hw/char/virtio-serial-bus.c     | 1 +
 hw/core/machine-qmp-cmds.c      | 1 +
 hw/display/qxl.c                | 1 +
 hw/dma/etraxfs_dma.c            | 1 +
 hw/i386/intel_iommu.c           | 1 +
 hw/i386/xen/xen-hvm.c           | 1 +
 hw/ide/ahci.c                   | 1 +
 hw/ide/core.c                   | 1 +
 hw/ide/qdev.c                   | 1 +
 hw/intc/s390_flic.c             | 1 +
 hw/m68k/mcf5206.c               | 1 +
 hw/m68k/mcf5208.c               | 1 +
 hw/misc/imx6_src.c              | 1 +
 hw/net/fsl_etsec/etsec.c        | 1 +
 hw/net/lan9118.c                | 1 +
 hw/net/vhost_net.c              | 2 +-
 hw/net/virtio-net.c             | 1 +
 hw/ppc/ppc.c                    | 1 +
 hw/ppc/ppc440_uc.c              | 1 +
 hw/ppc/spapr_hcall.c            | 1 +
 hw/ppc/spapr_rng.c              | 1 +
 hw/scsi/mptsas.c                | 1 +
 hw/scsi/scsi-disk.c             | 1 +
 hw/scsi/vmw_pvscsi.c            | 1 +
 hw/timer/allwinner-a10-pit.c    | 1 +
 hw/timer/altera_timer.c         | 1 +
 hw/timer/etraxfs_timer.c        | 1 +
 hw/timer/exynos4210_rtc.c       | 1 +
 hw/timer/milkymist-sysctl.c     | 1 +
 hw/usb/dev-uas.c                | 1 +
 hw/usb/hcd-ehci.c               | 1 +
 hw/usb/host-libusb.c            | 1 +
 hw/usb/xen-usb.c                | 1 +
 hw/vfio/ccw.c                   | 1 +
 hw/vfio/common.c                | 1 +
 hw/vfio/pci.c                   | 1 +
 hw/vfio/platform.c              | 1 +
 hw/virtio/vhost-backend.c       | 1 +
 hw/virtio/vhost-user.c          | 1 +
 hw/virtio/virtio-crypto.c       | 1 +
 hw/virtio/virtio-pmem.c         | 1 +
 hw/virtio/virtio.c              | 1 +
 hw/xen/xen-legacy-backend.c     | 1 +
 hw/xen/xen_pvdev.c              | 1 +
 include/block/block_int.h       | 1 -
 include/chardev/char-fe.h       | 1 +
 include/chardev/char-io.h       | 1 +
 include/chardev/char.h          | 2 +-
 include/hw/scsi/scsi.h          | 1 +
 include/sysemu/sysemu.h         | 1 -
 memory.c                        | 1 +
 migration/block.c               | 1 +
 migration/colo.c                | 1 +
 migration/migration.c           | 1 +
 migration/savevm.c              | 1 +
 nbd/nbd-internal.h              | 1 -
 net/can/can_socketcan.c         | 1 +
 net/tap-win32.c                 | 1 +
 net/tap.c                       | 1 +
 qemu-img.c                      | 1 +
 qom/cpu.c                       | 1 +
 replay/replay-internal.c        | 1 +
 target/arm/helper-a64.c         | 1 +
 target/arm/helper.c             | 2 ++
 target/arm/kvm.c                | 1 +
 target/arm/kvm64.c              | 1 +
 target/arm/m_helper.c           | 2 ++
 target/arm/psci.c               | 2 ++
 target/i386/kvm.c               | 1 +
 target/lm32/op_helper.c         | 1 +
 target/mips/kvm.c               | 1 +
 target/ppc/int_helper.c         | 2 ++
 target/ppc/kvm.c                | 1 +
 target/ppc/machine.c            | 1 +
 target/ppc/mem_helper.c         | 2 ++
 target/ppc/misc_helper.c        | 2 ++
 target/ppc/mmu_helper.c         | 2 ++
 target/ppc/translate.c          | 1 +
 target/s390x/kvm.c              | 1 +
 tcg/tcg-op-gvec.c               | 1 +
 tests/test-bdrv-drain.c         | 1 +
 tests/test-bdrv-graph-mod.c     | 1 +
 tests/test-block-backend.c      | 1 +
 tests/test-block-iothread.c     | 1 +
 tests/test-image-locking.c      | 1 +
 tests/test-replication.c        | 1 +
 tests/test-throttle.c           | 1 +
 ui/cocoa.m                      | 1 +
 ui/input-linux.c                | 1 +
 ui/spice-core.c                 | 1 +
 ui/spice-display.c              | 1 +
 ui/vnc-auth-sasl.h              | 1 -
 ui/vnc.c                        | 1 +
 util/oslib-posix.c              | 1 +
 128 files changed, 129 insertions(+), 8 deletions(-)
accel/kvm/kvm-all.c +1 -0
index d20da99c21..e1a44eccf5 100644
@@ -34,6 +34,7 @@
 #include "exec/ram_addr.h"
 #include "exec/address-spaces.h"
 #include "qemu/event_notifier.h"
+#include "qemu/main-loop.h"
 #include "trace.h"
 #include "hw/irq.h"
 #include "sysemu/sev.h"
block.c +1 -0
index cbd8da5f3b..1b67b4960f 100644
@@ -30,6 +30,7 @@
 #include "block/qdict.h"
 #include "qemu/error-report.h"
 #include "module_block.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
block/block-backend.c +1 -0
index 6aed80bf0b..4991ab5574 100644
@@ -21,6 +21,7 @@
 #include "qapi/error.h"
 #include "qapi/qapi-events-block.h"
 #include "qemu/id.h"
+#include "qemu/main-loop.h"
 #include "qemu/option.h"
 #include "trace.h"
 #include "migration/misc.h"
block/create.c +1 -0
index 95341219ef..1bd00ed5f8 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "block/block_int.h"
 #include "qemu/job.h"
+#include "qemu/main-loop.h"
 #include "qapi/qapi-commands-block-core.h"
 #include "qapi/qapi-visit-block-core.h"
 #include "qapi/clone-visitor.h"
block/io.c +1 -0
index 06305c6ea6..17a243cde9 100644
@@ -32,6 +32,7 @@
 #include "qemu/cutils.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 
 #define NOT_DONE 0x7fffffff /* used while emulated sync operation in progress */
 
block/nbd.c +1 -0
index 57c1a20581..56b1c6ec74 100644
@@ -33,6 +33,7 @@
 #include "qemu/uri.h"
 #include "qemu/option.h"
 #include "qemu/cutils.h"
+#include "qemu/main-loop.h"
 
 #include "qapi/qapi-visit-sockets.h"
 #include "qapi/qmp/qstring.h"
block/nfs.c +1 -0
index d93241b3bb..a1fe004c61 100644
@@ -32,6 +32,7 @@
 #include "block/qdict.h"
 #include "trace.h"
 #include "qemu/iov.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "qemu/uri.h"
block/nvme.c +1 -0
index 2c85713519..5be3a39b63 100644
@@ -17,6 +17,7 @@
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qstring.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/cutils.h"
 #include "qemu/option.h"
block/qcow2.c +1 -0
index 039bdc2f7e..59cff1d4cb 100644
@@ -26,6 +26,7 @@
 
 #include "block/qdict.h"
 #include "sysemu/block-backend.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qcow2.h"
 #include "qemu/error-report.h"
block/qed.c +1 -0
index 77c7cef175..d0dcc5f14d 100644
@@ -17,6 +17,7 @@
 #include "qapi/error.h"
 #include "qemu/timer.h"
 #include "qemu/bswap.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "trace.h"
block/sheepdog.c +1 -0
index 6f402e5d4d..31b0a820c2 100644
@@ -22,6 +22,7 @@
 #include "qapi/qobject-output-visitor.h"
 #include "qemu/uri.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "qemu/sockets.h"
block/throttle-groups.c +1 -0
index a5a2037924..77014c741b 100644
@@ -26,6 +26,7 @@
 #include "sysemu/block-backend.h"
 #include "block/throttle-groups.h"
 #include "qemu/throttle-options.h"
+#include "qemu/main-loop.h"
 #include "qemu/queue.h"
 #include "qemu/thread.h"
 #include "sysemu/qtest.h"
blockdev.c +1 -0
index 4d141e9a1f..64eab33ae9 100644
@@ -60,6 +60,7 @@
 #include "sysemu/qtest.h"
 #include "qemu/cutils.h"
 #include "qemu/help_option.h"
+#include "qemu/main-loop.h"
 #include "qemu/throttle-options.h"
 
 static QTAILQ_HEAD(, BlockDriverState) monitor_bdrv_states =
blockjob.c +1 -0
index 20b7f557da..45877c8bdd 100644
@@ -33,6 +33,7 @@
 #include "qapi/qapi-events-block-core.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/coroutine.h"
+#include "qemu/main-loop.h"
 #include "qemu/timer.h"
 
 /*
chardev/baum.c +1 -0
index 3dc81d5c6c..9c95e7bc79 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "chardev/char.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
 #include "hw/usb.h"
chardev/char-pipe.c +1 -0
index b200f9365c..94d714ffcd 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qapi/error.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "chardev/char.h"
chardev/char-win-stdio.c +1 -0
index 92d34e85aa..99afda353c 100644
@@ -24,6 +24,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "chardev/char-win.h"
 #include "chardev/char-win-stdio.h"
chardev/char-win.c +1 -0
index 0b8181339d..34825f683d 100644
@@ -23,6 +23,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
 #include "chardev/char-win.h"
dump/dump.c +1 -0
index c7b2301652..d430f5e929 100644
@@ -28,6 +28,7 @@
 #include "qapi/qapi-events-dump.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "hw/misc/vmcoreinfo.h"
 
 #ifdef TARGET_X86_64
fsdev/qemu-fsdev-throttle.c +1 -0
index cfd86418ac..fe1d76dc76 100644
@@ -16,6 +16,7 @@
 #include "qemu/error-report.h"
 #include "qemu-fsdev-throttle.h"
 #include "qemu/iov.h"
+#include "qemu/main-loop.h"
 #include "qemu/option.h"
 
 static void fsdev_throttle_read_timer_cb(void *opaque)
fsdev/qemu-fsdev-throttle.h +0 -1
index 7d6211d499..c98e2feab5 100644
@@ -16,7 +16,6 @@
 #define QEMU_FSDEV_THROTTLE_H
 
 #include "block/aio.h"
-#include "qemu/main-loop.h"
 #include "qemu/coroutine.h"
 #include "qemu/throttle.h"
 
hw/9pfs/9p.c +1 -0
index 55821343e5..cce2366219 100644
@@ -17,6 +17,7 @@
 #include "qapi/error.h"
 #include "qemu/error-report.h"
 #include "qemu/iov.h"
+#include "qemu/main-loop.h"
 #include "qemu/sockets.h"
 #include "virtio-9p.h"
 #include "fsdev/qemu-fsdev.h"
hw/9pfs/codir.c +1 -0
index 7cd6fce1ad..73f9a751e1 100644
@@ -15,6 +15,7 @@
 #include "fsdev/qemu-fsdev.h"
 #include "qemu/thread.h"
 #include "qemu/coroutine.h"
+#include "qemu/main-loop.h"
 #include "coth.h"
 
 int coroutine_fn v9fs_co_readdir(V9fsPDU *pdu, V9fsFidState *fidp,
hw/9pfs/cofile.c +1 -0
index 9c22837cda..83bb6c14e0 100644
@@ -15,6 +15,7 @@
 #include "fsdev/qemu-fsdev.h"
 #include "qemu/thread.h"
 #include "qemu/coroutine.h"
+#include "qemu/main-loop.h"
 #include "coth.h"
 
 int coroutine_fn v9fs_co_st_gen(V9fsPDU *pdu, V9fsPath *path, mode_t st_mode,
hw/9pfs/cofs.c +1 -0
index c62103221d..55991916ec 100644
@@ -15,6 +15,7 @@
 #include "fsdev/qemu-fsdev.h"
 #include "qemu/thread.h"
 #include "qemu/coroutine.h"
+#include "qemu/main-loop.h"
 #include "coth.h"
 
 static ssize_t __readlink(V9fsState *s, V9fsPath *path, V9fsString *buf)
hw/9pfs/coth.c +1 -0
index c3b43368f8..9778f24b00 100644
@@ -15,6 +15,7 @@
 #include "qemu/osdep.h"
 #include "block/thread-pool.h"
 #include "qemu/coroutine.h"
+#include "qemu/main-loop.h"
 #include "coth.h"
 
 /* Called from QEMU I/O thread.  */
hw/9pfs/coth.h +0 -1
index 19e4d9287e..c2cdc7a9ea 100644
@@ -17,7 +17,6 @@
 
 #include "qemu/thread.h"
 #include "qemu/coroutine.h"
-#include "qemu/main-loop.h"
 #include "9p.h"
 
 /*
hw/9pfs/coxattr.c +1 -0
index 154392eade..0e00ffaa0d 100644
@@ -15,6 +15,7 @@
 #include "fsdev/qemu-fsdev.h"
 #include "qemu/thread.h"
 #include "qemu/coroutine.h"
+#include "qemu/main-loop.h"
 #include "coth.h"
 
 int coroutine_fn v9fs_co_llistxattr(V9fsPDU *pdu, V9fsPath *path, void *value,
hw/9pfs/xen-9p-backend.c +1 -0
index c50b1961d3..71eebe12dd 100644
@@ -15,6 +15,7 @@
 #include "hw/9pfs/xen-9pfs.h"
 #include "qapi/error.h"
 #include "qemu/config-file.h"
+#include "qemu/main-loop.h"
 #include "qemu/option.h"
 #include "fsdev/qemu-fsdev.h"
 
hw/arm/omap1.c +1 -0
index cce671014b..ce9247118e 100644
@@ -19,6 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
hw/block/dataplane/virtio-blk.c +1 -0
index 158c78f852..9299a1a7c2 100644
@@ -16,6 +16,7 @@
 #include "qapi/error.h"
 #include "trace.h"
 #include "qemu/iov.h"
+#include "qemu/main-loop.h"
 #include "qemu/thread.h"
 #include "qemu/error-report.h"
 #include "hw/virtio/virtio-access.h"
hw/block/dataplane/xen-block.c +1 -0
index 71c63330ac..3b9caeb2fa 100644
@@ -20,6 +20,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qapi/error.h"
 #include "hw/xen/xen_common.h"
 #include "hw/block/xen_blkif.h"
hw/block/fdc.c +1 -0
index 7542c8f273..e80439482c 100644
@@ -41,6 +41,7 @@
 #include "sysemu/blockdev.h"
 #include "sysemu/sysemu.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "trace.h"
 
hw/block/xen-block.c +1 -0
index 848a0ad0ea..aef39536ac 100644
@@ -7,6 +7,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "qapi/error.h"
hw/char/virtio-serial-bus.c +1 -0
index b868e54d72..272cfb6049 100644
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/iov.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "migration/qemu-file-types.h"
 #include "monitor/monitor.h"
hw/core/machine-qmp-cmds.c +1 -0
index 5bd95b8ab0..d8284671f0 100644
@@ -13,6 +13,7 @@
 #include "qapi/error.h"
 #include "qapi/qapi-commands-machine.h"
 #include "qapi/qmp/qerror.h"
+#include "qemu/main-loop.h"
 #include "sysemu/hostmem.h"
 #include "sysemu/hw_accel.h"
 #include "sysemu/numa.h"
hw/display/qxl.c +1 -0
index 4a44712fde..539ede12c0 100644
@@ -26,6 +26,7 @@
 #include "qemu/timer.h"
 #include "qemu/queue.h"
 #include "qemu/atomic.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "sysemu/sysemu.h"
 #include "migration/blocker.h"
hw/dma/etraxfs_dma.c +1 -0
index 4285443c81..36da22fa90 100644
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/irq.h"
+#include "qemu/main-loop.h"
 #include "exec/address-spaces.h"
 #include "sysemu/sysemu.h"
 
hw/i386/intel_iommu.c +1 -0
index 000de6b9ce..50fe5cc1a9 100644
@@ -21,6 +21,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qapi/error.h"
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
hw/i386/xen/xen-hvm.c +1 -0
index 63abace70a..3e15ffc828 100644
@@ -23,6 +23,7 @@
 #include "qapi/error.h"
 #include "qapi/qapi-commands-misc.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/range.h"
 #include "sysemu/xen-mapcache.h"
 #include "trace.h"
hw/ide/ahci.c +1 -0
index 1d5a54b29e..378c1f360f 100644
@@ -28,6 +28,7 @@
 
 #include "qemu/error-report.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/dma.h"
hw/ide/core.c +1 -0
index 005b4d5ef4..61cb3b26ab 100644
@@ -27,6 +27,7 @@
 #include "hw/isa/isa.h"
 #include "migration/vmstate.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/timer.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/blockdev.h"
hw/ide/qdev.c +1 -0
index d85c31a0ee..d30bdd70ee 100644
@@ -22,6 +22,7 @@
 #include "qapi/error.h"
 #include "qapi/qapi-types-block.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "hw/ide/internal.h"
 #include "sysemu/block-backend.h"
hw/intc/s390_flic.c +1 -0
index 83c72ee18d..f97a6e9867 100644
@@ -12,6 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "hw/sysbus.h"
 #include "hw/s390x/ioinst.h"
hw/m68k/mcf5206.c +1 -0
index 5ee1498f48..a9c2c95b0d 100644
@@ -8,6 +8,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "cpu.h"
 #include "hw/hw.h"
 #include "hw/irq.h"
hw/m68k/mcf5208.c +1 -0
index 3a21c62809..012710d057 100644
@@ -9,6 +9,7 @@
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
hw/misc/imx6_src.c +1 -0
index 0be683de06..b9d86fe530 100644
@@ -14,6 +14,7 @@
 #include "sysemu/sysemu.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "arm-powerctl.h"
 #include "qom/cpu.h"
hw/net/fsl_etsec/etsec.c +1 -0
index e217238296..e5c902ada4 100644
@@ -34,6 +34,7 @@
 #include "etsec.h"
 #include "registers.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 
 /* #define HEX_DUMP */
hw/net/lan9118.c +1 -0
index 1d32cb79e2..ea20a92cda 100644
@@ -21,6 +21,7 @@
 #include "sysemu/sysemu.h"
 #include "hw/ptimer.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 /* For crc32 */
 #include <zlib.h>
hw/net/vhost_net.c +1 -1
index a6b719035c..e975700f95 100644
@@ -22,7 +22,7 @@
 #include "hw/virtio/virtio-net.h"
 #include "net/vhost_net.h"
 #include "qemu/error-report.h"
-
+#include "qemu/main-loop.h"
 
 #include <sys/socket.h>
 #include <net/if.h>
hw/net/virtio-net.c +1 -0
index b9e1cd71cf..cdf4d774da 100644
@@ -13,6 +13,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/iov.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "hw/virtio/virtio.h"
 #include "net/net.h"
hw/ppc/ppc.c +1 -0
index a1192d7889..a28aca453d 100644
@@ -31,6 +31,7 @@
 #include "sysemu/sysemu.h"
 #include "sysemu/cpus.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/error-report.h"
 #include "sysemu/kvm.h"
 #include "kvm_ppc.h"
hw/ppc/ppc440_uc.c +1 -0
index e7f42d78a1..761d551967 100644
@@ -13,6 +13,7 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "cpu.h"
 #include "hw/irq.h"
hw/ppc/spapr_hcall.c +1 -0
index 6808d4cda8..0f4e6b7120 100644
@@ -3,6 +3,7 @@
 #include "sysemu/hw_accel.h"
 #include "sysemu/sysemu.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/error-report.h"
 #include "cpu.h"
hw/ppc/spapr_rng.c +1 -0
index 0e1c7ebcf8..cfe43eaae9 100644
@@ -21,6 +21,7 @@
 #include "qapi/error.h"
 #include "cpu.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/device_tree.h"
hw/scsi/mptsas.c +1 -0
index b32f4c0ca9..efa54a30c5 100644
@@ -27,6 +27,7 @@
 #include "sysemu/dma.h"
 #include "hw/pci/msi.h"
 #include "qemu/iov.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "hw/scsi/scsi.h"
 #include "scsi/constants.h"
hw/scsi/scsi-disk.c +1 -0
index 5fbdecb434..aa34297a5d 100644
@@ -23,6 +23,7 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "hw/scsi/scsi.h"
 #include "migration/qemu-file-types.h"
hw/scsi/vmw_pvscsi.c +1 -0
index 85af638bc7..7e27bce43e 100644
@@ -27,6 +27,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "hw/scsi/scsi.h"
 #include "migration/vmstate.h"
hw/timer/allwinner-a10-pit.c +1 -0
index b9d057df5d..904da4fc88 100644
@@ -22,6 +22,7 @@
 #include "hw/timer/allwinner-a10-pit.h"
 #include "migration/vmstate.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 
 static void a10_pit_update_irq(AwA10PITState *s)
hw/timer/altera_timer.c +1 -0
index 0dd4f321f7..51971e44ca 100644
@@ -19,6 +19,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
 
hw/timer/etraxfs_timer.c +1 -0
index 2fd54ad4dc..739276ecb8 100644
@@ -26,6 +26,7 @@
 #include "hw/sysbus.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/timer.h"
 #include "hw/irq.h"
hw/timer/exynos4210_rtc.c +1 -0
index f79b970c5e..5c954cfa01 100644
@@ -28,6 +28,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
hw/timer/milkymist-sysctl.c +1 -0
index 900b0b62a9..4d75d73a93 100644
@@ -30,6 +30,7 @@
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 
 enum {
hw/usb/dev-uas.c +1 -0
index 525bc1e590..c7d215d4ef 100644
@@ -14,6 +14,7 @@
 #include "qemu/config-file.h"
 #include "trace.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 
 #include "hw/usb.h"
hw/usb/hcd-ehci.c +1 -0
index 45ff4f4115..d7d1ecd45d 100644
@@ -34,6 +34,7 @@
 #include "migration/vmstate.h"
 #include "trace.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 
 #define FRAME_TIMER_FREQ 1000
 #define FRAME_TIMER_NS   (NANOSECONDS_PER_SECOND / FRAME_TIMER_FREQ)
hw/usb/host-libusb.c +1 -0
index 6f5338832a..c043487298 100644
@@ -43,6 +43,7 @@
 #include "migration/vmstate.h"
 #include "monitor/monitor.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "sysemu/sysemu.h"
 #include "trace.h"
hw/usb/xen-usb.c +1 -0
index dfbb418e77..1fc2f32ce9 100644
@@ -24,6 +24,7 @@
 #include <sys/user.h>
 
 #include "qemu/config-file.h"
+#include "qemu/main-loop.h"
 #include "qemu/option.h"
 #include "hw/sysbus.h"
 #include "hw/usb.h"
hw/vfio/ccw.c +1 -0
index 16f200e6fe..c78a85a864 100644
@@ -28,6 +28,7 @@
 #include "hw/s390x/ccw-device.h"
 #include "exec/address-spaces.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 
 struct VFIOCCWDevice {
hw/vfio/common.c +1 -0
index a363b4495f..3e03c495d8 100644
@@ -31,6 +31,7 @@
 #include "exec/memory.h"
 #include "hw/hw.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/range.h"
 #include "sysemu/balloon.h"
 #include "sysemu/kvm.h"
hw/vfio/pci.c +1 -0
index 48ac0f5a34..ab3ee2ca7a 100644
@@ -28,6 +28,7 @@
 #include "hw/pci/pci_bridge.h"
 #include "migration/vmstate.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "qemu/range.h"
hw/vfio/platform.c +1 -0
index 2ec9c9f49b..ff5f805d68 100644
@@ -22,6 +22,7 @@
 #include "hw/vfio/vfio-platform.h"
 #include "migration/vmstate.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/range.h"
 #include "sysemu/sysemu.h"
hw/virtio/vhost-backend.c +1 -0
index 96b8d3c95d..48905383f8 100644
@@ -12,6 +12,7 @@
 #include "hw/virtio/vhost.h"
 #include "hw/virtio/vhost-backend.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "standard-headers/linux/vhost_types.h"
 
 #ifdef CONFIG_VHOST_KERNEL
hw/virtio/vhost-user.c +1 -0
index 4ca5b2551e..02a9b25199 100644
@@ -18,6 +18,7 @@
 #include "chardev/char-fe.h"
 #include "sysemu/kvm.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/sockets.h"
 #include "sysemu/cryptodev.h"
 #include "migration/migration.h"
hw/virtio/virtio-crypto.c +1 -0
index 45187d3344..dbfaee6d7c 100644
@@ -13,6 +13,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/iov.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "hw/qdev.h"
 #include "qapi/error.h"
hw/virtio/virtio-pmem.c +1 -0
index 17c196d107..ca487f63d2 100644
@@ -15,6 +15,7 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "hw/virtio/virtio-pmem.h"
 #include "hw/virtio/virtio-access.h"
 #include "standard-headers/linux/virtio_ids.h"
hw/virtio/virtio.c +1 -0
index 79c7a910cc..f4c8337930 100644
@@ -17,6 +17,7 @@
 #include "trace.h"
 #include "exec/address-spaces.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "hw/virtio/virtio.h"
 #include "migration/qemu-file-types.h"
hw/xen/xen-legacy-backend.c +1 -0
index 2831940ae7..47a7c9760a 100644
@@ -28,6 +28,7 @@
 #include "hw/sysbus.h"
 #include "hw/boards.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qapi/error.h"
 #include "hw/xen/xen-legacy-backend.h"
 #include "hw/xen/xen_pvdev.h"
hw/xen/xen_pvdev.c +1 -0
index 6ef09cbf9d..43a336aabf 100644
@@ -19,6 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "hw/qdev-core.h"
 #include "hw/xen/xen-legacy-backend.h"
 #include "hw/xen/xen_pvdev.h"
include/block/block_int.h +0 -1
index 3aa1e832a8..6207a105ff 100644
@@ -33,7 +33,6 @@
 #include "qemu/timer.h"
 #include "qemu/hbitmap.h"
 #include "block/snapshot.h"
-#include "qemu/main-loop.h"
 #include "qemu/throttle.h"
 
 #define BLOCK_FLAG_LAZY_REFCOUNTS   8
include/chardev/char-fe.h +1 -0
index aa1b864ccd..67601dc9a4 100644
@@ -2,6 +2,7 @@
 #define QEMU_CHAR_FE_H
 
 #include "chardev/char.h"
+#include "qemu/main-loop.h"
 
 typedef void IOEventHandler(void *opaque, int event);
 typedef int BackendChangeHandler(void *opaque);
include/chardev/char-io.h +1 -0
index 1709b59c9f..ac379ea70e 100644
@@ -26,6 +26,7 @@
 
 #include "io/channel.h"
 #include "chardev/char.h"
+#include "qemu/main-loop.h"
 
 /* Can only be used for read */
 GSource *io_add_watch_poll(Chardev *chr,
include/chardev/char.h +1 -1
index c0b57f7685..087b202b62 100644
@@ -2,8 +2,8 @@
 #define QEMU_CHAR_H
 
 #include "qapi/qapi-types-char.h"
-#include "qemu/main-loop.h"
 #include "qemu/bitmap.h"
+#include "qemu/thread.h"
 #include "qom/object.h"
 
 #define IAC_EOR 239
include/hw/scsi/scsi.h +1 -0
index 426566a5c6..15a763dc18 100644
@@ -2,6 +2,7 @@
 #define QEMU_HW_SCSI_H
 
 #include "hw/qdev.h"
+#include "block/aio.h"
 #include "hw/block/block.h"
 #include "sysemu/sysemu.h"
 #include "scsi/utils.h"
include/sysemu/sysemu.h +0 -1
index 77f5df59b0..ac18a1184a 100644
@@ -5,7 +5,6 @@
 #include "qapi/qapi-types-run-state.h"
 #include "qemu/timer.h"
 #include "qemu/notify.h"
-#include "qemu/main-loop.h"
 #include "qemu/bitmap.h"
 #include "qemu/uuid.h"
 #include "qom/object.h"
memory.c +1 -0
index 09d9b254fd..cbf0e5a6cc 100644
@@ -21,6 +21,7 @@
 #include "qapi/visitor.h"
 #include "qemu/bitops.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/qemu-print.h"
 #include "qom/object.h"
 #include "trace-root.h"
migration/block.c +1 -0
index 91f98ef44a..e81fd7e14f 100644
@@ -16,6 +16,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/cutils.h"
 #include "qemu/queue.h"
 #include "block.h"
migration/colo.c +1 -0
index 0b5b620391..0602e6bbe4 100644
@@ -23,6 +23,7 @@
 #include "io/channel-buffer.h"
 #include "trace.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/rcu.h"
 #include "migration/failover.h"
 #ifdef CONFIG_REPLICATION
migration/migration.c +1 -0
index 8a607fe1e2..85e5d22e32 100644
@@ -16,6 +16,7 @@
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "migration/blocker.h"
 #include "exec.h"
 #include "fd.h"
migration/savevm.c +1 -0
index 89e8f4c180..b8f734537a 100644
@@ -51,6 +51,7 @@
 #include "exec/target_page.h"
 #include "trace.h"
 #include "qemu/iov.h"
+#include "qemu/main-loop.h"
 #include "block/snapshot.h"
 #include "qemu/cutils.h"
 #include "io/channel-buffer.h"
nbd/nbd-internal.h +0 -1
index ec3d2e2ebc..60629ef160 100644
@@ -28,7 +28,6 @@
 #endif
 
 #include "qemu/bswap.h"
-#include "qemu/main-loop.h"
 
 /* This is all part of the "official" NBD API.
  *
net/can/can_socketcan.c +1 -0
index 3dec108684..8a6ffad40c 100644
@@ -27,6 +27,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qapi/error.h"
 #include "chardev/char.h"
net/tap-win32.c +1 -0
index 662f9b63e1..9cdef47286 100644
@@ -35,6 +35,7 @@
 #include "net/tap.h"            /* tap_has_ufo, ... */
 #include "sysemu/sysemu.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include <windows.h>
 #include <winioctl.h>
 
net/tap.c +1 -0
index fc38029f41..6207f61f84 100644
@@ -40,6 +40,7 @@
 #include "qemu-common.h"
 #include "qemu/cutils.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/sockets.h"
 
 #include "net/tap.h"
qemu-img.c +1 -0
index 79983772de..a398fd44d6 100644
@@ -38,6 +38,7 @@
 #include "qemu/option.h"
 #include "qemu/error-report.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/units.h"
 #include "qom/object_interfaces.h"
qom/cpu.c +1 -0
index fdc1af8f40..cdb8c71b6b 100644
@@ -24,6 +24,7 @@
 #include "sysemu/hw_accel.h"
 #include "qemu/notify.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "exec/log.h"
 #include "qemu/error-report.h"
 #include "qemu/qemu-print.h"
replay/replay-internal.c +1 -0
index 9e41ed1dcf..9f7a76ca32 100644
@@ -13,6 +13,7 @@
 #include "sysemu/replay.h"
 #include "replay-internal.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "sysemu/sysemu.h"
 
 /* Mutex to protect reading and writing events to the log.
target/arm/helper-a64.c +1 -0
index 060699b901..616d62c7fc 100644
@@ -23,6 +23,7 @@
 #include "exec/helper-proto.h"
 #include "qemu/host-utils.h"
 #include "qemu/log.h"
+#include "qemu/main-loop.h"
 #include "sysemu/sysemu.h"
 #include "qemu/bitops.h"
 #include "internals.h"
target/arm/helper.c +2 -0
index 75b66bf844..210f5831e3 100644
@@ -5,6 +5,7 @@
  *
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
+
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "target/arm/idau.h"
@@ -14,6 +15,7 @@
 #include "exec/gdbstub.h"
 #include "exec/helper-proto.h"
 #include "qemu/host-utils.h"
+#include "qemu/main-loop.h"
 #include "sysemu/sysemu.h"
 #include "qemu/bitops.h"
 #include "qemu/crc32c.h"
target/arm/kvm.c +1 -0
index 36a1e60bd4..b5713e3ffe 100644
@@ -16,6 +16,7 @@
 #include "qemu-common.h"
 #include "qemu/timer.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
 #include "sysemu/kvm_int.h"
target/arm/kvm64.c +1 -0
index 22d19c9aec..c76d3d799a 100644
@@ -21,6 +21,7 @@
 #include "qemu/timer.h"
 #include "qemu/error-report.h"
 #include "qemu/host-utils.h"
+#include "qemu/main-loop.h"
 #include "exec/gdbstub.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
target/arm/m_helper.c +2 -0
index 84609f446e..cde5195d28 100644
@@ -5,6 +5,7 @@
  *
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
+
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "target/arm/idau.h"
@@ -14,6 +15,7 @@
 #include "exec/gdbstub.h"
 #include "exec/helper-proto.h"
 #include "qemu/host-utils.h"
+#include "qemu/main-loop.h"
 #include "sysemu/sysemu.h"
 #include "qemu/bitops.h"
 #include "qemu/crc32c.h"
target/arm/psci.c +2 -0
index a74d78802a..af1d5a551e 100644
@@ -15,10 +15,12 @@
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
+
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "kvm-consts.h"
+#include "qemu/main-loop.h"
 #include "sysemu/sysemu.h"
 #include "internals.h"
 #include "arm-powerctl.h"
target/i386/kvm.c +1 -0
index 30ed209e6b..fd55fb55e9 100644
@@ -31,6 +31,7 @@
 
 #include "exec/gdbstub.h"
 #include "qemu/host-utils.h"
+#include "qemu/main-loop.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
 #include "hw/i386/pc.h"
target/lm32/op_helper.c +1 -0
index d184550a7b..99ca76c04f 100644
@@ -2,6 +2,7 @@
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "qemu/host-utils.h"
+#include "qemu/main-loop.h"
 
 #include "hw/lm32/lm32_pic.h"
 #include "hw/char/lm32_juart.h"
target/mips/kvm.c +1 -0
index 938f8f144b..83ee0026ac 100644
@@ -18,6 +18,7 @@
 #include "cpu.h"
 #include "internal.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/timer.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
target/ppc/int_helper.c +2 -0
index 5c07ef3e4d..8f037af956 100644
@@ -16,10 +16,12 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
+
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "internal.h"
 #include "qemu/host-utils.h"
+#include "qemu/main-loop.h"
 #include "exec/helper-proto.h"
 #include "crypto/aes.h"
 #include "fpu/softfloat.h"
target/ppc/kvm.c +1 -0
index 4b05014a64..6836a4afb3 100644
@@ -47,6 +47,7 @@
 #include "exec/ram_addr.h"
 #include "sysemu/hostmem.h"
 #include "qemu/cutils.h"
+#include "qemu/main-loop.h"
 #include "qemu/mmap-alloc.h"
 #include "elf.h"
 #include "sysemu/kvm_int.h"
target/ppc/machine.c +1 -0
index 199f5cef8f..d6638ee60e 100644
@@ -7,6 +7,7 @@
 #include "mmu-hash64.h"
 #include "migration/cpu.h"
 #include "qapi/error.h"
+#include "qemu/main-loop.h"
 #include "kvm_ppc.h"
 #include "exec/helper-proto.h"
 
target/ppc/mem_helper.c +2 -0
index 6f4ffa3661..1351b53f28 100644
@@ -16,10 +16,12 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
+
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "qemu/host-utils.h"
+#include "qemu/main-loop.h"
 #include "exec/helper-proto.h"
 #include "helper_regs.h"
 #include "exec/cpu_ldst.h"
target/ppc/misc_helper.c +2 -0
index 49a8a02363..2318f3ab45 100644
@@ -16,11 +16,13 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
+
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 
 #include "helper_regs.h"
 
target/ppc/mmu_helper.c +2 -0
index 261a8fe707..55f7a7f16a 100644
@@ -16,6 +16,7 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
+
 #include "qemu/osdep.h"
 #include "qemu/units.h"
 #include "cpu.h"
@@ -29,6 +30,7 @@
 #include "exec/log.h"
 #include "helper_regs.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/qemu-print.h"
 #include "mmu-book3s-v3.h"
 #include "mmu-radix64.h"
target/ppc/translate.c +1 -0
index 4a5de28036..9f9553afb4 100644
@@ -26,6 +26,7 @@
 #include "tcg-op.h"
 #include "tcg-op-gvec.h"
 #include "qemu/host-utils.h"
+#include "qemu/main-loop.h"
 #include "exec/cpu_ldst.h"
 
 #include "exec/helper-proto.h"
target/s390x/kvm.c +1 -0
index b465bb599e..55d1a14588 100644
@@ -32,6 +32,7 @@
 #include "qemu/error-report.h"
 #include "qemu/timer.h"
 #include "qemu/units.h"
+#include "qemu/main-loop.h"
 #include "qemu/mmap-alloc.h"
 #include "qemu/log.h"
 #include "sysemu/sysemu.h"
tcg/tcg-op-gvec.c +1 -0
index 17679b6e2f..5c95ecd51c 100644
@@ -21,6 +21,7 @@
 #include "tcg.h"
 #include "tcg-op.h"
 #include "tcg-op-gvec.h"
+#include "qemu/main-loop.h"
 #include "tcg-gvec-desc.h"
 
 #define MAX_UNROLL  4
tests/test-bdrv-drain.c +1 -0
index 03fa1142a1..481b7508df 100644
@@ -27,6 +27,7 @@
 #include "block/blockjob_int.h"
 #include "sysemu/block-backend.h"
 #include "qapi/error.h"
+#include "qemu/main-loop.h"
 #include "iothread.h"
 
 static QemuEvent done_event;
tests/test-bdrv-graph-mod.c +1 -0
index cfeec36566..a007754d9e 100644
@@ -20,6 +20,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
+#include "qemu/main-loop.h"
 #include "block/block_int.h"
 #include "sysemu/block-backend.h"
 
tests/test-block-backend.c +1 -0
index 5b5d6845c0..2fb1a444bd 100644
@@ -26,6 +26,7 @@
 #include "block/block.h"
 #include "sysemu/block-backend.h"
 #include "qapi/error.h"
+#include "qemu/main-loop.h"
 
 static void test_drain_aio_error_flush_cb(void *opaque, int ret)
 {
tests/test-block-iothread.c +1 -0
index 1949d5e61a..e81b5b8dc4 100644
@@ -28,6 +28,7 @@
 #include "sysemu/block-backend.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
+#include "qemu/main-loop.h"
 #include "iothread.h"
 
 static int coroutine_fn bdrv_test_co_prwv(BlockDriverState *bs,
tests/test-image-locking.c +1 -0
index 7614cbf90c..ba057bd66c 100644
@@ -29,6 +29,7 @@
 #include "sysemu/block-backend.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
+#include "qemu/main-loop.h"
 
 static BlockBackend *open_image(const char *path,
                                 uint64_t perm, uint64_t shared_perm,
tests/test-replication.c +1 -0
index f085d1993a..4747d8a6be 100644
@@ -13,6 +13,7 @@
 #include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/option.h"
+#include "qemu/main-loop.h"
 #include "replication.h"
 #include "block/block_int.h"
 #include "block/qdict.h"
tests/test-throttle.c +1 -0
index a28812260e..083e1f9ba8 100644
@@ -18,6 +18,7 @@
 #include "qapi/error.h"
 #include "qemu/throttle.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "block/throttle-groups.h"
 #include "sysemu/block-backend.h"
ui/cocoa.m +1 -0
index c2984028c5..c5a0d33c29 100644
@@ -36,6 +36,7 @@
 #include "qapi/qapi-commands-misc.h"
 #include "sysemu/blockdev.h"
 #include "qemu-version.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include <Carbon/Carbon.h>
 #include "qom/cpu.h"
ui/input-linux.c +1 -0
index c8d22f99d9..e3fa799c34 100644
@@ -7,6 +7,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/config-file.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/sockets.h"
 #include "sysemu/sysemu.h"
ui/spice-core.c +1 -0
index 16478ecd45..a395d7ccd4 100644
@@ -22,6 +22,7 @@
 
 #include "ui/qemu-spice.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/thread.h"
 #include "qemu/timer.h"
ui/spice-display.c +1 -0
index 104df23025..0c65ae2fe3 100644
@@ -18,6 +18,7 @@
 #include "qemu/osdep.h"
 #include "ui/qemu-spice.h"
 #include "qemu/timer.h"
+#include "qemu/main-loop.h"
 #include "qemu/option.h"
 #include "qemu/queue.h"
 #include "ui/console.h"
ui/vnc-auth-sasl.h +0 -1
index fb55fe04ca..1bfb86c6f5 100644
@@ -30,7 +30,6 @@
 typedef struct VncStateSASL VncStateSASL;
 typedef struct VncDisplaySASL VncDisplaySASL;
 
-#include "qemu/main-loop.h"
 #include "authz/base.h"
 
 struct VncStateSASL {
ui/vnc.c +1 -0
index f47f726681..4812ed29d0 100644
@@ -31,6 +31,7 @@
 #include "hw/qdev-core.h"
 #include "sysemu/sysemu.h"
 #include "qemu/error-report.h"
+#include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "qemu/sockets.h"
util/oslib-posix.c +1 -0
index fe0309ce7a..5fda67dedf 100644
@@ -36,6 +36,7 @@
 #include "trace.h"
 #include "qapi/error.h"
 #include "qemu/sockets.h"
+#include "qemu/thread.h"
 #include <libgen.h>
 #include <sys/signal.h>
 #include "qemu/cutils.h"
Signature · 1 line
2.21.0
#25 lore raw

Re: [Qemu-devel] [PATCH v3 20/29] Include qemu/main-loop.h less

Quoted 14 lines · Markus Armbruster

In my "build everything" tree, changing qemu/main-loop.h triggers a recompile of some 5600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). It includes block/aio.h, which in turn includes qemu/event_notifier.h, qemu/notify.h, qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h, qemu/thread.h, qemu/timer.h, and a few more.

Include qemu/main-loop.h only where it's needed. Touching it now recompiles only some 1700 objects. For block/aio.h and qemu/event_notifier.h, these numbers drop from 5600 to 2800. For the others, they shrink only slightly.

---

[...]

include/sysemu/sysemu.h line 10

Quoted 12 lines
include/sysemu/sysemu.h +0 -1
index 77f5df59b0..ac18a1184a 100644
@@ -5,7 +5,6 @@
 #include "qapi/qapi-types-run-state.h"
 #include "qemu/timer.h"
 #include "qemu/notify.h"
-#include "qemu/main-loop.h"
 #include "qemu/bitmap.h"
 #include "qemu/uuid.h"
 #include "qom/object.h"

netmap failing again :S

$ make docker-image-debian-amd64 V=1 DEBUG=1
[...]
  CC      net/netmap.o
net/netmap.c: In function 'netmap_update_fd_handler':
net/netmap.c:109:5: error: implicit declaration of function
'qemu_set_fd_handler' [-Werror=implicit-function-declaration]
     qemu_set_fd_handler(s->nmd->fd,
     ^~~~~~~~~~~~~~~~~~~
net/netmap.c:109:5: error: nested extern declaration of
'qemu_set_fd_handler' [-Werror=nested-externs]
#26 lore raw

Re: [Qemu-devel] [PATCH v3 20/29] Include qemu/main-loop.h less

On 8/9/19 11:42 AM, Philippe Mathieu-Daudé wrote:
[...]

Quoted 3 lines

netmap failing again :S

$ make docker-image-debian-amd64 V=1 DEBUG=1

To clarify an incomplete paste, this command doesn't build QEMU. It build the docker image, start an container instance, and keep an interactive shell opened, so you can run ./configure && make inside the container.

Quoted 10 lines

[...]
CC net/netmap.o
net/netmap.c: In function 'netmap_update_fd_handler':
net/netmap.c:109:5: error: implicit declaration of function 'qemu_set_fd_handler' [-Werror=implicit-function-declaration]

     qemu_set_fd_handler(s->nmd->fd,
     ^~~~~~~~~~~~~~~~~~~

net/netmap.c:109:5: error: nested extern declaration of 'qemu_set_fd_handler' [-Werror=nested-externs]

#27 lore raw

Re: [Qemu-devel] [PATCH v3 20/29] Include qemu/main-loop.h less

In reply to Philippe Mathieu-Daudé

On 8/9/19 11:42 AM, Philippe Mathieu-Daudé wrote:
[...]

Quoted 12 lines

netmap failing again :S

$ make docker-image-debian-amd64 V=1 DEBUG=1
[...]
  CC      net/netmap.o
net/netmap.c: In function 'netmap_update_fd_handler':
net/netmap.c:109:5: error: implicit declaration of function
'qemu_set_fd_handler' [-Werror=implicit-function-declaration]
     qemu_set_fd_handler(s->nmd->fd,
     ^~~~~~~~~~~~~~~~~~~
net/netmap.c:109:5: error: nested extern declaration of
'qemu_set_fd_handler' [-Werror=nested-externs]

Since it might not be obvious to see how helpful/powerful is Docker, I gathered few notes (already posted once) about how I use it (often bisecting).

# Automatically create a base image (the image is then cached)

$ make docker-image-debian-s390x-cross

# Create a out-of-tree build directory

$ mkdir build/docker_s390x

# Run ./configure
#
# --rm : Use a temp copy of the base image (do not modify it) # -v ...: Mount the current directory within the container # -w ...: Start the shell in the out-of-tree directory # -u ...: Use same UID as my user so I can remove the files after # $QEMU_CONFIGURE_OPTS contains the cross-compile options #

$ docker run --rm \
  -v $PWD:$PWD \
  -w $PWD/build/docker_s390x \
  -u $UID \
  qemu:debian-s390x-cross \
    \
    sh -c "../../configure \$QEMU_CONFIGURE_OPTS"

I use 'sh -c' to escape $QEMU_CONFIGURE_OPTS, there might be a cleaner way to do this.

# Stupid step to speed up bisection
# This will:
# - clone submodules if necessary
# - build slirp
# - build fdt
# - build capstone
# - generated bunch of headers
# - generated bunch of trace files

$ docker run --rm \
  -v $PWD:$PWD \
  -w $PWD/build/docker_s390x \
  -u $UID \
  qemu:debian-s390x-cross \
    \
    make stubs/qtest.o

Now the directory is ready for building/bisecting.

I.e. build a single file:

$ docker run --rm \
  -v $PWD:$PWD \
  -w $PWD/build/docker_s390x \
  -u $UID \
  qemu:debian-s390x-cross \
    \
    make -C s390x-softmmu hw/intc/s390_flic_kvm.o

make: Entering directory 'build/docker_s390x/s390x-softmmu'
CC hw/intc/s390_flic_kvm.o
hw/intc/s390_flic_kvm.c: In function 'kvm_flic_save':
hw/intc/s390_flic_kvm.c:395:9: error: implicit declaration of function 'qemu_put_be64' [-Werror=implicit-function-declaration]

         qemu_put_be64(f, FLIC_FAILED);
         ^~~~~~~~~~~~~

hw/intc/s390_flic_kvm.c:395:9: error: nested extern declaration of 'qemu_put_be64' [-Werror=nested-externs] hw/intc/s390_flic_kvm.c:410:9: error: implicit declaration of function 'qemu_put_buffer' [-Werror=implicit-function-declaration]

         qemu_put_buffer(f, (uint8_t *) buf,
         ^~~~~~~~~~~~~~~

hw/intc/s390_flic_kvm.c:410:9: error: nested extern declaration of 'qemu_put_buffer' [-Werror=nested-externs] hw/intc/s390_flic_kvm.c: In function 'kvm_flic_load':
hw/intc/s390_flic_kvm.c:438:13: error: implicit declaration of function 'qemu_get_be64' [-Werror=implicit-function-declaration]

     count = qemu_get_be64(f);
             ^~~~~~~~~~~~~
hw/intc/s390_flic_kvm.c:438:5: error: nested extern declaration of
'qemu_get_be64' [-Werror=nested-externs]
     count = qemu_get_be64(f);
     ^~~~~
hw/intc/s390_flic_kvm.c:454:9: error: implicit declaration of function
'qemu_get_buffer' [-Werror=implicit-function-declaration]
     if (qemu_get_buffer(f, (uint8_t *) buf, len) != len) {
         ^~~~~~~~~~~~~~~
hw/intc/s390_flic_kvm.c:454:5: error: nested extern declaration of
'qemu_get_buffer' [-Werror=nested-externs]
     if (qemu_get_buffer(f, (uint8_t *) buf, len) != len) {
     ^~

cc1: all warnings being treated as errors rules.mak:69: recipe for target 'hw/intc/s390_flic_kvm.o' failed
make: *** [hw/intc/s390_flic_kvm.o] Error 1
make: Leaving directory 'build/docker_s390x/s390x-softmmu'

Hope that help!

Regards,

Phil.

#28 lore raw

Re: [Qemu-devel] [PATCH v3 20/29] Include qemu/main-loop.h less

Quoted 104 lines · Philippe Mathieu-Daudé

On 8/9/19 11:42 AM, Philippe Mathieu-Daudé wrote:
[...]

Quoted 12 lines

netmap failing again :S

$ make docker-image-debian-amd64 V=1 DEBUG=1
[...]
  CC      net/netmap.o
net/netmap.c: In function 'netmap_update_fd_handler':
net/netmap.c:109:5: error: implicit declaration of function
'qemu_set_fd_handler' [-Werror=implicit-function-declaration]
     qemu_set_fd_handler(s->nmd->fd,
     ^~~~~~~~~~~~~~~~~~~
net/netmap.c:109:5: error: nested extern declaration of
'qemu_set_fd_handler' [-Werror=nested-externs]

Since it might not be obvious to see how helpful/powerful is Docker, I gathered few notes (already posted once) about how I use it (often bisecting).

# Automatically create a base image (the image is then cached)

$ make docker-image-debian-s390x-cross

# Create a out-of-tree build directory

$ mkdir build/docker_s390x

# Run ./configure
#
# --rm : Use a temp copy of the base image (do not modify it) # -v ...: Mount the current directory within the container # -w ...: Start the shell in the out-of-tree directory # -u ...: Use same UID as my user so I can remove the files after # $QEMU_CONFIGURE_OPTS contains the cross-compile options #

$ docker run --rm \
  -v $PWD:$PWD \
  -w $PWD/build/docker_s390x \
  -u $UID \
  qemu:debian-s390x-cross \
    \
    sh -c "../../configure \$QEMU_CONFIGURE_OPTS"

I use 'sh -c' to escape $QEMU_CONFIGURE_OPTS, there might be a cleaner way to do this.

# Stupid step to speed up bisection
# This will:
# - clone submodules if necessary
# - build slirp
# - build fdt
# - build capstone
# - generated bunch of headers
# - generated bunch of trace files

$ docker run --rm \
  -v $PWD:$PWD \
  -w $PWD/build/docker_s390x \
  -u $UID \
  qemu:debian-s390x-cross \
    \
    make stubs/qtest.o

Now the directory is ready for building/bisecting.

I.e. build a single file:

$ docker run --rm \
  -v $PWD:$PWD \
  -w $PWD/build/docker_s390x \
  -u $UID \
  qemu:debian-s390x-cross \
    \
    make -C s390x-softmmu hw/intc/s390_flic_kvm.o

make: Entering directory 'build/docker_s390x/s390x-softmmu'
CC hw/intc/s390_flic_kvm.o
hw/intc/s390_flic_kvm.c: In function 'kvm_flic_save':
hw/intc/s390_flic_kvm.c:395:9: error: implicit declaration of function 'qemu_put_be64' [-Werror=implicit-function-declaration]

         qemu_put_be64(f, FLIC_FAILED);
         ^~~~~~~~~~~~~

hw/intc/s390_flic_kvm.c:395:9: error: nested extern declaration of 'qemu_put_be64' [-Werror=nested-externs] hw/intc/s390_flic_kvm.c:410:9: error: implicit declaration of function 'qemu_put_buffer' [-Werror=implicit-function-declaration]

         qemu_put_buffer(f, (uint8_t *) buf,
         ^~~~~~~~~~~~~~~

hw/intc/s390_flic_kvm.c:410:9: error: nested extern declaration of 'qemu_put_buffer' [-Werror=nested-externs] hw/intc/s390_flic_kvm.c: In function 'kvm_flic_load':
hw/intc/s390_flic_kvm.c:438:13: error: implicit declaration of function 'qemu_get_be64' [-Werror=implicit-function-declaration]

     count = qemu_get_be64(f);
             ^~~~~~~~~~~~~
hw/intc/s390_flic_kvm.c:438:5: error: nested extern declaration of
'qemu_get_be64' [-Werror=nested-externs]
     count = qemu_get_be64(f);
     ^~~~~
hw/intc/s390_flic_kvm.c:454:9: error: implicit declaration of function
'qemu_get_buffer' [-Werror=implicit-function-declaration]
     if (qemu_get_buffer(f, (uint8_t *) buf, len) != len) {
         ^~~~~~~~~~~~~~~
hw/intc/s390_flic_kvm.c:454:5: error: nested extern declaration of
'qemu_get_buffer' [-Werror=nested-externs]
     if (qemu_get_buffer(f, (uint8_t *) buf, len) != len) {
     ^~
Quoted 4 lines

cc1: all warnings being treated as errors rules.mak:69: recipe for target 'hw/intc/s390_flic_kvm.o' failed
make: *** [hw/intc/s390_flic_kvm.o] Error 1
make: Leaving directory 'build/docker_s390x/s390x-softmmu'

Oops replied to incorrect thread haha =)

So adapted for amd64:

# Automatically create a base image (the image is then cached)

$ make docker-image-debian-amd64

# Create a out-of-tree build directory

$ mkdir build/docker_amd64

# Run ./configure
#
# --rm : Use a temp copy of the base image (do not modify it) # -v ...: Mount the current directory within the container # -w ...: Start the shell in the out-of-tree directory # -u ...: Use same UID as my user so I can remove the files after # $QEMU_CONFIGURE_OPTS contains the cross-compile options #

$ docker run --rm \
  -v $PWD:$PWD \
  -w $PWD/build/docker_amd64 \
  -u $UID \
  qemu:debian-amd64 \
    \
    sh -c "../../configure \$QEMU_CONFIGURE_OPTS"

I use 'sh -c' to escape $QEMU_CONFIGURE_OPTS, there might be a cleaner way to do this.

# Stupid step to speed up bisection
# This will:
# - clone submodules if necessary
# - build slirp
# - build fdt
# - build capstone
# - generated bunch of headers
# - generated bunch of trace files

$ docker run --rm \
  -v $PWD:$PWD \
  -w $PWD/build/docker_amd64 \
  -u $UID \
  qemu:debian-amd64 \
    \
    make stubs/qtest.o > /dev/null

Now the directory is ready for building/bisecting.

I.e. build a single file:

$ docker run --rm \
  -v $PWD:$PWD \
  -w $PWD/build/docker_amd64 \
  -u $UID \
  qemu:debian-amd64 \
    \
    make net/netmap.o

CC net/netmap.o
net/netmap.c: In function 'netmap_update_fd_handler':
net/netmap.c:109:5: error: implicit declaration of function 'qemu_set_fd_handler' [-Werror=implicit-function-declaration]

     qemu_set_fd_handler(s->nmd->fd,
     ^~~~~~~~~~~~~~~~~~~

net/netmap.c:109:5: error: nested extern declaration of 'qemu_set_fd_handler' [-Werror=nested-externs]
cc1: all warnings being treated as errors rules.mak:69: recipe for target 'net/netmap.o' failed
make: *** [net/netmap.o] Error 1

Now you can appreciate how powerful Docker can be!

Regards,

Phil.

#29 lore raw

Re: [Qemu-devel] [PATCH v3 20/29] Include qemu/main-loop.h less

In reply to Philippe Mathieu-Daudé
Quoted 31 lines · Philippe Mathieu-Daudé
Quoted 14 lines · Markus Armbruster

In my "build everything" tree, changing qemu/main-loop.h triggers a recompile of some 5600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). It includes block/aio.h, which in turn includes qemu/event_notifier.h, qemu/notify.h, qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h, qemu/thread.h, qemu/timer.h, and a few more.

Include qemu/main-loop.h only where it's needed. Touching it now recompiles only some 1700 objects. For block/aio.h and qemu/event_notifier.h, these numbers drop from 5600 to 2800. For the others, they shrink only slightly.

---

[...]

include/sysemu/sysemu.h line 10

Quoted 12 lines
include/sysemu/sysemu.h +0 -1
index 77f5df59b0..ac18a1184a 100644
@@ -5,7 +5,6 @@
 #include "qapi/qapi-types-run-state.h"
 #include "qemu/timer.h"
 #include "qemu/notify.h"
-#include "qemu/main-loop.h"
 #include "qemu/bitmap.h"
 #include "qemu/uuid.h"
 #include "qom/object.h"

netmap failing again :S

Quoted 10 lines
$ make docker-image-debian-amd64 V=1 DEBUG=1
[...]
  CC      net/netmap.o
net/netmap.c: In function 'netmap_update_fd_handler':
net/netmap.c:109:5: error: implicit declaration of function
'qemu_set_fd_handler' [-Werror=implicit-function-declaration]
     qemu_set_fd_handler(s->nmd->fd,
     ^~~~~~~~~~~~~~~~~~~
net/netmap.c:109:5: error: nested extern declaration of
'qemu_set_fd_handler' [-Werror=nested-externs]

I managed to lose the fix somehow.

I admit I ran "make docker-test-build", realized docker needs root, and went "sod it, cross fingers & send out the patches". My need to get out the changes accumulated since v2 won over the prudence to run all available tests first. Not my finest hour.

#30 lore raw

Re: [Qemu-devel] [PATCH v3 20/29] Include qemu/main-loop.h less

Quoted 43 lines · Markus Armbruster
Quoted 31 lines · Philippe Mathieu-Daudé
Quoted 14 lines · Markus Armbruster

In my "build everything" tree, changing qemu/main-loop.h triggers a recompile of some 5600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). It includes block/aio.h, which in turn includes qemu/event_notifier.h, qemu/notify.h, qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h, qemu/thread.h, qemu/timer.h, and a few more.

Include qemu/main-loop.h only where it's needed. Touching it now recompiles only some 1700 objects. For block/aio.h and qemu/event_notifier.h, these numbers drop from 5600 to 2800. For the others, they shrink only slightly.

---

[...]

include/sysemu/sysemu.h line 10

Quoted 12 lines
include/sysemu/sysemu.h +0 -1
index 77f5df59b0..ac18a1184a 100644
@@ -5,7 +5,6 @@
 #include "qapi/qapi-types-run-state.h"
 #include "qemu/timer.h"
 #include "qemu/notify.h"
-#include "qemu/main-loop.h"
 #include "qemu/bitmap.h"
 #include "qemu/uuid.h"
 #include "qom/object.h"

netmap failing again :S

Quoted 10 lines
$ make docker-image-debian-amd64 V=1 DEBUG=1
[...]
  CC      net/netmap.o
net/netmap.c: In function 'netmap_update_fd_handler':
net/netmap.c:109:5: error: implicit declaration of function
'qemu_set_fd_handler' [-Werror=implicit-function-declaration]
     qemu_set_fd_handler(s->nmd->fd,
     ^~~~~~~~~~~~~~~~~~~
net/netmap.c:109:5: error: nested extern declaration of
'qemu_set_fd_handler' [-Werror=nested-externs]
Quoted 3 lines

I managed to lose the fix somehow.

I admit I ran "make docker-test-build", realized docker needs root, and

Another cheap way is to register to Shippable and enable it to a public repository from https://www.shippable.com/integrations.html, then you simply pushing your work to your repository will trigger a good set of Docker cross-builds.

See https://app.shippable.com/github/qemu/qemu/dashboard/history
Less than 2h to build the various targets.

Quoted 3 lines

went "sod it, cross fingers & send out the patches". My need to get out the changes accumulated since v2 won over the prudence to run all available tests first. Not my finest hour.

#31 lore raw

Re: [Qemu-devel] [PATCH v3 20/29] Include qemu/main-loop.h less

In reply to Markus Armbruster
Quoted 44 lines · Markus Armbruster
Quoted 31 lines · Philippe Mathieu-Daudé
Quoted 14 lines · Markus Armbruster

In my "build everything" tree, changing qemu/main-loop.h triggers a recompile of some 5600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). It includes block/aio.h, which in turn includes qemu/event_notifier.h, qemu/notify.h, qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h, qemu/thread.h, qemu/timer.h, and a few more.

Include qemu/main-loop.h only where it's needed. Touching it now recompiles only some 1700 objects. For block/aio.h and qemu/event_notifier.h, these numbers drop from 5600 to 2800. For the others, they shrink only slightly.

---

[...]

include/sysemu/sysemu.h line 10

Quoted 12 lines
include/sysemu/sysemu.h +0 -1
index 77f5df59b0..ac18a1184a 100644
@@ -5,7 +5,6 @@
 #include "qapi/qapi-types-run-state.h"
 #include "qemu/timer.h"
 #include "qemu/notify.h"
-#include "qemu/main-loop.h"
 #include "qemu/bitmap.h"
 #include "qemu/uuid.h"
 #include "qom/object.h"

netmap failing again :S

Quoted 10 lines
$ make docker-image-debian-amd64 V=1 DEBUG=1
[...]
  CC      net/netmap.o
net/netmap.c: In function 'netmap_update_fd_handler':
net/netmap.c:109:5: error: implicit declaration of function
'qemu_set_fd_handler' [-Werror=implicit-function-declaration]
     qemu_set_fd_handler(s->nmd->fd,
     ^~~~~~~~~~~~~~~~~~~
net/netmap.c:109:5: error: nested extern declaration of
'qemu_set_fd_handler' [-Werror=nested-externs]
Quoted 4 lines

I managed to lose the fix somehow.

I admit I ran "make docker-test-build", realized docker needs root, and went "sod it, cross fingers & send out the patches".

I've sent some patches to make docker-test-build more closely resemble what shippable exercises.

As for root you can setup a docker group and do it that way (see the docs in docs/devel/testing.rst). It's not recommended for production machines as it makes escalation fairly trivial (the daemon itself still runs as root). Hopefully Marc's podman support:

Subject: [PATCH v2 0/5] tests/docker: add podman support
Date: Tue, 9 Jul 2019 23:43:25 +0400
Message-Id: <[email protected]>

will make these requirements a little less onerous.

Quoted 3 lines

My need to get out
the changes accumulated since v2 won over the prudence to run all available tests first. Not my finest hour.

--
Alex Bennée

#32 lore raw

Re: [Qemu-devel] [PATCH v3 20/29] Include qemu/main-loop.h less

Quoted 51 lines · Alex Bennée
Quoted 44 lines · Markus Armbruster
Quoted 31 lines · Philippe Mathieu-Daudé
Quoted 14 lines · Markus Armbruster

In my "build everything" tree, changing qemu/main-loop.h triggers a recompile of some 5600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). It includes block/aio.h, which in turn includes qemu/event_notifier.h, qemu/notify.h, qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h, qemu/thread.h, qemu/timer.h, and a few more.

Include qemu/main-loop.h only where it's needed. Touching it now recompiles only some 1700 objects. For block/aio.h and qemu/event_notifier.h, these numbers drop from 5600 to 2800. For the others, they shrink only slightly.

---

[...]

include/sysemu/sysemu.h line 10

Quoted 12 lines
include/sysemu/sysemu.h +0 -1
index 77f5df59b0..ac18a1184a 100644
@@ -5,7 +5,6 @@
 #include "qapi/qapi-types-run-state.h"
 #include "qemu/timer.h"
 #include "qemu/notify.h"
-#include "qemu/main-loop.h"
 #include "qemu/bitmap.h"
 #include "qemu/uuid.h"
 #include "qom/object.h"

netmap failing again :S

Quoted 10 lines
$ make docker-image-debian-amd64 V=1 DEBUG=1
[...]
  CC      net/netmap.o
net/netmap.c: In function 'netmap_update_fd_handler':
net/netmap.c:109:5: error: implicit declaration of function
'qemu_set_fd_handler' [-Werror=implicit-function-declaration]
     qemu_set_fd_handler(s->nmd->fd,
     ^~~~~~~~~~~~~~~~~~~
net/netmap.c:109:5: error: nested extern declaration of
'qemu_set_fd_handler' [-Werror=nested-externs]
Quoted 4 lines

I managed to lose the fix somehow.

I admit I ran "make docker-test-build", realized docker needs root, and went "sod it, cross fingers & send out the patches".

Quoted 7 lines

I've sent some patches to make docker-test-build more closely resemble what shippable exercises.

As for root you can setup a docker group and do it that way (see the docs in docs/devel/testing.rst). It's not recommended for production machines as it makes escalation fairly trivial (the daemon itself still runs as root).

As Dan Walsh explained in a blog post[*], access to the docker socket is equivalent to root. Might be okay on a throwaway or special-purpose box, but definitely not on my desktop.

The solution the blog post recommends for now is sudo with password, which I consider only marginally better: instead of leaving the safe door open, we install a security camera to log access to the safe, *then* leave the safe door open. Just in case whoever helps himself to the contents of the safe is too lazy to help himself to the logs, too.

In the great tradition of throwing security under the bus to get work done, I set up sudo. Avoiding NOPASSWD: turns out to be impractical.

Running "make docker-test-build" fails for me on master (v4.1.0-rc4), details appended.

Quoted 7 lines

Hopefully Marc's podman support:

Subject: [PATCH v2 0/5] tests/docker: add podman support
Date: Tue, 9 Jul 2019 23:43:25 +0400
Message-Id: <[email protected]>

will make these requirements a little less onerous.

Sounds like a much needed upgrade to me.

[...]

[*] https://www.projectatomic.io/blog/2015/08/why-we-dont-let-non-root-users-run-docker-in-centos-fedora-or-rhel/

My failure:

$ make -C bld docker-test-build
make: Entering directory '/work/armbru/qemu/bld'
  BUILD   centos7
make[1]: Entering directory '/work/armbru/qemu/bld'
  GEN     /work/armbru/qemu/bld/docker-src.2019-08-10-07.29.32.8915/qemu.tar
  COPY    RUNNER
    RUN test-build in qemu:centos7
[...]
make[1]: Leaving directory '/work/armbru/qemu/bld'
  BUILD   debian9
  BUILD   debian-amd64
make[1]: Entering directory '/work/armbru/qemu/bld'
  GEN     /work/armbru/qemu/bld/docker-src.2019-08-10-07.30.18.17180/qemu.tar
  COPY    RUNNER
    RUN test-build in qemu:debian-amd64
[...]
install -c -m 0644 /tmp/qemu-test/build/trace-events-all "/tmp/qemu-test/build/=destdir/tmp/qemu-test/install/share/qemu/trace-events-all"
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/work/armbru/qemu/tests/docker/docker.py", line 234, in _kill_instances
    return self._do_kill_instances(True)
  File "/work/armbru/qemu/tests/docker/docker.py", line 213, in _do_kill_instances
    for i in self._output(cmd).split():
  File "/work/armbru/qemu/tests/docker/docker.py", line 239, in _output
    **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['sudo', 'docker', 'ps', '-q']' returned non-zero exit status 1
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/work/armbru/qemu/tests/docker/docker.py", line 234, in _kill_instances
    return self._do_kill_instances(True)
  File "/work/armbru/qemu/tests/docker/docker.py", line 213, in _do_kill_instances
    for i in self._output(cmd).split():
  File "/work/armbru/qemu/tests/docker/docker.py", line 239, in _output
    **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['sudo', 'docker', 'ps', '-q']' returned non-zero exit status 1
    CLEANUP /work/armbru/qemu/bld/docker-src.2019-08-10-07.30.18.17180 
make[1]: Leaving directory '/work/armbru/qemu/bld'
  BUILD   debian-arm64-cross
Traceback (most recent call last):
  File "/work/armbru/qemu/tests/docker/docker.py", line 615, in <module>
    sys.exit(main())
  File "/work/armbru/qemu/tests/docker/docker.py", line 611, in main
    return args.cmdobj.run(args, argv)
  File "/work/armbru/qemu/tests/docker/docker.py", line 366, in run
    dkr = Docker()
  File "/work/armbru/qemu/tests/docker/docker.py", line 193, in __init__
    self._command = _guess_docker_command()
  File "/work/armbru/qemu/tests/docker/docker.py", line 65, in _guess_docker_command
    commands_txt)
Exception: Cannot find working docker command. Tried:
  docker
  sudo docker
make: *** [/work/armbru/qemu/tests/docker/Makefile.include:53: docker-image-debian-arm64-cross] Error 1
make: Leaving directory '/work/armbru/qemu/bld'

There are a few SELinux gripes in my logs, like this one:

type=AVC msg=audit(1565418107.93:125036): avc: denied { module_request } for pid=19599 comm="configure" kmod="binfmt-464c" scontext=system_u:system_r:container_t:s0:c611,c653 tcontext=system_u:system_r:kernel_t:s0 tclass=system permissive=0

#33 lore raw

Re: [Qemu-devel] [PATCH v3 20/29] Include qemu/main-loop.h less

Quoted 66 lines · Markus Armbruster

My failure:

$ make -C bld docker-test-build
make: Entering directory '/work/armbru/qemu/bld'
  BUILD   centos7
make[1]: Entering directory '/work/armbru/qemu/bld'
  GEN     /work/armbru/qemu/bld/docker-src.2019-08-10-07.29.32.8915/qemu.tar
  COPY    RUNNER
    RUN test-build in qemu:centos7
[...]
make[1]: Leaving directory '/work/armbru/qemu/bld'
  BUILD   debian9
  BUILD   debian-amd64
make[1]: Entering directory '/work/armbru/qemu/bld'
  GEN     /work/armbru/qemu/bld/docker-src.2019-08-10-07.30.18.17180/qemu.tar
  COPY    RUNNER
    RUN test-build in qemu:debian-amd64
[...]
install -c -m 0644 /tmp/qemu-test/build/trace-events-all "/tmp/qemu-test/build/=destdir/tmp/qemu-test/install/share/qemu/trace-events-all"
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/work/armbru/qemu/tests/docker/docker.py", line 234, in _kill_instances
    return self._do_kill_instances(True)
  File "/work/armbru/qemu/tests/docker/docker.py", line 213, in _do_kill_instances
    for i in self._output(cmd).split():
  File "/work/armbru/qemu/tests/docker/docker.py", line 239, in _output
    **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['sudo', 'docker', 'ps', '-q']' returned non-zero exit status 1
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/work/armbru/qemu/tests/docker/docker.py", line 234, in _kill_instances
    return self._do_kill_instances(True)
  File "/work/armbru/qemu/tests/docker/docker.py", line 213, in _do_kill_instances
    for i in self._output(cmd).split():
  File "/work/armbru/qemu/tests/docker/docker.py", line 239, in _output
    **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['sudo', 'docker', 'ps', '-q']' returned non-zero exit status 1
    CLEANUP /work/armbru/qemu/bld/docker-src.2019-08-10-07.30.18.17180 
make[1]: Leaving directory '/work/armbru/qemu/bld'
  BUILD   debian-arm64-cross
Traceback (most recent call last):
  File "/work/armbru/qemu/tests/docker/docker.py", line 615, in <module>
    sys.exit(main())
  File "/work/armbru/qemu/tests/docker/docker.py", line 611, in main
    return args.cmdobj.run(args, argv)
  File "/work/armbru/qemu/tests/docker/docker.py", line 366, in run
    dkr = Docker()
  File "/work/armbru/qemu/tests/docker/docker.py", line 193, in __init__
    self._command = _guess_docker_command()
  File "/work/armbru/qemu/tests/docker/docker.py", line 65, in _guess_docker_command
    commands_txt)
Exception: Cannot find working docker command. Tried:
  docker
  sudo docker
make: *** [/work/armbru/qemu/tests/docker/Makefile.include:53: docker-image-debian-arm64-cross] Error 1
make: Leaving directory '/work/armbru/qemu/bld'
Quoted 3 lines

There are a few SELinux gripes in my logs, like this one:

type=AVC msg=audit(1565418107.93:125036): avc: denied { module_request } for pid=19599 comm="configure" kmod="binfmt-464c" scontext=system_u:system_r:container_t:s0:c611,c653 tcontext=system_u:system_r:kernel_t:s0 tclass=system permissive=0

I can not reproduce using 'make -j1' on:

$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Description:    Fedora release 29 (Twenty Nine)

I dunno about SELinux, however I have something similar using 'make -j4'.

"Similar" because I'm not sure this is the same error since the failing command is not reported.

Are you building with -j[N] using N>1 ?

#34 lore raw

[Qemu-devel] Running docker cross-tests with SELinux (was: Re: [PATCH v3 20/29] Include qemu/main-loop.h less)

In reply to Markus Armbruster

Hi Alex,

Quoted 4 lines · Markus Armbruster

There are a few SELinux gripes in my logs, like this one:

type=AVC msg=audit(1565418107.93:125036): avc: denied { module_request } for pid=19599 comm="configure" kmod="binfmt-464c" scontext=system_u:system_r:container_t:s0:c611,c653 tcontext=system_u:system_r:kernel_t:s0 tclass=system permissive=0

Few notes while chatting with Markus.

Another interesting syslog entry:

AVC avc: denied { mounton } for pid=24489 comm="mount" path="/proc/sys/fs/binfmt_misc" dev="proc" ino=3907274 scontext=system_u:system_r:container_t:s0:c497,c743 tcontext=system_u:object_r:sysctl_fs_t:s0 tclass=dir permissive=0

Distrib is Fedora 30 with SELinux:

$ getenforce
Enforcing
$ make -k docker-test-build
[...]
  BUILD   binfmt debian-powerpc-user (debootstrapped)
No binfmt_misc entry for qemu-ppc
make: *** [tests/docker/Makefile.include:66:
docker-binfmt-image-debian-powerpc-user] Error 1make -k docker-test-build
make[1]: Entering directory 'bld'
  GEN     bld/docker-src.2019-08-11-23.50.37.5117/qemu.tar
  COPY    RUNNER
    RUN test-build in qemu:debian-powerpc-user-cross
Unable to find image 'qemu:debian-powerpc-user-cross' locally
Trying to pull repository docker.io/library/qemu ...
Trying to pull repository quay.io/qemu ...
Trying to pull repository docker.io/library/qemu ...
/usr/bin/docker-current: repository docker.io/qemu not found: does not
exist or no pull access.
See '/usr/bin/docker-current run --help'.
Traceback (most recent call last):
  File "tests/docker/docker.py", line 615, in <module>
    sys.exit(main())
  File "tests/docker/docker.py", line 611, in main
    return args.cmdobj.run(args, argv)
  File "tests/docker/docker.py", line 338, in run
    return Docker().run(argv, args.keep, quiet=args.quiet)
  File "tests/docker/docker.py", line 300, in run
    quiet=quiet)
  File "tests/docker/docker.py", line 207, in _do_check
    return subprocess.check_call(self._command + cmd, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run',
'--label', 'com.qemu.instance.uuid=0e8b34a8bc8211e98734d8cb8ae0c842',
'-u', '1000', '--security-opt', 'seccomp=unconfined', '--rm',
'--net=none', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e',
'V=', '-e', 'J=', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e',
'CCACHE_DIR=/var/tmp/ccache', '-v',
'/home/armbru/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v',
'bld/docker-src.2019-08-11-23.50.37.5117:/var/tmp/qemu:z,ro',
'qemu:debian-powerpc-user-cross', '/var/tmp/qemu/run', 'test-build']'
returned non-zero exit status 125
make[1]: *** [tests/docker/Makefile.include:207: docker-run] Error 1
make[1]: Leaving directory 'bld'
make: *** [tests/docker/Makefile.include:241:
docker-run-test-build@debian-powerpc-user-cross] Error 2

Note the "No binfmt_misc entry for qemu-ppc" and syslog entry:

'AVC denied comm="mount" path="/proc/sys/fs/binfmt_misc" dev="proc"'.

Does the selinux-policy require tuning?