Include migration/qemu-file-types.h a lot less
authorMarkus Armbruster <armbru@redhat.com>
Mon, 12 Aug 2019 05:23:39 +0000 (07:23 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 16 Aug 2019 11:31:52 +0000 (13:31 +0200)
In my "build everything" tree, changing migration/qemu-file-types.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 culprit is again hw/hw.h, which supposedly includes it for
convenience.

Include migration/qemu-file-types.h only where it's needed.  Touching
it now recompiles less than 200 objects.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190812052359.30071-10-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
31 files changed:
hw/acpi/piix4.c
hw/block/virtio-blk.c
hw/char/virtio-serial-bus.c
hw/display/virtio-gpu.c
hw/intc/apic_common.c
hw/intc/s390_flic_kvm.c
hw/nvram/eeprom93xx.c
hw/nvram/fw_cfg.c
hw/pci-host/piix.c
hw/pci/msix.c
hw/pci/pci.c
hw/pci/shpc.c
hw/ppc/spapr.c
hw/s390x/s390-skeys.c
hw/s390x/tod.c
hw/s390x/virtio-ccw.c
hw/scsi/mptsas.c
hw/scsi/scsi-bus.c
hw/scsi/scsi-disk.c
hw/scsi/scsi-generic.c
hw/scsi/virtio-scsi.c
hw/timer/i8254_common.c
hw/timer/twl92230.c
hw/usb/redirect.c
hw/virtio/vhost.c
hw/virtio/virtio-mmio.c
hw/virtio/virtio-pci.c
hw/virtio/virtio.c
include/hw/hw.h
include/migration/cpu.h
target/ppc/kvm.c

index a59e58d937e3fcb63c68fad1e48c40ff71c41152..0d8c821f37aa19d6151c07d7a25032c21bb55544 100644 (file)
@@ -40,6 +40,7 @@
 #include "hw/acpi/memory_hotplug.h"
 #include "hw/acpi/acpi_dev_interface.h"
 #include "hw/xen/xen.h"
+#include "migration/qemu-file-types.h"
 #include "qom/cpu.h"
 #include "trace.h"
 
index cbb3729158fed8d658858985007cc8f87929fee8..1f40834d2742e6578625eaa9fbc49fdeeb341cf7 100644 (file)
@@ -26,6 +26,7 @@
 # include <scsi/sg.h>
 #endif
 #include "hw/virtio/virtio-bus.h"
+#include "migration/qemu-file-types.h"
 #include "hw/virtio/virtio-access.h"
 
 /* Config size before the discard support (hide associated config fields) */
index f7a54f261b21e9d351f374d51e91212351d1214b..b868e54d7253f84de2617c8811f9a52cf4805abd 100644 (file)
@@ -22,6 +22,7 @@
 #include "qapi/error.h"
 #include "qemu/iov.h"
 #include "qemu/module.h"
+#include "migration/qemu-file-types.h"
 #include "monitor/monitor.h"
 #include "qemu/error-report.h"
 #include "qemu/queue.h"
index 25d9e327fc698c5d046084d870f76c9a02227ee4..ed9207196394dd72ba7566640e332d964693d35b 100644 (file)
@@ -18,6 +18,7 @@
 #include "trace.h"
 #include "sysemu/dma.h"
 #include "hw/virtio/virtio.h"
+#include "migration/qemu-file-types.h"
 #include "hw/virtio/virtio-gpu.h"
 #include "hw/virtio/virtio-gpu-bswap.h"
 #include "hw/virtio/virtio-gpu-pixman.h"
index e764a2bb0387bd962106eb9cbc879253a96da320..7045761281d66c79e1138e8cdba1dde68377fc9f 100644 (file)
@@ -31,6 +31,7 @@
 #include "sysemu/kvm.h"
 #include "hw/qdev.h"
 #include "hw/sysbus.h"
+#include "migration/qemu-file-types.h"
 
 static int apic_irq_delivered;
 bool apic_report_tpr_access;
index ff45b4ab0b8b20f945fc1b02726d9b7bbbe82f9b..819aa5e198b7011fc435e1cbe883c31cf3febcaf 100644 (file)
@@ -22,6 +22,7 @@
 #include "hw/s390x/s390_flic.h"
 #include "hw/s390x/adapter.h"
 #include "hw/s390x/css.h"
+#include "migration/qemu-file-types.h"
 #include "trace.h"
 
 #define FLIC_SAVE_INITIAL_SIZE getpagesize()
index 2db3d7cce603e752ef191df7fe7081e8593047ab..5fc23df1d44c46b2b3f47824eeafda14110c0501 100644 (file)
@@ -38,6 +38,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/nvram/eeprom93xx.h"
+#include "migration/qemu-file-types.h"
 
 /* Debug EEPROM emulation. */
 //~ #define DEBUG_EEPROM
index 3032f1c65ff5ad9f1808d18302adea9ecf646e7d..8db0297d59c74d9a609da9921dd56c6dea00ab9d 100644 (file)
@@ -31,6 +31,7 @@
 #include "hw/boards.h"
 #include "hw/nvram/fw_cfg.h"
 #include "hw/sysbus.h"
+#include "migration/qemu-file-types.h"
 #include "trace.h"
 #include "qemu/error-report.h"
 #include "qemu/option.h"
index f3671d28b7e164e1085e3d61f5744bd839c13d5d..e5955457ab6583ea6c3f114157e156aa51f1674b 100644 (file)
@@ -32,6 +32,7 @@
 #include "qapi/error.h"
 #include "qemu/range.h"
 #include "hw/xen/xen.h"
+#include "migration/qemu-file-types.h"
 #include "hw/pci-host/pam.h"
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
index d39dcf32e8c98da14ee4ca1d31bda09a0f6a591c..ebe804b473d26b3241d436855cc63c396d577192 100644 (file)
@@ -20,6 +20,7 @@
 #include "hw/pci/msix.h"
 #include "hw/pci/pci.h"
 #include "hw/xen/xen.h"
+#include "migration/qemu-file-types.h"
 #include "qemu/range.h"
 #include "qapi/error.h"
 #include "trace.h"
index 8076a80ab3a981c023d97a8f585a16e84f123abb..43a3cac1383011b09a96883bb80850c0bddd6375 100644 (file)
@@ -29,6 +29,7 @@
 #include "hw/pci/pci_bridge.h"
 #include "hw/pci/pci_bus.h"
 #include "hw/pci/pci_host.h"
+#include "migration/qemu-file-types.h"
 #include "monitor/monitor.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
index 5a10c6e9a59fa59395c7042e8a2c13c4bb53e94d..7f0aa28e4473b9b7034d424c449f900a85bfbb6c 100644 (file)
@@ -4,6 +4,7 @@
 #include "qemu/range.h"
 #include "qemu/error-report.h"
 #include "hw/pci/shpc.h"
+#include "migration/qemu-file-types.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
 #include "hw/pci/msi.h"
index 4fd9e5105ddc34e68ab16f3f04b1e2b92d3522c8..7030a752265d50d0658af87b87378eed4c36af69 100644 (file)
@@ -42,6 +42,7 @@
 #include "sysemu/hw_accel.h"
 #include "kvm_ppc.h"
 #include "migration/misc.h"
+#include "migration/qemu-file-types.h"
 #include "migration/global_state.h"
 #include "migration/register.h"
 #include "mmu-hash64.h"
index e5bd92c0c73f167256ebe41725cd27f56537e044..d4807f77770eb95287f4e9d49d9da0ba90dfd091 100644 (file)
@@ -18,6 +18,7 @@
 #include "qapi/qmp/qdict.h"
 #include "qemu/error-report.h"
 #include "sysemu/kvm.h"
+#include "migration/qemu-file-types.h"
 #include "migration/register.h"
 
 #define S390_SKEYS_BUFFER_SIZE (128 * KiB)  /* Room for 128k storage keys */
index a9fca8eb0b4ff0565f1090d24f844cb34f919bad..1bf0875afa2137979030b345a5766652bcba84e9 100644 (file)
@@ -14,6 +14,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "sysemu/kvm.h"
+#include "migration/qemu-file-types.h"
 #include "migration/register.h"
 
 void s390_init_tod(void)
index 43d3a1b029cefce3217ca56e6667367766c5784a..fa537bfba3518d87d2ea7c2d8f893181b9dbb22f 100644 (file)
@@ -17,6 +17,7 @@
 #include "sysemu/kvm.h"
 #include "net/net.h"
 #include "hw/virtio/virtio.h"
+#include "migration/qemu-file-types.h"
 #include "hw/virtio/virtio-net.h"
 #include "hw/sysbus.h"
 #include "qemu/bitops.h"
index 3f94d5ab55145e04310a17a35cf6049f2be96636..6d2c15a2bc1c1eb0fd39e74e493482ef0c257181 100644 (file)
@@ -34,6 +34,7 @@
 #include "trace.h"
 #include "qapi/error.h"
 #include "mptsas.h"
+#include "migration/qemu-file-types.h"
 #include "mpi.h"
 
 #define NAA_LOCALLY_ASSIGNED_ID 0x3ULL
index fdc3a0e4e03732f4b72cb45f1b771a2b1e2f1945..81fe7c3301fc17e6801c2c09383907aff563df38 100644 (file)
@@ -5,6 +5,7 @@
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "hw/scsi/scsi.h"
+#include "migration/qemu-file-types.h"
 #include "scsi/constants.h"
 #include "hw/qdev.h"
 #include "sysemu/block-backend.h"
index af3e622dc5b2ace50430e7dc6327d355556e3a30..558fa115118d702627b98ac13fed482630995dc8 100644 (file)
@@ -25,6 +25,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "hw/scsi/scsi.h"
+#include "migration/qemu-file-types.h"
 #include "hw/scsi/emulation.h"
 #include "scsi/constants.h"
 #include "sysemu/sysemu.h"
index c11a0c9a84074dbfae5a77aa4728c31e0c984a28..44430b6ea60aadfe2967de185ced0cc97ded2b03 100644 (file)
@@ -17,6 +17,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "hw/scsi/scsi.h"
+#include "migration/qemu-file-types.h"
 #include "hw/scsi/emulation.h"
 #include "sysemu/block-backend.h"
 #include "trace.h"
index 8b9e5e2b49d7596dd8f03fe3f17eabe8cc149f23..a6d61aacdb54726644667e658872a3271a36581b 100644 (file)
@@ -17,6 +17,7 @@
 #include "qapi/error.h"
 #include "standard-headers/linux/virtio_ids.h"
 #include "hw/virtio/virtio-scsi.h"
+#include "migration/qemu-file-types.h"
 #include "qemu/error-report.h"
 #include "qemu/iov.h"
 #include "qemu/module.h"
index 76ca6ec4446998f62d384a90981434d37c57d61f..3e980f2dee4f91be9ccab6f866bb6c8a2b558f73 100644 (file)
@@ -30,6 +30,7 @@
 #include "qemu/timer.h"
 #include "hw/timer/i8254.h"
 #include "hw/timer/i8254_internal.h"
+#include "migration/qemu-file-types.h"
 
 /* val must be 0 or 1 */
 void pit_set_gate(ISADevice *dev, int channel, int val)
index 0ef4fc1fc15cbcd8f2f06a3e9972b035756a70b2..91ae7bf20391c092174a4eb2ef5164f106fd376d 100644 (file)
@@ -24,6 +24,7 @@
 #include "hw/hw.h"
 #include "qemu/timer.h"
 #include "hw/i2c/i2c.h"
+#include "migration/qemu-file-types.h"
 #include "sysemu/sysemu.h"
 #include "ui/console.h"
 #include "qemu/bcd.h"
index 998fc6e4b0053e9ccfdb4921d8e2aaa7d7cdbc83..846e60f3bb0ccd6c9b532a5556093a4e7cf72936 100644 (file)
@@ -41,6 +41,7 @@
 #include <usbredirfilter.h>
 
 #include "hw/usb.h"
+#include "migration/qemu-file-types.h"
 
 /* ERROR is defined below. Remove any previous definition. */
 #undef ERROR
index bc899fc60e8bad1651340910c1ca50cb0e16f924..ba1006ad964dddcd22da308764e298f9ec95a49e 100644 (file)
@@ -26,6 +26,7 @@
 #include "hw/virtio/virtio-bus.h"
 #include "hw/virtio/virtio-access.h"
 #include "migration/blocker.h"
+#include "migration/qemu-file-types.h"
 #include "sysemu/dma.h"
 #include "trace.h"
 
index 97b7f35496ae15455f2f9265b5e5922e05d3f8eb..d4c09970744f3aa13d8f35dfa0aa7f5afa66a642 100644 (file)
@@ -23,6 +23,7 @@
 #include "standard-headers/linux/virtio_mmio.h"
 #include "hw/sysbus.h"
 #include "hw/virtio/virtio.h"
+#include "migration/qemu-file-types.h"
 #include "qemu/host-utils.h"
 #include "qemu/module.h"
 #include "sysemu/kvm.h"
index f6d2223e78c6a67d80a138f1048488bf8a1a3a4b..1117f2347b6596787cc93280e7350e72653385e9 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "standard-headers/linux/virtio_pci.h"
 #include "hw/virtio/virtio.h"
+#include "migration/qemu-file-types.h"
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_bus.h"
 #include "qapi/error.h"
index a94ea18a9c82cdae1de7e54108f0d25fe042a7ba..79c7a910cc1b3a0426bc2da0729bacba06959eed 100644 (file)
@@ -19,6 +19,7 @@
 #include "qemu/error-report.h"
 #include "qemu/module.h"
 #include "hw/virtio/virtio.h"
+#include "migration/qemu-file-types.h"
 #include "qemu/atomic.h"
 #include "hw/virtio/virtio-bus.h"
 #include "hw/virtio/virtio-access.h"
index a4fb2390e801d2e19420b395179c05b8ffd2f6d7..b399627cbe39025fb087758371ed7fdd5720835a 100644 (file)
@@ -11,7 +11,6 @@
 #include "exec/memory.h"
 #include "hw/irq.h"
 #include "migration/vmstate.h"
-#include "migration/qemu-file-types.h"
 
 void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
 
index da1618d6206fa439cee59b2fd66c34632fc65970..2a22470d0d5f88b03aeed4c429641225cfae357c 100644 (file)
@@ -4,6 +4,7 @@
 #define MIGRATION_CPU_H
 
 #include "exec/cpu-defs.h"
+#include "migration/qemu-file-types.h"
 
 #if TARGET_LONG_BITS == 64
 #define qemu_put_betl qemu_put_be64
index 8a06d3171e9fd958ae52dcf4cdc27d78b013a109..4bd95be9cd3ec5767d1ca7f1b25cc22e0372792a 100644 (file)
@@ -38,6 +38,7 @@
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/spapr_cpu_core.h"
 #include "hw/ppc/ppc.h"
+#include "migration/qemu-file-types.h"
 #include "sysemu/watchdog.h"
 #include "trace.h"
 #include "exec/gdbstub.h"