aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--async.c1
-rw-r--r--backends/baum.c1
-rw-r--r--backends/hostmem-file.c1
-rw-r--r--backends/hostmem-ram.c1
-rw-r--r--backends/hostmem.c1
-rw-r--r--backends/rng-egd.c1
-rw-r--r--backends/rng-random.c1
-rw-r--r--backends/rng.c1
-rw-r--r--backends/tpm.c1
-rw-r--r--block/backup.c1
-rw-r--r--block/blkdebug.c1
-rw-r--r--block/blkverify.c1
-rw-r--r--block/bochs.c1
-rw-r--r--block/cloop.c1
-rw-r--r--block/commit.c1
-rw-r--r--block/curl.c1
-rw-r--r--block/dirty-bitmap.c2
-rw-r--r--block/dmg.c1
-rw-r--r--block/gluster.c1
-rw-r--r--block/io.c1
-rw-r--r--block/mirror.c1
-rw-r--r--block/nbd.c1
-rw-r--r--block/null.c1
-rw-r--r--block/parallels.c1
-rw-r--r--block/qcow.c1
-rw-r--r--block/qcow2-cluster.c1
-rw-r--r--block/qcow2-refcount.c1
-rw-r--r--block/qcow2-snapshot.c1
-rw-r--r--block/qed.c1
-rw-r--r--block/raw-posix.c1
-rw-r--r--block/raw-win32.c1
-rw-r--r--block/raw_bsd.c1
-rw-r--r--block/rbd.c1
-rw-r--r--block/sheepdog.c1
-rw-r--r--block/snapshot.c1
-rw-r--r--block/ssh.c1
-rw-r--r--block/stream.c1
-rw-r--r--block/vdi.c1
-rw-r--r--block/vhdx-log.c1
-rw-r--r--block/vhdx.c1
-rw-r--r--block/vmdk.c1
-rw-r--r--block/vpc.c1
-rw-r--r--block/vvfat.c1
-rw-r--r--bootdevice.c1
-rw-r--r--contrib/ivshmem-server/main.c1
-rw-r--r--crypto/block-luks.c1
-rw-r--r--crypto/block-qcow.c1
-rw-r--r--crypto/block.c1
-rw-r--r--crypto/cipher.c1
-rw-r--r--crypto/hash.c1
-rw-r--r--crypto/init.c1
-rw-r--r--crypto/ivgen-essiv.c1
-rw-r--r--crypto/ivgen-plain.c1
-rw-r--r--crypto/ivgen-plain64.c1
-rw-r--r--crypto/ivgen.c2
-rw-r--r--crypto/pbkdf-gcrypt.c1
-rw-r--r--crypto/pbkdf-nettle.c1
-rw-r--r--crypto/pbkdf-stub.c1
-rw-r--r--crypto/pbkdf.c1
-rw-r--r--crypto/secret.c1
-rw-r--r--crypto/tlscreds.c1
-rw-r--r--crypto/tlscredsanon.c1
-rw-r--r--crypto/tlscredsx509.c1
-rw-r--r--crypto/tlssession.c1
-rw-r--r--device_tree.c1
-rw-r--r--exec.c1
-rw-r--r--gdbstub.c1
-rw-r--r--hw/9pfs/9p.c1
-rw-r--r--hw/acpi/cpu_hotplug.c1
-rw-r--r--hw/acpi/ich9.c1
-rw-r--r--hw/acpi/pcihp.c1
-rw-r--r--hw/acpi/piix4.c1
-rw-r--r--hw/alpha/typhoon.c1
-rw-r--r--hw/arm/allwinner-a10.c1
-rw-r--r--hw/arm/armv7m.c1
-rw-r--r--hw/arm/ast2400.c1
-rw-r--r--hw/arm/bcm2835_peripherals.c1
-rw-r--r--hw/arm/bcm2836.c1
-rw-r--r--hw/arm/boot.c1
-rw-r--r--hw/arm/cubieboard.c1
-rw-r--r--hw/arm/digic.c1
-rw-r--r--hw/arm/digic_boards.c1
-rw-r--r--hw/arm/exynos4210.c1
-rw-r--r--hw/arm/fsl-imx25.c1
-rw-r--r--hw/arm/fsl-imx31.c1
-rw-r--r--hw/arm/highbank.c1
-rw-r--r--hw/arm/imx25_pdk.c1
-rw-r--r--hw/arm/integratorcp.c1
-rw-r--r--hw/arm/kzm.c1
-rw-r--r--hw/arm/mainstone.c1
-rw-r--r--hw/arm/musicpal.c1
-rw-r--r--hw/arm/netduino2.c1
-rw-r--r--hw/arm/nseries.c1
-rw-r--r--hw/arm/omap1.c1
-rw-r--r--hw/arm/omap2.c1
-rw-r--r--hw/arm/omap_sx1.c1
-rw-r--r--hw/arm/palm.c1
-rw-r--r--hw/arm/palmetto-bmc.c1
-rw-r--r--hw/arm/pxa2xx.c1
-rw-r--r--hw/arm/raspi.c1
-rw-r--r--hw/arm/realview.c1
-rw-r--r--hw/arm/spitz.c1
-rw-r--r--hw/arm/stellaris.c1
-rw-r--r--hw/arm/stm32f205_soc.c1
-rw-r--r--hw/arm/sysbus-fdt.c1
-rw-r--r--hw/arm/tosa.c1
-rw-r--r--hw/arm/versatilepb.c1
-rw-r--r--hw/arm/vexpress.c1
-rw-r--r--hw/arm/virt-acpi-build.c1
-rw-r--r--hw/arm/virt.c1
-rw-r--r--hw/arm/xilinx_zynq.c1
-rw-r--r--hw/arm/xlnx-ep108.c1
-rw-r--r--hw/arm/xlnx-zynqmp.c1
-rw-r--r--hw/audio/adlib.c1
-rw-r--r--hw/audio/gus.c1
-rw-r--r--hw/block/block.c1
-rw-r--r--hw/block/dataplane/virtio-blk.c1
-rw-r--r--hw/block/fdc.c1
-rw-r--r--hw/block/nand.c1
-rw-r--r--hw/block/nvme.c1
-rw-r--r--hw/block/onenand.c1
-rw-r--r--hw/block/pflash_cfi01.c1
-rw-r--r--hw/block/pflash_cfi02.c1
-rw-r--r--hw/block/virtio-blk.c1
-rw-r--r--hw/block/xen_disk.c1
-rw-r--r--hw/bt/hci.c1
-rw-r--r--hw/char/debugcon.c1
-rw-r--r--hw/char/parallel.c1
-rw-r--r--hw/char/serial-isa.c1
-rw-r--r--hw/char/serial-pci.c1
-rw-r--r--hw/char/serial.c1
-rw-r--r--hw/char/spapr_vty.c1
-rw-r--r--hw/char/virtio-serial-bus.c1
-rw-r--r--hw/core/loader.c1
-rw-r--r--hw/core/machine.c1
-rw-r--r--hw/core/nmi.c1
-rw-r--r--hw/core/qdev-properties-system.c1
-rw-r--r--hw/core/qdev-properties.c1
-rw-r--r--hw/cpu/a15mpcore.c1
-rw-r--r--hw/cpu/a9mpcore.c1
-rw-r--r--hw/cpu/arm11mpcore.c1
-rw-r--r--hw/cpu/realview_mpcore.c1
-rw-r--r--hw/cris/axis_dev88.c1
-rw-r--r--hw/display/bcm2835_fb.c1
-rw-r--r--hw/display/cg3.c1
-rw-r--r--hw/display/cirrus_vga.c1
-rw-r--r--hw/display/sm501.c1
-rw-r--r--hw/display/tc6393xb.c1
-rw-r--r--hw/display/tcx.c1
-rw-r--r--hw/display/vga.c1
-rw-r--r--hw/display/vmware_vga.c1
-rw-r--r--hw/dma/bcm2835_dma.c1
-rw-r--r--hw/dma/pl330.c1
-rw-r--r--hw/dma/xilinx_axidma.c1
-rw-r--r--hw/i386/acpi-build.c1
-rw-r--r--hw/i386/kvm/i8254.c1
-rw-r--r--hw/i386/kvm/pci-assign.c1
-rw-r--r--hw/i386/pc_sysfw.c1
-rw-r--r--hw/i386/pci-assign-load-rom.c1
-rw-r--r--hw/i386/xen/xen_platform.c1
-rw-r--r--hw/i386/xen/xen_pvdevice.c1
-rw-r--r--hw/ide/qdev.c1
-rw-r--r--hw/input/milkymist-softusb.c1
-rw-r--r--hw/input/virtio-input-host.c1
-rw-r--r--hw/input/virtio-input.c1
-rw-r--r--hw/intc/apic_common.c1
-rw-r--r--hw/intc/arm_gic.c1
-rw-r--r--hw/intc/arm_gic_common.c1
-rw-r--r--hw/intc/arm_gic_kvm.c1
-rw-r--r--hw/intc/arm_gicv2m.c1
-rw-r--r--hw/intc/arm_gicv3_common.c1
-rw-r--r--hw/intc/arm_gicv3_kvm.c1
-rw-r--r--hw/intc/armv7m_nvic.c1
-rw-r--r--hw/intc/ioapic_common.c1
-rw-r--r--hw/intc/openpic.c1
-rw-r--r--hw/intc/openpic_kvm.c1
-rw-r--r--hw/intc/realview_gic.c1
-rw-r--r--hw/intc/xics.c1
-rw-r--r--hw/intc/xics_kvm.c1
-rw-r--r--hw/ipack/ipack.c1
-rw-r--r--hw/ipmi/ipmi_bmc_extern.c1
-rw-r--r--hw/ipmi/isa_ipmi_bt.c1
-rw-r--r--hw/ipmi/isa_ipmi_kcs.c1
-rw-r--r--hw/isa/isa-bus.c1
-rw-r--r--hw/isa/pc87312.c1
-rw-r--r--hw/m68k/an5206.c1
-rw-r--r--hw/m68k/mcf5208.c1
-rw-r--r--hw/mem/pc-dimm.c1
-rw-r--r--hw/microblaze/petalogix_ml605_mmu.c1
-rw-r--r--hw/microblaze/petalogix_s3adsp1800_mmu.c1
-rw-r--r--hw/mips/mips_fulong2e.c1
-rw-r--r--hw/mips/mips_mipssim.c1
-rw-r--r--hw/mips/mips_r4k.c1
-rw-r--r--hw/misc/bcm2835_mbox.c1
-rw-r--r--hw/misc/bcm2835_property.c1
-rw-r--r--hw/misc/ivshmem.c1
-rw-r--r--hw/misc/macio/macio.c1
-rw-r--r--hw/misc/tmp105.c1
-rw-r--r--hw/moxie/moxiesim.c1
-rw-r--r--hw/net/dp8393x.c1
-rw-r--r--hw/net/milkymist-minimac2.c1
-rw-r--r--hw/net/ne2000-isa.c1
-rw-r--r--hw/net/xilinx_axienet.c1
-rw-r--r--hw/nvram/spapr_nvram.c1
-rw-r--r--hw/openrisc/openrisc_sim.c1
-rw-r--r--hw/pci-bridge/pci_bridge_dev.c1
-rw-r--r--hw/pci-host/piix.c1
-rw-r--r--hw/pci-host/prep.c1
-rw-r--r--hw/pci-host/q35.c1
-rw-r--r--hw/pci/pcie.c1
-rw-r--r--hw/pci/shpc.c1
-rw-r--r--hw/ppc/e500.c1
-rw-r--r--hw/ppc/mac_newworld.c1
-rw-r--r--hw/ppc/mac_oldworld.c1
-rw-r--r--hw/ppc/ppc405_boards.c1
-rw-r--r--hw/ppc/ppc405_uc.c1
-rw-r--r--hw/ppc/spapr.c1
-rw-r--r--hw/ppc/spapr_drc.c1
-rw-r--r--hw/ppc/spapr_events.c1
-rw-r--r--hw/ppc/spapr_hcall.c1
-rw-r--r--hw/ppc/spapr_pci.c1
-rw-r--r--hw/ppc/spapr_pci_vfio.c1
-rw-r--r--hw/ppc/spapr_rng.c1
-rw-r--r--hw/ppc/spapr_vio.c1
-rw-r--r--hw/s390x/event-facility.c1
-rw-r--r--hw/s390x/ipl.c1
-rw-r--r--hw/s390x/s390-virtio-ccw.c1
-rw-r--r--hw/s390x/s390-virtio.c1
-rw-r--r--hw/s390x/sclp.c1
-rw-r--r--hw/s390x/virtio-ccw.c1
-rw-r--r--hw/scsi/esp-pci.c1
-rw-r--r--hw/scsi/esp.c1
-rw-r--r--hw/scsi/scsi-bus.c1
-rw-r--r--hw/scsi/scsi-disk.c1
-rw-r--r--hw/scsi/scsi-generic.c1
-rw-r--r--hw/scsi/vhost-scsi.c1
-rw-r--r--hw/scsi/virtio-scsi.c1
-rw-r--r--hw/scsi/vmw_pvscsi.c1
-rw-r--r--hw/sd/pxa2xx_mmci.c1
-rw-r--r--hw/sd/sd.c1
-rw-r--r--hw/sh4/r2d.c1
-rw-r--r--hw/sh4/shix.c1
-rw-r--r--hw/smbios/smbios.c1
-rw-r--r--hw/sparc/leon3.c1
-rw-r--r--hw/sparc/sun4m.c1
-rw-r--r--hw/sparc64/sun4u.c1
-rw-r--r--hw/timer/a9gtimer.c1
-rw-r--r--hw/timer/arm_mptimer.c1
-rw-r--r--hw/timer/hpet.c1
-rw-r--r--hw/timer/m48t59.c1
-rw-r--r--hw/tpm/tpm_tis.c1
-rw-r--r--hw/tricore/tricore_testboard.c1
-rw-r--r--hw/unicore32/puv3.c1
-rw-r--r--hw/usb/bus.c1
-rw-r--r--hw/usb/dev-hid.c1
-rw-r--r--hw/usb/dev-hub.c1
-rw-r--r--hw/usb/dev-mtp.c2
-rw-r--r--hw/usb/dev-network.c1
-rw-r--r--hw/usb/dev-serial.c1
-rw-r--r--hw/usb/dev-smartcard-reader.c1
-rw-r--r--hw/usb/dev-storage.c1
-rw-r--r--hw/usb/hcd-ehci.c1
-rw-r--r--hw/usb/hcd-ohci.c1
-rw-r--r--hw/usb/hcd-uhci.c1
-rw-r--r--hw/usb/host-libusb.c1
-rw-r--r--hw/usb/redirect.c1
-rw-r--r--hw/vfio/platform.c1
-rw-r--r--hw/virtio/vhost-user.c1
-rw-r--r--hw/virtio/vhost.c1
-rw-r--r--hw/virtio/virtio-pci.c1
-rw-r--r--hw/virtio/virtio-rng.c1
-rw-r--r--hw/virtio/virtio.c1
-rw-r--r--hw/xen/xen-host-pci-device.c1
-rw-r--r--hw/xen/xen_pt.c1
-rw-r--r--hw/xen/xen_pt_config_init.c1
-rw-r--r--hw/xen/xen_pt_graphics.c1
-rw-r--r--hw/xtensa/sim.c1
-rw-r--r--hw/xtensa/xtfpga.c1
-rw-r--r--include/qapi/error.h5
-rw-r--r--include/qemu/osdep.h9
-rw-r--r--include/qemu/typedefs.h1
-rw-r--r--include/qom/object.h1
-rw-r--r--include/ui/qemu-spice.h2
-rw-r--r--io/channel-command.c1
-rw-r--r--io/channel-file.c1
-rw-r--r--io/channel-socket.c1
-rw-r--r--io/channel-tls.c1
-rw-r--r--io/channel-websock.c1
-rw-r--r--io/channel.c1
-rw-r--r--io/task.c1
-rw-r--r--iohandler.c1
-rw-r--r--main-loop.c1
-rw-r--r--memory.c1
-rw-r--r--memory_mapping.c1
-rw-r--r--migration/block.c1
-rw-r--r--migration/exec.c1
-rw-r--r--migration/fd.c1
-rw-r--r--migration/rdma.c1
-rw-r--r--nbd/client.c1
-rw-r--r--nbd/common.c1
-rw-r--r--nbd/server.c1
-rw-r--r--net/dump.c1
-rw-r--r--net/filter-buffer.c1
-rw-r--r--net/filter.c1
-rw-r--r--net/socket.c1
-rw-r--r--net/tap-aix.c1
-rw-r--r--net/tap-bsd.c1
-rw-r--r--net/tap-haiku.c1
-rw-r--r--net/tap-linux.c1
-rw-r--r--net/tap-solaris.c1
-rw-r--r--net/tap.c1
-rw-r--r--qapi/opts-visitor.c1
-rw-r--r--qapi/qapi-util.c1
-rw-r--r--qapi/qapi-visit-core.c1
-rw-r--r--qapi/qmp-dispatch.c1
-rw-r--r--qapi/qmp-input-visitor.c1
-rw-r--r--qapi/string-input-visitor.c1
-rw-r--r--qemu-img.c1
-rw-r--r--qemu-io-cmds.c1
-rw-r--r--qemu-io.c1
-rw-r--r--qemu-nbd.c1
-rw-r--r--qga/channel-posix.c1
-rw-r--r--qobject/json-parser.c1
-rw-r--r--qom/cpu.c1
-rw-r--r--qom/object.c1
-rw-r--r--qom/object_interfaces.c1
-rw-r--r--qom/qom-qobject.c1
-rw-r--r--qtest.c1
-rw-r--r--replay/replay-input.c1
-rw-r--r--replay/replay.c1
-rwxr-xr-xscripts/clean-includes5
-rw-r--r--scripts/qapi-visit.py1
-rw-r--r--stubs/get-fd.c1
-rw-r--r--target-alpha/cpu.c1
-rw-r--r--target-arm/cpu.c1
-rw-r--r--target-arm/cpu64.c1
-rw-r--r--target-cris/cpu.c1
-rw-r--r--target-i386/kvm.c1
-rw-r--r--target-lm32/cpu.c1
-rw-r--r--target-m68k/cpu.c1
-rw-r--r--target-microblaze/cpu.c1
-rw-r--r--target-mips/cpu.c1
-rw-r--r--target-moxie/cpu.c1
-rw-r--r--target-openrisc/cpu.c1
-rw-r--r--target-ppc/mmu-hash64.c1
-rw-r--r--target-ppc/mmu_helper.c1
-rw-r--r--target-s390x/cpu.c1
-rw-r--r--target-s390x/helper.c1
-rw-r--r--target-sh4/cpu.c1
-rw-r--r--target-sparc/cpu.c1
-rw-r--r--target-tilegx/cpu.c1
-rw-r--r--target-tricore/cpu.c1
-rw-r--r--target-unicore32/cpu.c1
-rw-r--r--target-xtensa/cpu.c1
-rw-r--r--tests/check-qom-proplist.c1
-rw-r--r--tests/io-channel-helpers.c1
-rw-r--r--tests/test-aio.c1
-rw-r--r--tests/test-base64.c2
-rw-r--r--tests/test-blockjob-txn.c1
-rw-r--r--tests/test-crypto-afsplit.c1
-rw-r--r--tests/test-crypto-block.c1
-rw-r--r--tests/test-crypto-cipher.c1
-rw-r--r--tests/test-crypto-ivgen.c1
-rw-r--r--tests/test-crypto-pbkdf.c1
-rw-r--r--tests/test-crypto-secret.c1
-rw-r--r--tests/test-crypto-tlscredsx509.c1
-rw-r--r--tests/test-crypto-tlssession.c1
-rw-r--r--tests/test-io-channel-command.c1
-rw-r--r--tests/test-io-channel-file.c2
-rw-r--r--tests/test-io-channel-socket.c1
-rw-r--r--tests/test-io-task.c1
-rw-r--r--tests/test-opts-visitor.c1
-rw-r--r--tests/test-qemu-opts.c1
-rw-r--r--tests/test-qmp-input-strict.c1
-rw-r--r--tests/test-qmp-input-visitor.c1
-rw-r--r--tests/test-qmp-output-visitor.c1
-rw-r--r--tests/test-string-input-visitor.c1
-rw-r--r--tests/test-string-output-visitor.c1
-rw-r--r--tests/test-thread-pool.c1
-rw-r--r--tests/test-throttle.c1
-rw-r--r--tests/test-visitor-serialization.c1
-rw-r--r--ui/input-linux.c1
-rw-r--r--ui/vnc-auth-sasl.c1
-rw-r--r--ui/vnc-auth-vencrypt.c1
-rw-r--r--ui/vnc-ws.c1
-rw-r--r--util/base64.c1
-rw-r--r--util/error.c1
-rw-r--r--util/oslib-posix.c1
-rw-r--r--util/oslib-win32.c1
-rw-r--r--util/qemu-option.c1
-rw-r--r--util/qemu-sockets.c1
-rw-r--r--util/throttle.c1
392 files changed, 399 insertions, 15 deletions
diff --git a/async.c b/async.c
index d4dd2cc799..b4bf205a0c 100644
--- a/async.c
+++ b/async.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/aio.h"
#include "block/thread-pool.h"
diff --git a/backends/baum.c b/backends/baum.c
index eef3467c9f..f95f7be8a5 100644
--- a/backends/baum.c
+++ b/backends/baum.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "sysemu/char.h"
#include "qemu/timer.h"
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
index fd59482693..c70f268d6f 100644
--- a/backends/hostmem-file.c
+++ b/backends/hostmem-file.c
@@ -10,6 +10,7 @@
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "sysemu/hostmem.h"
#include "sysemu/sysemu.h"
diff --git a/backends/hostmem-ram.c b/backends/hostmem-ram.c
index 44fb3902b8..04a7ac362b 100644
--- a/backends/hostmem-ram.c
+++ b/backends/hostmem-ram.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
#include "sysemu/hostmem.h"
+#include "qapi/error.h"
#include "qom/object_interfaces.h"
#define TYPE_MEMORY_BACKEND_RAM "memory-backend-ram"
diff --git a/backends/hostmem.c b/backends/hostmem.c
index 6c6f0da6d9..6e28be11eb 100644
--- a/backends/hostmem.c
+++ b/backends/hostmem.c
@@ -12,6 +12,7 @@
#include "qemu/osdep.h"
#include "sysemu/hostmem.h"
#include "hw/boards.h"
+#include "qapi/error.h"
#include "qapi/visitor.h"
#include "qapi-types.h"
#include "qapi-visit.h"
diff --git a/backends/rng-egd.c b/backends/rng-egd.c
index 6e0ba22241..7a1b9242d8 100644
--- a/backends/rng-egd.c
+++ b/backends/rng-egd.c
@@ -13,6 +13,7 @@
#include "qemu/osdep.h"
#include "sysemu/rng.h"
#include "sysemu/char.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "hw/qdev.h" /* just for DEFINE_PROP_CHR */
diff --git a/backends/rng-random.c b/backends/rng-random.c
index 122e8d494d..2e44e25190 100644
--- a/backends/rng-random.c
+++ b/backends/rng-random.c
@@ -13,6 +13,7 @@
#include "qemu/osdep.h"
#include "sysemu/rng-random.h"
#include "sysemu/rng.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/main-loop.h"
diff --git a/backends/rng.c b/backends/rng.c
index e57e2b4b52..398ebe4a7d 100644
--- a/backends/rng.c
+++ b/backends/rng.c
@@ -12,6 +12,7 @@
#include "qemu/osdep.h"
#include "sysemu/rng.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qom/object_interfaces.h"
diff --git a/backends/tpm.c b/backends/tpm.c
index d53da18627..536f262bb7 100644
--- a/backends/tpm.c
+++ b/backends/tpm.c
@@ -14,6 +14,7 @@
#include "qemu/osdep.h"
#include "sysemu/tpm_backend.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/tpm.h"
#include "qemu/thread.h"
diff --git a/block/backup.c b/block/backup.c
index ab3e345e92..77280c6b35 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -17,6 +17,7 @@
#include "block/block.h"
#include "block/block_int.h"
#include "block/blockjob.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"
#include "sysemu/block-backend.h"
diff --git a/block/blkdebug.c b/block/blkdebug.c
index f85c54bdc8..792d36b994 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/config-file.h"
#include "block/block_int.h"
diff --git a/block/blkverify.c b/block/blkverify.c
index 2a885cc08d..41432e5565 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/sockets.h" /* for EINPROGRESS on Windows */
#include "block/block_int.h"
#include "qapi/qmp/qdict.h"
diff --git a/block/bochs.c b/block/bochs.c
index 8b953bb44c..af8b7abdfd 100644
--- a/block/bochs.c
+++ b/block/bochs.c
@@ -23,6 +23,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/module.h"
diff --git a/block/cloop.c b/block/cloop.c
index 41bdee8d7f..a84f14019c 100644
--- a/block/cloop.c
+++ b/block/cloop.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/module.h"
diff --git a/block/commit.c b/block/commit.c
index 446a3aeadd..cba0e8c1e8 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -16,6 +16,7 @@
#include "trace.h"
#include "block/block_int.h"
#include "block/blockjob.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"
#include "sysemu/block-backend.h"
diff --git a/block/curl.c b/block/curl.c
index c70bfb404d..fe331ca1f5 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "block/block_int.h"
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 556e1d15c4..4902ca557f 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include "config-host.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "trace.h"
#include "block/block_int.h"
diff --git a/block/dmg.c b/block/dmg.c
index 1018fd158e..a496eb7c9b 100644
--- a/block/dmg.c
+++ b/block/dmg.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/bswap.h"
diff --git a/block/gluster.c b/block/gluster.c
index 65077a0d0a..51e154c247 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -10,6 +10,7 @@
#include "qemu/osdep.h"
#include <glusterfs/api/glfs.h>
#include "block/block_int.h"
+#include "qapi/error.h"
#include "qemu/uri.h"
typedef struct GlusterAIOCB {
diff --git a/block/io.c b/block/io.c
index 41d954cad2..041af3c711 100644
--- a/block/io.c
+++ b/block/io.c
@@ -28,6 +28,7 @@
#include "block/blockjob.h"
#include "block/block_int.h"
#include "block/throttle-groups.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#define NOT_DONE 0x7fffffff /* used while emulated sync operation in progress */
diff --git a/block/mirror.c b/block/mirror.c
index 9635fa8e62..7bfd0d2996 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -16,6 +16,7 @@
#include "block/blockjob.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"
#include "qemu/bitmap.h"
diff --git a/block/nbd.c b/block/nbd.c
index 836424c88c..d103894120 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -28,6 +28,7 @@
#include "qemu/osdep.h"
#include "block/nbd-client.h"
+#include "qapi/error.h"
#include "qemu/uri.h"
#include "block/block_int.h"
#include "qemu/module.h"
diff --git a/block/null.c b/block/null.c
index d90165dea7..00bc6e478a 100644
--- a/block/null.c
+++ b/block/null.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "block/block_int.h"
#define NULL_OPT_LATENCY "latency-ns"
diff --git a/block/parallels.c b/block/parallels.c
index b322d05c08..9bba8b3d06 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -28,6 +28,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
diff --git a/block/qcow.c b/block/qcow.c
index 73cf8a7081..8ea8e5ceef 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 3e887e9ab0..31ecc10304 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include <zlib.h>
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "block/qcow2.h"
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 52a0a9ffc3..ca6094ff5b 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "block/qcow2.h"
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 13f88d1b8b..269acc2f4e 100644
--- a/block/qcow2-snapshot.c
+++ b/block/qcow2-snapshot.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "block/qcow2.h"
diff --git a/block/qed.c b/block/qed.c
index 5b24a9783f..20f05fe2b9 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "trace.h"
#include "qed.h"
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 8866121cf7..29dc658e43 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
diff --git a/block/raw-win32.c b/block/raw-win32.c
index 21a6cb89d7..bd07c93461 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/timer.h"
#include "block/block_int.h"
diff --git a/block/raw_bsd.c b/block/raw_bsd.c
index ea16a231c0..41dddf8db3 100644
--- a/block/raw_bsd.c
+++ b/block/raw_bsd.c
@@ -28,6 +28,7 @@
#include "qemu/osdep.h"
#include "block/block_int.h"
+#include "qapi/error.h"
#include "qemu/option.h"
static QemuOptsList raw_create_opts = {
diff --git a/block/rbd.c b/block/rbd.c
index abfea612ec..4f3fa304d5 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -13,6 +13,7 @@
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "block/block_int.h"
diff --git a/block/sheepdog.c b/block/sheepdog.c
index a3aeae4a67..a6b179b11d 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/uri.h"
#include "qemu/error-report.h"
diff --git a/block/snapshot.c b/block/snapshot.c
index 17a27b57ad..e9d721df68 100644
--- a/block/snapshot.c
+++ b/block/snapshot.c
@@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include "block/snapshot.h"
#include "block/block_int.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
QemuOptsList internal_snapshot_opts = {
diff --git a/block/ssh.c b/block/ssh.c
index 04deeba1ad..06928ed939 100644
--- a/block/ssh.c
+++ b/block/ssh.c
@@ -28,6 +28,7 @@
#include <libssh2_sftp.h>
#include "block/block_int.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/sockets.h"
#include "qemu/uri.h"
diff --git a/block/stream.c b/block/stream.c
index cafaa07a01..9b0b0f3573 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -15,6 +15,7 @@
#include "trace.h"
#include "block/block_int.h"
#include "block/blockjob.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/ratelimit.h"
#include "sysemu/block-backend.h"
diff --git a/block/vdi.c b/block/vdi.c
index df9fa47db1..cdf6b85216 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -50,6 +50,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
diff --git a/block/vhdx-log.c b/block/vhdx-log.c
index 369076126e..7ea7187fc4 100644
--- a/block/vhdx-log.c
+++ b/block/vhdx-log.c
@@ -18,6 +18,7 @@
*
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/error-report.h"
diff --git a/block/vhdx.c b/block/vhdx.c
index 78fe56ca04..59426d6c0f 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -16,6 +16,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
diff --git a/block/vmdk.c b/block/vmdk.c
index 29c8fc3d02..5e341c678b 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
diff --git a/block/vpc.c b/block/vpc.c
index 8435205a0c..912dfc1a82 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -23,6 +23,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "sysemu/block-backend.h"
diff --git a/block/vvfat.c b/block/vvfat.c
index b8d29e17cd..bdce8da320 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
#include <dirent.h>
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block_int.h"
#include "qemu/module.h"
diff --git a/bootdevice.c b/bootdevice.c
index dbc0159392..2e83ff05eb 100644
--- a/bootdevice.c
+++ b/bootdevice.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "qapi/visitor.h"
#include "qemu/error-report.h"
diff --git a/contrib/ivshmem-server/main.c b/contrib/ivshmem-server/main.c
index cca1061f0e..4c9a11f2c5 100644
--- a/contrib/ivshmem-server/main.c
+++ b/contrib/ivshmem-server/main.c
@@ -7,6 +7,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "ivshmem-server.h"
diff --git a/crypto/block-luks.c b/crypto/block-luks.c
index 58c1b940e1..439f89230c 100644
--- a/crypto/block-luks.c
+++ b/crypto/block-luks.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/block-luks.h"
diff --git a/crypto/block-qcow.c b/crypto/block-qcow.c
index 9f378e8635..be88c6f0ef 100644
--- a/crypto/block-qcow.c
+++ b/crypto/block-qcow.c
@@ -25,6 +25,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/block-qcow.h"
#include "crypto/secret.h"
diff --git a/crypto/block.c b/crypto/block.c
index 524ed91db8..da60eba85f 100644
--- a/crypto/block.c
+++ b/crypto/block.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/blockpriv.h"
#include "crypto/block-qcow.h"
#include "crypto/block-luks.h"
diff --git a/crypto/cipher.c b/crypto/cipher.c
index 5402d18525..cafb454363 100644
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/cipher.h"
diff --git a/crypto/hash.c b/crypto/hash.c
index 4a8c0caea1..b90af3495a 100644
--- a/crypto/hash.c
+++ b/crypto/hash.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/hash.h"
#ifdef CONFIG_GNUTLS_HASH
diff --git a/crypto/init.c b/crypto/init.c
index 31eea19bc9..1e564d9492 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "crypto/init.h"
+#include "qapi/error.h"
#include "qemu/thread.h"
#ifdef CONFIG_GNUTLS
diff --git a/crypto/ivgen-essiv.c b/crypto/ivgen-essiv.c
index 5649c01b85..2fd89def0f 100644
--- a/crypto/ivgen-essiv.c
+++ b/crypto/ivgen-essiv.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/ivgen-essiv.h"
typedef struct QCryptoIVGenESSIV QCryptoIVGenESSIV;
diff --git a/crypto/ivgen-plain.c b/crypto/ivgen-plain.c
index 6a85256cac..a56675d592 100644
--- a/crypto/ivgen-plain.c
+++ b/crypto/ivgen-plain.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/ivgen-plain.h"
static int qcrypto_ivgen_plain_init(QCryptoIVGen *ivgen,
diff --git a/crypto/ivgen-plain64.c b/crypto/ivgen-plain64.c
index 9ca6db9df2..94d86730fb 100644
--- a/crypto/ivgen-plain64.c
+++ b/crypto/ivgen-plain64.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/ivgen-plain.h"
static int qcrypto_ivgen_plain_init(QCryptoIVGen *ivgen,
diff --git a/crypto/ivgen.c b/crypto/ivgen.c
index 4ffc1eb886..f66435112b 100644
--- a/crypto/ivgen.c
+++ b/crypto/ivgen.c
@@ -19,6 +19,8 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
+
#include "crypto/ivgenpriv.h"
#include "crypto/ivgen-plain.h"
#include "crypto/ivgen-plain64.h"
diff --git a/crypto/pbkdf-gcrypt.c b/crypto/pbkdf-gcrypt.c
index 885614dfcc..997b311d84 100644
--- a/crypto/pbkdf-gcrypt.c
+++ b/crypto/pbkdf-gcrypt.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/pbkdf.h"
#include "gcrypt.h"
diff --git a/crypto/pbkdf-nettle.c b/crypto/pbkdf-nettle.c
index 1aa7395ea5..db9fc15780 100644
--- a/crypto/pbkdf-nettle.c
+++ b/crypto/pbkdf-nettle.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/pbkdf.h"
#include "nettle/pbkdf2.h"
diff --git a/crypto/pbkdf-stub.c b/crypto/pbkdf-stub.c
index cfc30d3c2a..266a5051b7 100644
--- a/crypto/pbkdf-stub.c
+++ b/crypto/pbkdf-stub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/pbkdf.h"
bool qcrypto_pbkdf2_supports(QCryptoHashAlgorithm hash G_GNUC_UNUSED)
diff --git a/crypto/pbkdf.c b/crypto/pbkdf.c
index 90721d85d6..695cc35df1 100644
--- a/crypto/pbkdf.c
+++ b/crypto/pbkdf.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/pbkdf.h"
#ifndef _WIN32
#include <sys/resource.h>
diff --git a/crypto/secret.c b/crypto/secret.c
index be736f2cd5..285ab7a63c 100644
--- a/crypto/secret.c
+++ b/crypto/secret.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "crypto/secret.h"
#include "crypto/cipher.h"
+#include "qapi/error.h"
#include "qom/object_interfaces.h"
#include "qemu/base64.h"
#include "trace.h"
diff --git a/crypto/tlscreds.c b/crypto/tlscreds.c
index fc99589c22..1620e126ae 100644
--- a/crypto/tlscreds.c
+++ b/crypto/tlscreds.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/tlscredspriv.h"
#include "trace.h"
diff --git a/crypto/tlscredsanon.c b/crypto/tlscredsanon.c
index f36a793d16..1464220080 100644
--- a/crypto/tlscredsanon.c
+++ b/crypto/tlscredsanon.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "crypto/tlscredsanon.h"
#include "crypto/tlscredspriv.h"
+#include "qapi/error.h"
#include "qom/object_interfaces.h"
#include "trace.h"
diff --git a/crypto/tlscredsx509.c b/crypto/tlscredsx509.c
index 99130433fd..6a0179c2e1 100644
--- a/crypto/tlscredsx509.c
+++ b/crypto/tlscredsx509.c
@@ -22,6 +22,7 @@
#include "crypto/tlscredsx509.h"
#include "crypto/tlscredspriv.h"
#include "crypto/secret.h"
+#include "qapi/error.h"
#include "qom/object_interfaces.h"
#include "trace.h"
diff --git a/crypto/tlssession.c b/crypto/tlssession.c
index e0d9658e80..a543e5a576 100644
--- a/crypto/tlssession.c
+++ b/crypto/tlssession.c
@@ -22,6 +22,7 @@
#include "crypto/tlssession.h"
#include "crypto/tlscredsanon.h"
#include "crypto/tlscredsx509.h"
+#include "qapi/error.h"
#include "qemu/acl.h"
#include "trace.h"
diff --git a/device_tree.c b/device_tree.c
index 6204af88c8..ccba1fd4a4 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -17,6 +17,7 @@
#include <dirent.h>
#endif
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "sysemu/device_tree.h"
diff --git a/exec.c b/exec.c
index f398d212f6..151908ebdf 100644
--- a/exec.c
+++ b/exec.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#ifndef _WIN32
#include <sys/mman.h>
#endif
diff --git a/gdbstub.c b/gdbstub.c
index fdcb0eea8f..e4e480f668 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#ifdef CONFIG_USER_ONLY
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index db5f4780dc..f5e30125fc 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -14,6 +14,7 @@
#include "qemu/osdep.h"
#include "hw/virtio/virtio.h"
#include "hw/i386/pc.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/iov.h"
#include "qemu/sockets.h"
diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c
index 5a410a5287..4d86743fde 100644
--- a/hw/acpi/cpu_hotplug.c
+++ b/hw/acpi/cpu_hotplug.c
@@ -12,6 +12,7 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/acpi/cpu_hotplug.h"
+#include "qapi/error.h"
#include "qom/cpu.h"
static uint64_t cpu_status_read(void *opaque, hwaddr addr, unsigned int size)
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 72202545e0..27e978f5fd 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -25,6 +25,7 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
+#include "qapi/error.h"
#include "qapi/visitor.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c
index 3e338b5ec2..71f4c4e14b 100644
--- a/hw/acpi/pcihp.c
+++ b/hw/acpi/pcihp.c
@@ -35,6 +35,7 @@
#include "exec/ioport.h"
#include "exec/address-spaces.h"
#include "hw/pci/pci_bus.h"
+#include "qapi/error.h"
#include "qom/qom-qobject.h"
#include "qapi/qmp/qint.h"
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 9694e5238f..16abdf1624 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -26,6 +26,7 @@
#include "hw/pci/pci.h"
#include "hw/acpi/acpi.h"
#include "sysemu/sysemu.h"
+#include "qapi/error.h"
#include "qemu/range.h"
#include "exec/ioport.h"
#include "hw/nvram/fw_cfg.h"
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
index b86ff5ea9b..97721b535d 100644
--- a/hw/alpha/typhoon.c
+++ b/hw/alpha/typhoon.c
@@ -7,6 +7,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/devices.h"
diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
index 02c8caa191..b4d3cf6d03 100644
--- a/hw/arm/allwinner-a10.c
+++ b/hw/arm/allwinner-a10.c
@@ -16,6 +16,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/devices.h"
#include "hw/arm/allwinner-a10.h"
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index ed7d97fc21..c68d644588 100644
--- a/hw/arm/armv7m.c
+++ b/hw/arm/armv7m.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
#include "hw/loader.h"
diff --git a/hw/arm/ast2400.c b/hw/arm/ast2400.c
index daa5518c92..976b651a62 100644
--- a/hw/arm/ast2400.c
+++ b/hw/arm/ast2400.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "exec/address-spaces.h"
#include "hw/arm/ast2400.h"
#include "hw/char/serial.h"
diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c
index 8099a8a92e..234d518430 100644
--- a/hw/arm/bcm2835_peripherals.c
+++ b/hw/arm/bcm2835_peripherals.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/arm/bcm2835_peripherals.h"
#include "hw/misc/bcm2835_mbox_defs.h"
#include "hw/arm/raspi_platform.h"
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
index 89a6b35b81..d85f051af4 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/arm/bcm2836.h"
#include "hw/arm/raspi_platform.h"
#include "hw/sysbus.h"
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 8ba0e4272a..5975fbfa8c 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/arm/arm.h"
#include "hw/arm/linux-boot-if.h"
diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
index 2382c59158..69fdfc9eeb 100644
--- a/hw/arm/cubieboard.c
+++ b/hw/arm/cubieboard.c
@@ -16,6 +16,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/devices.h"
#include "hw/boards.h"
diff --git a/hw/arm/digic.c b/hw/arm/digic.c
index 82087bacb8..e0f9730325 100644
--- a/hw/arm/digic.c
+++ b/hw/arm/digic.c
@@ -21,6 +21,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/arm/digic.h"
#define DIGIC4_TIMER_BASE(n) (0xc0210000 + (n) * 0x100)
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
index e5308f47ab..c4bec429dd 100644
--- a/hw/arm/digic_boards.c
+++ b/hw/arm/digic_boards.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/boards.h"
#include "exec/address-spaces.h"
#include "qemu/error-report.h"
diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c
index 6a8f0b54ce..e27a18274d 100644
--- a/hw/arm/exynos4210.c
+++ b/hw/arm/exynos4210.c
@@ -22,6 +22,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/boards.h"
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
diff --git a/hw/arm/fsl-imx25.c b/hw/arm/fsl-imx25.c
index 1fbc317b74..f47d471744 100644
--- a/hw/arm/fsl-imx25.c
+++ b/hw/arm/fsl-imx25.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/arm/fsl-imx25.h"
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c
index 0d69a2c70b..2164e679f5 100644
--- a/hw/arm/fsl-imx31.c
+++ b/hw/arm/fsl-imx31.c
@@ -20,6 +20,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/arm/fsl-imx31.h"
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index e37378c69f..d9930c0d34 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
#include "hw/devices.h"
diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c
index e3cffd190c..facd605bc8 100644
--- a/hw/arm/imx25_pdk.c
+++ b/hw/arm/imx25_pdk.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/arm/fsl-imx25.h"
#include "hw/boards.h"
#include "qemu/error-report.h"
diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c
index c6656a817c..5a4540b3b7 100644
--- a/hw/arm/integratorcp.c
+++ b/hw/arm/integratorcp.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/devices.h"
#include "hw/boards.h"
diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c
index 2eeb9d8973..12cbd052bb 100644
--- a/hw/arm/kzm.c
+++ b/hw/arm/kzm.c
@@ -14,6 +14,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/arm/fsl-imx31.h"
#include "hw/boards.h"
#include "qemu/error-report.h"
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 98a892ff62..454acc5d2b 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -12,6 +12,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/arm/pxa.h"
#include "hw/arm/arm.h"
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
index 54548f38bb..28d5af1d9b 100644
--- a/hw/arm/musicpal.c
+++ b/hw/arm/musicpal.c
@@ -10,6 +10,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
#include "hw/devices.h"
diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.c
index 49da6e360d..23d792837f 100644
--- a/hw/arm/netduino2.c
+++ b/hw/arm/netduino2.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/boards.h"
#include "qemu/error-report.h"
#include "hw/arm/stm32f205_soc.h"
diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
index 9a5f33bd8a..4561d4a483 100644
--- a/hw/arm/nseries.c
+++ b/hw/arm/nseries.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "sysemu/sysemu.h"
#include "hw/arm/omap.h"
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index 6f68130419..387a776c83 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/boards.h"
#include "hw/hw.h"
#include "hw/arm/arm.h"
diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c
index d11224e81e..74d45baed8 100644
--- a/hw/arm/omap2.c
+++ b/hw/arm/omap2.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "hw/boards.h"
diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c
index cd50691d8b..5d74026cb2 100644
--- a/hw/arm/omap_sx1.c
+++ b/hw/arm/omap_sx1.c
@@ -26,6 +26,7 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "ui/console.h"
#include "hw/arm/omap.h"
diff --git a/hw/arm/palm.c b/hw/arm/palm.c
index cae0a46561..7f460732e3 100644
--- a/hw/arm/palm.c
+++ b/hw/arm/palm.c
@@ -17,6 +17,7 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "audio/audio.h"
#include "sysemu/sysemu.h"
diff --git a/hw/arm/palmetto-bmc.c b/hw/arm/palmetto-bmc.c
index 55d741918b..6b3bb77a6d 100644
--- a/hw/arm/palmetto-bmc.c
+++ b/hw/arm/palmetto-bmc.c
@@ -10,6 +10,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "exec/address-spaces.h"
#include "hw/arm/arm.h"
#include "hw/arm/ast2400.h"
diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c
index ff6ac7a60a..24109091bf 100644
--- a/hw/arm/pxa2xx.c
+++ b/hw/arm/pxa2xx.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/pxa.h"
#include "sysemu/sysemu.h"
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 83fe8097e5..d2b02e6f2b 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/arm/bcm2836.h"
#include "qemu/error-report.h"
#include "hw/boards.h"
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index 481ae00fbc..c45441aa34 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
#include "hw/arm/primecell.h"
diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c
index c3048f3ea6..50949d06af 100644
--- a/hw/arm/spitz.c
+++ b/hw/arm/spitz.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/arm/pxa.h"
#include "hw/arm/arm.h"
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index c3c72f1b49..3caeb0679b 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/ssi/ssi.h"
#include "hw/arm/arm.h"
diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c
index 79bfe6d10f..6ce2fdcea7 100644
--- a/hw/arm/stm32f205_soc.c
+++ b/hw/arm/stm32f205_soc.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/arm/arm.h"
#include "exec/address-spaces.h"
#include "hw/arm/stm32f205_soc.h"
diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c
index 49bd212d07..5debb3348c 100644
--- a/hw/arm/sysbus-fdt.c
+++ b/hw/arm/sysbus-fdt.c
@@ -22,6 +22,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include <libfdt.h>
#include "qemu-common.h"
#ifdef CONFIG_LINUX
diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c
index d83c1e1785..4e9494f94c 100644
--- a/hw/arm/tosa.c
+++ b/hw/arm/tosa.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/arm/pxa.h"
#include "hw/arm/arm.h"
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
index 5f7523e355..43f429e951 100644
--- a/hw/arm/versatilepb.c
+++ b/hw/arm/versatilepb.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
#include "hw/devices.h"
diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
index 769390c6c1..50832993a2 100644
--- a/hw/arm/vexpress.c
+++ b/hw/arm/vexpress.c
@@ -22,6 +22,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
#include "hw/arm/primecell.h"
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 6a86b2ca2c..f51fe396ce 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -27,6 +27,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "hw/arm/virt-acpi-build.h"
#include "qemu/bitmap.h"
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 95331a5662..a5e787dec6 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -29,6 +29,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
#include "hw/arm/primecell.h"
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index a35983a9ec..fa8bbe7100 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -16,6 +16,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/arm.h"
#include "net/net.h"
diff --git a/hw/arm/xlnx-ep108.c b/hw/arm/xlnx-ep108.c
index a1bd283a52..3313ad0ed6 100644
--- a/hw/arm/xlnx-ep108.c
+++ b/hw/arm/xlnx-ep108.c
@@ -16,6 +16,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/arm/xlnx-zynqmp.h"
#include "hw/boards.h"
#include "qemu/error-report.h"
diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c
index 4fbb63550b..0cff6deaba 100644
--- a/hw/arm/xlnx-zynqmp.c
+++ b/hw/arm/xlnx-zynqmp.c
@@ -16,6 +16,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/arm/xlnx-zynqmp.h"
#include "hw/intc/arm_gic_common.h"
#include "exec/address-spaces.h"
diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c
index 1270b19cc6..355a2595d4 100644
--- a/hw/audio/adlib.c
+++ b/hw/audio/adlib.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/audio/audio.h"
#include "audio/audio.h"
diff --git a/hw/audio/gus.c b/hw/audio/gus.c
index b416a54909..9dd6947bee 100644
--- a/hw/audio/gus.c
+++ b/hw/audio/gus.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/audio/audio.h"
#include "audio/audio.h"
diff --git a/hw/block/block.c b/hw/block/block.c
index 960df2b9d0..97a59d4fa2 100644
--- a/hw/block/block.c
+++ b/hw/block/block.c
@@ -11,6 +11,7 @@
#include "sysemu/blockdev.h"
#include "sysemu/block-backend.h"
#include "hw/block/block.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
void blkconf_serial(BlockConf *conf, char **serial)
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index 36f3d2b813..e666dd4ff0 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "trace.h"
#include "qemu/iov.h"
#include "qemu/thread.h"
diff --git a/hw/block/fdc.c b/hw/block/fdc.c
index fc3aef9cd1..72dc1484b1 100644
--- a/hw/block/fdc.c
+++ b/hw/block/fdc.c
@@ -30,6 +30,7 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/block/fdc.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
#include "hw/isa/isa.h"
diff --git a/hw/block/nand.c b/hw/block/nand.c
index f51e13fcac..29c6596810 100644
--- a/hw/block/nand.c
+++ b/hw/block/nand.c
@@ -23,6 +23,7 @@
#include "hw/block/flash.h"
#include "sysemu/block-backend.h"
#include "hw/qdev.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
# define NAND_CMD_READ0 0x00
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index c68b62521a..173988ee84 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -26,6 +26,7 @@
#include <hw/pci/msix.h>
#include <hw/pci/pci.h>
#include "sysemu/sysemu.h"
+#include "qapi/error.h"
#include "qapi/visitor.h"
#include "sysemu/block-backend.h"
diff --git a/hw/block/onenand.c b/hw/block/onenand.c
index 91896851f5..883f4b1faa 100644
--- a/hw/block/onenand.c
+++ b/hw/block/onenand.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "hw/hw.h"
#include "hw/block/flash.h"
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index a4c4fa1c69..c475c2aea7 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -40,6 +40,7 @@
#include "hw/hw.h"
#include "hw/block/flash.h"
#include "sysemu/block-backend.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "qemu/bitops.h"
#include "exec/address-spaces.h"
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index aaa697adbb..eadc61b7df 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -38,6 +38,7 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/block/flash.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/block-backend.h"
#include "exec/address-spaces.h"
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index cb710f16fa..870d345244 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/iov.h"
#include "qemu/error-report.h"
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 635328fa69..e619a1f7d9 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -29,6 +29,7 @@
#include "xen_blkif.h"
#include "sysemu/blockdev.h"
#include "sysemu/block-backend.h"
+#include "qapi/error.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
diff --git a/hw/bt/hci.c b/hw/bt/hci.c
index 8bc33b50a5..1eaa442c38 100644
--- a/hw/bt/hci.c
+++ b/hw/bt/hci.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/timer.h"
#include "hw/usb.h"
diff --git a/hw/char/debugcon.c b/hw/char/debugcon.c
index 148632e686..e7f025ec67 100644
--- a/hw/char/debugcon.c
+++ b/hw/char/debugcon.c
@@ -25,6 +25,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "sysemu/char.h"
#include "hw/isa/isa.h"
diff --git a/hw/char/parallel.c b/hw/char/parallel.c
index f6ba76fd60..11c78fed88 100644
--- a/hw/char/parallel.c
+++ b/hw/char/parallel.c
@@ -23,6 +23,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "sysemu/char.h"
#include "hw/isa/isa.h"
diff --git a/hw/char/serial-isa.c b/hw/char/serial-isa.c
index b9b5bc6db2..1594ec4db3 100644
--- a/hw/char/serial-isa.c
+++ b/hw/char/serial-isa.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/char/serial.h"
#include "hw/isa/isa.h"
diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c
index 8f1b6f3d84..303104dd19 100644
--- a/hw/char/serial-pci.c
+++ b/hw/char/serial-pci.c
@@ -26,6 +26,7 @@
/* see docs/specs/pci-serial.txt */
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/char/serial.h"
#include "hw/pci/pci.h"
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 39e07db088..6f89f2c9e6 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -26,6 +26,7 @@
#include "qemu/osdep.h"
#include "hw/char/serial.h"
#include "sysemu/char.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "exec/address-spaces.h"
#include "qemu/error-report.h"
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
index 747c69d12d..f3aff5eeea 100644
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -1,4 +1,5 @@
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/qdev.h"
#include "sysemu/char.h"
#include "hw/ppc/spapr.h"
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index 99cb6836ad..6e5de6dec2 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/iov.h"
#include "monitor/monitor.h"
#include "qemu/error-report.h"
diff --git a/hw/core/loader.c b/hw/core/loader.c
index 8e8031ca3c..93410e35b5 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -43,6 +43,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "disas/disas.h"
#include "monitor/monitor.h"
diff --git a/hw/core/machine.c b/hw/core/machine.c
index a8c4680b0c..136bf275bc 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -12,6 +12,7 @@
#include "qemu/osdep.h"
#include "hw/boards.h"
+#include "qapi/error.h"
#include "qapi-visit.h"
#include "qapi/visitor.h"
#include "hw/sysbus.h"
diff --git a/hw/core/nmi.c b/hw/core/nmi.c
index 6ca569bd7f..e8bcc4177b 100644
--- a/hw/core/nmi.c
+++ b/hw/core/nmi.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "hw/nmi.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "monitor/monitor.h"
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index e10cede749..891219ae05 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -13,6 +13,7 @@
#include "qemu/osdep.h"
#include "net/net.h"
#include "hw/qdev.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index bc89800246..eef932cbf1 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -1,6 +1,7 @@
#include "qemu/osdep.h"
#include "net/net.h"
#include "hw/qdev.h"
+#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "sysemu/block-backend.h"
diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpcore.c
index a221b8fe7b..bc05152fd3 100644
--- a/hw/cpu/a15mpcore.c
+++ b/hw/cpu/a15mpcore.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/cpu/a15mpcore.h"
#include "sysemu/kvm.h"
#include "kvm_arm.h"
diff --git a/hw/cpu/a9mpcore.c b/hw/cpu/a9mpcore.c
index 23c882fe9a..5459ae8c1b 100644
--- a/hw/cpu/a9mpcore.c
+++ b/hw/cpu/a9mpcore.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/cpu/a9mpcore.h"
static void a9mp_priv_set_irq(void *opaque, int irq, int level)
diff --git a/hw/cpu/arm11mpcore.c b/hw/cpu/arm11mpcore.c
index 5f4ca31927..eb244658b9 100644
--- a/hw/cpu/arm11mpcore.c
+++ b/hw/cpu/arm11mpcore.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/cpu/arm11mpcore.h"
#include "hw/intc/realview_gic.h"
diff --git a/hw/cpu/realview_mpcore.c b/hw/cpu/realview_mpcore.c
index c5c4dfced5..39d4ebeb1d 100644
--- a/hw/cpu/realview_mpcore.c
+++ b/hw/cpu/realview_mpcore.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/cpu/arm11mpcore.h"
#include "hw/intc/realview_gic.h"
diff --git a/hw/cris/axis_dev88.c b/hw/cris/axis_dev88.c
index f2ba1d0775..8cfa082acd 100644
--- a/hw/cris/axis_dev88.c
+++ b/hw/cris/axis_dev88.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "net/net.h"
#include "hw/block/flash.h"
diff --git a/hw/display/bcm2835_fb.c b/hw/display/bcm2835_fb.c
index 779b56f07b..506f1d3d90 100644
--- a/hw/display/bcm2835_fb.c
+++ b/hw/display/bcm2835_fb.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/display/bcm2835_fb.h"
#include "hw/display/framebuffer.h"
#include "ui/pixel_ops.h"
diff --git a/hw/display/cg3.c b/hw/display/cg3.c
index 321a25157b..fc0d97fa4b 100644
--- a/hw/display/cg3.c
+++ b/hw/display/cg3.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "ui/console.h"
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index 57b91a77ca..3d712d592f 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -27,6 +27,7 @@
* available at http://home.worldonline.dk/~finth/
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "ui/console.h"
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index 29572437e4..183e1d2b60 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/char/serial.h"
#include "ui/console.h"
diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c
index 31043b1783..da3ceceb0a 100644
--- a/hw/display/tc6393xb.c
+++ b/hw/display/tc6393xb.c
@@ -11,6 +11,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/devices.h"
#include "hw/block/flash.h"
diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index 8afc2f33c6..cac9fe3d53 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "ui/console.h"
#include "ui/pixel_ops.h"
diff --git a/hw/display/vga.c b/hw/display/vga.c
index 555cac64c7..25dc978b95 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "vga.h"
#include "ui/console.h"
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index 17bba630eb..0c63fa8513 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/loader.h"
#include "trace.h"
diff --git a/hw/dma/bcm2835_dma.c b/hw/dma/bcm2835_dma.c
index c7ce4e4881..5421175998 100644
--- a/hw/dma/bcm2835_dma.c
+++ b/hw/dma/bcm2835_dma.c
@@ -4,6 +4,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/dma/bcm2835_dma.h"
/* DMA CS Control and Status bits */
diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c
index 37ea7e41ff..ea89ecb00e 100644
--- a/hw/dma/pl330.c
+++ b/hw/dma/pl330.c
@@ -16,6 +16,7 @@
#include "qemu/osdep.h"
#include "hw/sysbus.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/dma.h"
diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c
index ce5c1e6fbd..a4753e55a2 100644
--- a/hw/dma/xilinx_axidma.c
+++ b/hw/dma/xilinx_axidma.c
@@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include "hw/sysbus.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "hw/ptimer.h"
#include "qemu/log.h"
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 325d8ce13c..35180efe0c 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -21,6 +21,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "acpi-build.h"
#include <glib.h>
#include "qemu-common.h"
diff --git a/hw/i386/kvm/i8254.c b/hw/i386/kvm/i8254.c
index e43b5c4461..a4462e5ca9 100644
--- a/hw/i386/kvm/i8254.c
+++ b/hw/i386/kvm/i8254.c
@@ -23,6 +23,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "hw/timer/i8254.h"
diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
index d4089e7cc2..bf425a2b9f 100644
--- a/hw/i386/kvm/pci-assign.c
+++ b/hw/i386/kvm/pci-assign.c
@@ -21,6 +21,7 @@
* Copyright (C) 2008, IBM, Muli Ben-Yehuda (muli@il.ibm.com)
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include <sys/mman.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
index 2324e700b0..f915ad0a36 100644
--- a/hw/i386/pc_sysfw.c
+++ b/hw/i386/pc_sysfw.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "sysemu/block-backend.h"
#include "qemu/error-report.h"
#include "hw/sysbus.h"
diff --git a/hw/i386/pci-assign-load-rom.c b/hw/i386/pci-assign-load-rom.c
index bff979a4d0..4bbb08c955 100644
--- a/hw/i386/pci-assign-load-rom.c
+++ b/hw/i386/pci-assign-load-rom.c
@@ -2,6 +2,7 @@
* This is splited from hw/i386/kvm/pci-assign.c
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "qemu/error-report.h"
diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
index a2247b917a..aa7839324c 100644
--- a/hw/i386/xen/xen_platform.c
+++ b/hw/i386/xen/xen_platform.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/ide.h"
diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c
index 1095c65d41..c093b34458 100644
--- a/hw/i386/xen/xen_pvdevice.c
+++ b/hw/i386/xen/xen_pvdevice.c
@@ -30,6 +30,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "trace.h"
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 2d14a768f1..4bc74a32d2 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include <hw/hw.h>
#include "sysemu/dma.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include <hw/ide/internal.h>
#include "sysemu/block-backend.h"
diff --git a/hw/input/milkymist-softusb.c b/hw/input/milkymist-softusb.c
index 64b929281e..40dfca157f 100644
--- a/hw/input/milkymist-softusb.c
+++ b/hw/input/milkymist-softusb.c
@@ -22,6 +22,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "trace.h"
diff --git a/hw/input/virtio-input-host.c b/hw/input/virtio-input-host.c
index ddee54cb7d..9e0f46d88f 100644
--- a/hw/input/virtio-input-host.c
+++ b/hw/input/virtio-input-host.c
@@ -5,6 +5,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/sockets.h"
diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c
index 5061f4cf7a..672c207eb5 100644
--- a/hw/input/virtio-input.c
+++ b/hw/input/virtio-input.c
@@ -5,6 +5,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/iov.h"
#include "hw/qdev.h"
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index 659f377e55..4abe145c68 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -18,6 +18,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/i386/apic.h"
#include "hw/i386/apic_internal.h"
#include "trace.h"
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
index 0834c2f1a7..f55124174d 100644
--- a/hw/intc/arm_gic.c
+++ b/hw/intc/arm_gic.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "hw/sysbus.h"
#include "gic_internal.h"
+#include "qapi/error.h"
#include "qom/cpu.h"
//#define DEBUG_GIC
diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c
index 707d00ded4..0a1f56af19 100644
--- a/hw/intc/arm_gic_common.c
+++ b/hw/intc/arm_gic_common.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "gic_internal.h"
#include "hw/arm/linux-boot-if.h"
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
index e61c5d9d47..bc85ab769f 100644
--- a/hw/intc/arm_gic_kvm.c
+++ b/hw/intc/arm_gic_kvm.c
@@ -20,6 +20,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "migration/migration.h"
#include "sysemu/kvm.h"
diff --git a/hw/intc/arm_gicv2m.c b/hw/intc/arm_gicv2m.c
index ebd368bbad..e8b5177dcc 100644
--- a/hw/intc/arm_gicv2m.c
+++ b/hw/intc/arm_gicv2m.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/pci/msi.h"
diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c
index e4f0f5a589..b9d3824f2b 100644
--- a/hw/intc/arm_gicv3_common.c
+++ b/hw/intc/arm_gicv3_common.c
@@ -21,6 +21,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/intc/arm_gicv3_common.h"
static void gicv3_pre_save(void *opaque)
diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c
index 90c7950704..acc1730048 100644
--- a/hw/intc/arm_gicv3_kvm.c
+++ b/hw/intc/arm_gicv3_kvm.c
@@ -20,6 +20,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/intc/arm_gicv3_common.h"
#include "hw/sysbus.h"
#include "sysemu/kvm.h"
diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index 92f6a44eec..3a23d34054 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "qemu/timer.h"
#include "hw/arm/arm.h"
diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c
index 0a48de29b9..1b7ec5ec20 100644
--- a/hw/intc/ioapic_common.c
+++ b/hw/intc/ioapic_common.c
@@ -20,6 +20,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "monitor/monitor.h"
#include "hw/i386/ioapic.h"
#include "hw/i386/ioapic_internal.h"
diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
index 7685250bf4..2d3769310f 100644
--- a/hw/intc/openpic.c
+++ b/hw/intc/openpic.c
@@ -41,6 +41,7 @@
#include "hw/ppc/ppc_e500.h"
#include "hw/sysbus.h"
#include "hw/pci/msi.h"
+#include "qapi/error.h"
#include "qemu/bitops.h"
#include "qapi/qmp/qerror.h"
diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
index 778af4a7d4..e47e94f2cf 100644
--- a/hw/intc/openpic_kvm.c
+++ b/hw/intc/openpic_kvm.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include <sys/ioctl.h>
#include "exec/address-spaces.h"
#include "hw/hw.h"
diff --git a/hw/intc/realview_gic.c b/hw/intc/realview_gic.c
index 291f196637..50bbab66ee 100644
--- a/hw/intc/realview_gic.c
+++ b/hw/intc/realview_gic.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/intc/realview_gic.h"
static void realview_gic_set_irq(void *opaque, int irq, int level)
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 213a370925..04a079cd55 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "trace.h"
#include "qemu/timer.h"
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index 9fe06677f9..9bd85ac03c 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "trace.h"
#include "hw/ppc/spapr.h"
diff --git a/hw/ipack/ipack.c b/hw/ipack/ipack.c
index 7c5c30de55..5f99ed9a79 100644
--- a/hw/ipack/ipack.c
+++ b/hw/ipack/ipack.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/ipack/ipack.h"
IPackDevice *ipack_device_find(IPackBus *bus, int32_t slot)
diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c
index c31a3a02c2..fe12112a2f 100644
--- a/hw/ipmi/ipmi_bmc_extern.c
+++ b/hw/ipmi/ipmi_bmc_extern.c
@@ -28,6 +28,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/char.h"
#include "sysemu/sysemu.h"
diff --git a/hw/ipmi/isa_ipmi_bt.c b/hw/ipmi/isa_ipmi_bt.c
index ace2dc0a80..aaea12ecdd 100644
--- a/hw/ipmi/isa_ipmi_bt.c
+++ b/hw/ipmi/isa_ipmi_bt.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/ipmi/ipmi.h"
#include "hw/isa/isa.h"
diff --git a/hw/ipmi/isa_ipmi_kcs.c b/hw/ipmi/isa_ipmi_kcs.c
index 9841b7f3d5..2742ce06c4 100644
--- a/hw/ipmi/isa_ipmi_kcs.c
+++ b/hw/ipmi/isa_ipmi_kcs.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/ipmi/ipmi.h"
#include "hw/isa/isa.h"
diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
index c3b7388529..7aa115caf2 100644
--- a/hw/isa/isa-bus.c
+++ b/hw/isa/isa-bus.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "monitor/monitor.h"
#include "hw/sysbus.h"
diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
index 6b5c7a2e02..c3ebf3e7a0 100644
--- a/hw/isa/pc87312.c
+++ b/hw/isa/pc87312.c
@@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include "hw/isa/pc87312.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
diff --git a/hw/m68k/an5206.c b/hw/m68k/an5206.c
index 85f72770d7..c00cc700b7 100644
--- a/hw/m68k/an5206.c
+++ b/hw/m68k/an5206.c
@@ -7,6 +7,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/m68k/mcf.h"
#include "hw/boards.h"
diff --git a/hw/m68k/mcf5208.c b/hw/m68k/mcf5208.c
index 4f49d34a8f..67c3bb6815 100644
--- a/hw/m68k/mcf5208.c
+++ b/hw/m68k/mcf5208.c
@@ -6,6 +6,7 @@
* This code is licensed under the GPL
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/m68k/mcf.h"
#include "qemu/timer.h"
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index c4b44300eb..9e7de56829 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "hw/mem/pc-dimm.h"
+#include "qapi/error.h"
#include "qemu/config-file.h"
#include "qapi/visitor.h"
#include "qemu/range.h"
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
index 85e974b72a..4505d183f2 100644
--- a/hw/microblaze/petalogix_ml605_mmu.c
+++ b/hw/microblaze/petalogix_ml605_mmu.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/hw.h"
#include "net/net.h"
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
index 606ba1f01a..bf19ad730f 100644
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/hw.h"
#include "net/net.h"
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index 4e5581b167..bdb716e725 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/char/serial.h"
diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c
index 1ecff44a54..23b2dcabf0 100644
--- a/hw/mips/mips_mipssim.c
+++ b/hw/mips/mips_mipssim.c
@@ -25,6 +25,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/mips/mips.h"
#include "hw/mips/cpudevs.h"
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index 724b1e9d51..0ef2fb1655 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -8,6 +8,7 @@
* the standard PC ISA addresses.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/mips/mips.h"
#include "hw/mips/cpudevs.h"
diff --git a/hw/misc/bcm2835_mbox.c b/hw/misc/bcm2835_mbox.c
index 106585a7bf..263280fd49 100644
--- a/hw/misc/bcm2835_mbox.c
+++ b/hw/misc/bcm2835_mbox.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/misc/bcm2835_mbox.h"
#define MAIL0_PEEK 0x90
diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c
index 15dcc02f99..530411f841 100644
--- a/hw/misc/bcm2835_property.c
+++ b/hw/misc/bcm2835_property.c
@@ -4,6 +4,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/misc/bcm2835_property.h"
#include "hw/misc/bcm2835_mbox_defs.h"
#include "sysemu/dma.h"
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 1838bc8506..55071dc767 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -17,6 +17,7 @@
* GNU GPL, version 2 or (at your option) any later version.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c
index 42325bff50..6e94e3b7cf 100644
--- a/hw/misc/macio/macio.c
+++ b/hw/misc/macio/macio.c
@@ -23,6 +23,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/ppc/mac.h"
#include "hw/pci/pci.h"
diff --git a/hw/misc/tmp105.c b/hw/misc/tmp105.c
index b53f6babad..f5c2472b5b 100644
--- a/hw/misc/tmp105.c
+++ b/hw/misc/tmp105.c
@@ -22,6 +22,7 @@
#include "hw/hw.h"
#include "hw/i2c/i2c.h"
#include "tmp105.h"
+#include "qapi/error.h"
#include "qapi/visitor.h"
static void tmp105_interrupt_update(TMP105State *s)
diff --git a/hw/moxie/moxiesim.c b/hw/moxie/moxiesim.c
index d88c9428e0..800c7cc935 100644
--- a/hw/moxie/moxiesim.c
+++ b/hw/moxie/moxiesim.c
@@ -25,6 +25,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/hw.h"
#include "hw/i386/pc.h"
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index e847b77cf4..819743e117 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -21,6 +21,7 @@
#include "hw/sysbus.h"
#include "hw/devices.h"
#include "net/net.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include <zlib.h>
diff --git a/hw/net/milkymist-minimac2.c b/hw/net/milkymist-minimac2.c
index d35d39a0e5..f01e804272 100644
--- a/hw/net/milkymist-minimac2.c
+++ b/hw/net/milkymist-minimac2.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "trace.h"
diff --git a/hw/net/ne2000-isa.c b/hw/net/ne2000-isa.c
index 8dca7c936b..a7f5a9464d 100644
--- a/hw/net/ne2000-isa.c
+++ b/hw/net/ne2000-isa.c
@@ -29,6 +29,7 @@
#include "net/net.h"
#include "ne2000.h"
#include "exec/address-spaces.h"
+#include "qapi/error.h"
#include "qapi/visitor.h"
#define TYPE_ISA_NE2000 "ne2k_isa"
diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
index 2deb8ce84b..de23ab5dcd 100644
--- a/hw/net/xilinx_axienet.c
+++ b/hw/net/xilinx_axienet.c
@@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include "hw/sysbus.h"
+#include "qapi/error.h"
#include "qemu/log.h"
#include "net/net.h"
#include "net/checksum.h"
diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c
index 32d5a361d0..2ca427b586 100644
--- a/hw/nvram/spapr_nvram.c
+++ b/hw/nvram/spapr_nvram.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include <libfdt.h>
#include "sysemu/block-backend.h"
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index 46418c30f7..7967cfbea9 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "elf.h"
diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c
index 862a2366f2..7b582e96ac 100644
--- a/hw/pci-bridge/pci_bridge_dev.c
+++ b/hw/pci-bridge/pci_bridge_dev.c
@@ -20,6 +20,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/pci/pci_bridge.h"
#include "hw/pci/pci_ids.h"
#include "hw/pci/msi.h"
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 41aa66f828..df2b0e26f5 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -29,6 +29,7 @@
#include "hw/pci/pci_host.h"
#include "hw/isa/isa.h"
#include "hw/sysbus.h"
+#include "qapi/error.h"
#include "qemu/range.h"
#include "hw/xen/xen.h"
#include "hw/pci-host/pam.h"
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 49cdaab36b..487e32ecbf 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_bus.h"
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 115fb8c046..70f897e3a9 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -30,6 +30,7 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/pci-host/q35.h"
+#include "qapi/error.h"
#include "qapi/visitor.h"
/****************************************************************************
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 4aca0c5912..728386ada7 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "hw/pci/pci_bridge.h"
#include "hw/pci/pcie.h"
diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c
index aef838415f..3dcd472eba 100644
--- a/hw/pci/shpc.c
+++ b/hw/pci/shpc.c
@@ -1,4 +1,5 @@
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/range.h"
#include "qemu/error-report.h"
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 09154fa813..ee1c60b820 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -15,6 +15,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "e500.h"
#include "e500-ccsr.h"
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index f0a36b3133..1086f88d83 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -47,6 +47,7 @@
*
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/ppc/ppc.h"
#include "hw/ppc/mac.h"
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index d952713313..9bfa02e097 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -24,6 +24,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/ppc/ppc.h"
#include "mac.h"
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index d8db3199c9..b430832fb3 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/ppc/ppc.h"
#include "ppc405.h"
diff --git a/hw/ppc/ppc405_uc.c b/hw/ppc/ppc405_uc.c
index ec81f658c5..4f9aebc099 100644
--- a/hw/ppc/ppc405_uc.c
+++ b/hw/ppc/ppc405_uc.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/ppc/ppc.h"
#include "hw/boards.h"
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index d0bb42305b..7e80f8ac3c 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -25,6 +25,7 @@
*
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "sysemu/numa.h"
#include "hw/hw.h"
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index ef063c05cf..b94b44a7a1 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/ppc/spapr_drc.h"
#include "qom/object.h"
#include "hw/qdev.h"
diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
index 39f4682f95..61204f0b6b 100644
--- a/hw/ppc/spapr_events.c
+++ b/hw/ppc/spapr_events.c
@@ -25,6 +25,7 @@
*
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "sysemu/sysemu.h"
#include "sysemu/char.h"
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index b2b1b93cfd..2dcb676c6f 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1,4 +1,5 @@
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "cpu.h"
#include "helper_regs.h"
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 79baa7b177..12dbe902fc 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -23,6 +23,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "hw/pci/pci.h"
diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c
index 9e15924f50..6f9a6731d6 100644
--- a/hw/ppc/spapr_pci_vfio.c
+++ b/hw/ppc/spapr_pci_vfio.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/ppc/spapr.h"
#include "hw/pci-host/spapr.h"
#include "hw/pci/msix.h"
diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c
index 02d6be49f5..f2f89908d4 100644
--- a/hw/ppc/spapr_rng.c
+++ b/hw/ppc/spapr_rng.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
#include "sysemu/device_tree.h"
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index 0f61a550cb..8aa021fde9 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -20,6 +20,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
index 85be24d3da..34b2faf013 100644
--- a/hw/s390x/event-facility.c
+++ b/hw/s390x/event-facility.c
@@ -16,6 +16,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "hw/s390x/sclp.h"
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 41ff002069..f104200273 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "cpu.h"
#include "elf.h"
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 4361c8a5dc..01aeec90fe 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -10,6 +10,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/boards.h"
#include "exec/address-spaces.h"
#include "s390-virtio.h"
diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c
index 7c6e281af1..544c61643d 100644
--- a/hw/s390x/s390-virtio.c
+++ b/hw/s390x/s390-virtio.c
@@ -22,6 +22,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index c8cc732163..85dbe1b600 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "sysemu/kvm.h"
#include "exec/memory.h"
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index cb887ba7e2..d51642db0d 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c
index 1de7706644..595f88b352 100644
--- a/hw/scsi/esp-pci.c
+++ b/hw/scsi/esp-pci.c
@@ -28,6 +28,7 @@
#include "hw/nvram/eeprom93xx.h"
#include "hw/scsi/esp.h"
#include "trace.h"
+#include "qapi/error.h"
#include "qemu/log.h"
#define TYPE_AM53C974_DEVICE "am53c974"
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index e55c32c642..8961be2f34 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -27,6 +27,7 @@
#include "hw/sysbus.h"
#include "hw/scsi/esp.h"
#include "trace.h"
+#include "qapi/error.h"
#include "qemu/log.h"
/*
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index a21752b67e..a5ad3c7ae5 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -1,5 +1,6 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include "hw/scsi/scsi.h"
#include "block/scsi.h"
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 469aec2839..96c7953ecf 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -29,6 +29,7 @@ do { printf("scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
#endif
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "hw/scsi/scsi.h"
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index f8a1ff2cac..7459465f60 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "hw/scsi/scsi.h"
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index c86622cfeb..97a0dd1c1d 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -15,6 +15,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include <sys/ioctl.h>
#include "qemu/error-report.h"
#include "qemu/queue.h"
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 0c30d2e692..ade49727d6 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -14,6 +14,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "standard-headers/linux/virtio_ids.h"
#include "hw/virtio/virtio-scsi.h"
#include "qemu/error-report.h"
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index 9abc086851..e690b4ec08 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/scsi/scsi.h"
#include <block/scsi.h>
#include "hw/pci/msi.h"
diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
index 9c3679b5db..3deccf02c9 100644
--- a/hw/sd/pxa2xx_mmci.c
+++ b/hw/sd/pxa2xx_mmci.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "hw/arm/pxa.h"
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 1568057e4f..b66e5d2dba 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -34,6 +34,7 @@
#include "hw/hw.h"
#include "sysemu/block-backend.h"
#include "hw/sd/sd.h"
+#include "qapi/error.h"
#include "qemu/bitmap.h"
#include "hw/qdev-properties.h"
#include "qemu/error-report.h"
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index 7d9a1cd822..90672ac357 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/hw.h"
#include "hw/sh4/sh.h"
diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c
index 386a4854ea..986bd2950e 100644
--- a/hw/sh4/shix.c
+++ b/hw/sh4/shix.c
@@ -28,6 +28,7 @@
More information in target-sh4/README.sh4
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/sh4/sh.h"
#include "sysemu/sysemu.h"
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 1362e79b9b..cb8a111102 100644
--- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c
@@ -16,6 +16,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index c579f5b9ea..9f085ec61d 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "qemu/timer.h"
#include "hw/ptimer.h"
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index 613ca7e332..f251915fbd 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/sysbus.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 54d200300c..b77e8d2e11 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "hw/pci-host/apb.h"
diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c
index fa4602ca04..afe577c76a 100644
--- a/hw/timer/a9gtimer.c
+++ b/hw/timer/a9gtimer.c
@@ -22,6 +22,7 @@
#include "qemu/osdep.h"
#include "hw/timer/a9gtimer.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "qemu/bitops.h"
#include "qemu/log.h"
diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c
index 2bdaf42b72..d66bbf01b4 100644
--- a/hw/timer/arm_mptimer.c
+++ b/hw/timer/arm_mptimer.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "hw/timer/arm_mptimer.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "qom/cpu.h"
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index 0ad542037a..78140e6092 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
@@ -28,6 +28,7 @@
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "ui/console.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
#include "hw/timer/hpet.h"
diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c
index bbcfeb2192..c4db0e6462 100644
--- a/hw/timer/m48t59.c
+++ b/hw/timer/m48t59.c
@@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/timer/m48t59.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index c1c3d4dcc3..381e7266ea 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -31,6 +31,7 @@
#include "hw/i386/pc.h"
#include "hw/pci/pci_ids.h"
#include "tpm_tis.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/main-loop.h"
#include "sysemu/tpm_backend.h"
diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c
index 3cadb6521c..858040a046 100644
--- a/hw/tricore/tricore_testboard.c
+++ b/hw/tricore/tricore_testboard.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/devices.h"
#include "net/net.h"
diff --git a/hw/unicore32/puv3.c b/hw/unicore32/puv3.c
index 4522fa263b..d2933cb72a 100644
--- a/hw/unicore32/puv3.c
+++ b/hw/unicore32/puv3.c
@@ -10,6 +10,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "ui/console.h"
#include "elf.h"
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index 4452bdbe20..a9a6f9e56d 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -2,6 +2,7 @@
#include "hw/hw.h"
#include "hw/usb.h"
#include "hw/qdev.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c
index 40f38ad45e..24d05f76f9 100644
--- a/hw/usb/dev-hid.c
+++ b/hw/usb/dev-hid.c
@@ -27,6 +27,7 @@
#include "ui/console.h"
#include "hw/usb.h"
#include "hw/usb/desc.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "hw/input/hid.h"
diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c
index 64acdb0af0..a33f21cb38 100644
--- a/hw/usb/dev-hub.c
+++ b/hw/usb/dev-hub.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "trace.h"
#include "hw/usb.h"
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 7391783193..3e0bdc1bae 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -10,12 +10,14 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include <wchar.h>
#include <dirent.h>
#include <sys/statvfs.h>
#ifdef __linux__
#include <sys/inotify.h>
+#include "qapi/error.h"
#include "qemu/main-loop.h"
#endif
diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c
index c6abd38c2a..b183cafece 100644
--- a/hw/usb/dev-network.c
+++ b/hw/usb/dev-network.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "hw/usb.h"
#include "hw/usb/desc.h"
diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c
index afad1db8b3..ff4b0c588f 100644
--- a/hw/usb/dev-serial.c
+++ b/hw/usb/dev-serial.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "hw/usb.h"
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 96a1a13812..af4b851356 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -35,6 +35,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "hw/usb.h"
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index 5ae0424923..284024e6f4 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "qemu/option.h"
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 1b50601fc1..f598937099 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -28,6 +28,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/usb/ehci-regs.h"
#include "hw/usb/hcd-ehci.h"
#include "trace.h"
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index 17ed4617ef..f3dc26bcca 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -27,6 +27,7 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "hw/usb.h"
#include "hw/pci/pci.h"
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index c370240be2..6521418681 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -30,6 +30,7 @@
#include "hw/usb.h"
#include "hw/usb/uhci-regs.h"
#include "hw/pci/pci.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "qemu/iov.h"
#include "sysemu/dma.h"
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 5e7ec453d0..6458a94485 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -37,6 +37,7 @@
#include <poll.h>
#include <libusb.h>
+#include "qapi/error.h"
#include "qemu-common.h"
#include "monitor/monitor.h"
#include "qemu/error-report.h"
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 38a539311b..dbcc5a737f 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index a2ab75d3f2..1798a00a3f 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -15,6 +15,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include <sys/ioctl.h>
#include <linux/vfio.h>
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 7ed3dd9a13..5914e85107 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/virtio/vhost.h"
#include "hw/virtio/vhost-backend.h"
#include "hw/virtio/virtio-net.h"
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 392d848819..4400718154 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -14,6 +14,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "hw/virtio/vhost.h"
#include "hw/hw.h"
#include "qemu/atomic.h"
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 0dadb6687f..bfedbbf17f 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -26,6 +26,7 @@
#include "hw/virtio/virtio-balloon.h"
#include "hw/virtio/virtio-input.h"
#include "hw/pci/pci.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include "hw/pci/msi.h"
#include "hw/pci/msix.h"
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index d7134646e2..6b991a7642 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -10,6 +10,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/iov.h"
#include "hw/qdev.h"
#include "hw/virtio/virtio.h"
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 08275a9848..8ce19a0979 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "trace.h"
#include "exec/address-spaces.h"
diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c
index 9666fff8c9..4005d6ae76 100644
--- a/hw/xen/xen-host-pci-device.c
+++ b/hw/xen/xen-host-pci-device.c
@@ -7,6 +7,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "xen-host-pci-device.h"
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index 657bf6cdc1..f593b046e5 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -53,6 +53,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include <sys/ioctl.h>
#include "hw/pci/pci.h"
diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
index 1b48f19183..9869ffda01 100644
--- a/hw/xen/xen_pt_config_init.c
+++ b/hw/xen/xen_pt_config_init.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "hw/xen/xen_backend.h"
#include "xen_pt.h"
diff --git a/hw/xen/xen_pt_graphics.c b/hw/xen/xen_pt_graphics.c
index 71e745f8ca..0f4c8d77e2 100644
--- a/hw/xen/xen_pt_graphics.c
+++ b/hw/xen/xen_pt_graphics.c
@@ -2,6 +2,7 @@
* graphics passthrough
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "xen_pt.h"
#include "xen-host-pci-device.h"
#include "hw/xen/xen_backend.h"
diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c
index 23050e8fb7..0967aa6c46 100644
--- a/hw/xtensa/sim.c
+++ b/hw/xtensa/sim.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
#include "hw/loader.h"
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c
index 54e7f46868..1aff056356 100644
--- a/hw/xtensa/xtfpga.c
+++ b/hw/xtensa/xtfpga.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
#include "hw/loader.h"
diff --git a/include/qapi/error.h b/include/qapi/error.h
index 02e9dd20a7..11be2327c0 100644
--- a/include/qapi/error.h
+++ b/include/qapi/error.h
@@ -118,11 +118,6 @@
#include "qapi-types.h"
/*
- * Opaque error object.
- */
-typedef struct Error Error;
-
-/*
* Overall category of an error.
* Based on the qapi type QapiErrorClass, but reproduced here for nicer
* enum names.
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 4538fdca42..1c0ce4a1c7 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -7,8 +7,10 @@
*
* To avoid getting into possible circular include dependencies, this
* file should not include any other QEMU headers, with the exceptions
- * of config-host.h, compiler.h, os-posix.h and os-win32.h, all of which
- * are doing a similar job to this file and are under similar constraints.
+ * of config-host.h, config-target.h, qemu/compiler.h,
+ * sysemu/os-posix.h, sysemu/os-win32.h, glib-compat.h and
+ * qemu/typedefs.h, all of which are doing a similar job to this file
+ * and are under similar constraints.
*
* This header also contains prototypes for functions defined in
* os-*.c and util/oslib-*.c; those would probably be better split
@@ -98,8 +100,7 @@ extern int daemon(int, int);
#endif
#include "glib-compat.h"
-
-#include "qapi/error.h"
+#include "qemu/typedefs.h"
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index fd039e0e81..c987db6ddf 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -26,6 +26,7 @@ typedef struct DisplayChangeListener DisplayChangeListener;
typedef struct DisplayState DisplayState;
typedef struct DisplaySurface DisplaySurface;
typedef struct DriveInfo DriveInfo;
+typedef struct Error Error;
typedef struct EventNotifier EventNotifier;
typedef struct FWCfgIoState FWCfgIoState;
typedef struct FWCfgMemState FWCfgMemState;
diff --git a/include/qom/object.h b/include/qom/object.h
index eda16df005..0eba22ef83 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -15,6 +15,7 @@
#define QEMU_OBJECT_H
#include <glib.h>
+#include "qapi-types.h"
#include "qemu/queue.h"
#include "qemu/typedefs.h"
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index 2dabe49f41..aa2436355f 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -18,11 +18,11 @@
#ifndef QEMU_SPICE_H
#define QEMU_SPICE_H
+#include "qapi/error.h"
#ifdef CONFIG_SPICE
#include <spice.h>
-
#include "qemu/option.h"
#include "qemu/config-file.h"
diff --git a/io/channel-command.c b/io/channel-command.c
index 604514adfc..ad25313be1 100644
--- a/io/channel-command.c
+++ b/io/channel-command.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "io/channel-command.h"
#include "io/channel-watch.h"
+#include "qapi/error.h"
#include "qemu/sockets.h"
#include "trace.h"
diff --git a/io/channel-file.c b/io/channel-file.c
index f28e2b0a5c..e1da2435e6 100644
--- a/io/channel-file.c
+++ b/io/channel-file.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "io/channel-file.h"
#include "io/channel-watch.h"
+#include "qapi/error.h"
#include "qemu/sockets.h"
#include "trace.h"
diff --git a/io/channel-socket.c b/io/channel-socket.c
index d005070584..ca8bc20b17 100644
--- a/io/channel-socket.c
+++ b/io/channel-socket.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "io/channel-socket.h"
#include "io/channel-watch.h"
#include "trace.h"
diff --git a/io/channel-tls.c b/io/channel-tls.c
index 7608fd9de0..9a8525c816 100644
--- a/io/channel-tls.c
+++ b/io/channel-tls.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "io/channel-tls.h"
#include "trace.h"
diff --git a/io/channel-websock.c b/io/channel-websock.c
index 35860a2738..708178779e 100644
--- a/io/channel-websock.c
+++ b/io/channel-websock.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "io/channel-websock.h"
#include "crypto/hash.h"
#include "trace.h"
diff --git a/io/channel.c b/io/channel.c
index dd6fc0eb28..692eb179b3 100644
--- a/io/channel.c
+++ b/io/channel.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "io/channel.h"
+#include "qapi/error.h"
#include "qemu/coroutine.h"
bool qio_channel_has_feature(QIOChannel *ioc,
diff --git a/io/task.c b/io/task.c
index bf1a3339b2..c7f97a9b16 100644
--- a/io/task.c
+++ b/io/task.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "io/task.h"
+#include "qapi/error.h"
#include "qemu/thread.h"
#include "trace.h"
diff --git a/iohandler.c b/iohandler.c
index 0abb4a7e7a..3f23433b5a 100644
--- a/iohandler.c
+++ b/iohandler.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/queue.h"
#include "block/aio.h"
diff --git a/main-loop.c b/main-loop.c
index 3a7f4cdbb2..9598c5f4c7 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/timer.h"
#include "qemu/sockets.h" // struct in_addr needed for libslirp.h
diff --git a/memory.c b/memory.c
index 95f720964b..f76f85df95 100644
--- a/memory.c
+++ b/memory.c
@@ -14,6 +14,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "exec/memory.h"
#include "exec/address-spaces.h"
#include "exec/ioport.h"
diff --git a/memory_mapping.c b/memory_mapping.c
index c8855de92b..2354b2b7f3 100644
--- a/memory_mapping.c
+++ b/memory_mapping.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include <glib.h>
#include "qemu-common.h"
diff --git a/migration/block.c b/migration/block.c
index 72883d7c64..af8e16dfc7 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -14,6 +14,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "block/block.h"
#include "qemu/error-report.h"
diff --git a/migration/exec.c b/migration/exec.c
index 62f892d4d9..559420969b 100644
--- a/migration/exec.c
+++ b/migration/exec.c
@@ -16,6 +16,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/sockets.h"
#include "qemu/main-loop.h"
diff --git a/migration/fd.c b/migration/fd.c
index 085dd7c51e..3d788bb297 100644
--- a/migration/fd.c
+++ b/migration/fd.c
@@ -14,6 +14,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/main-loop.h"
#include "qemu/sockets.h"
diff --git a/migration/rdma.c b/migration/rdma.c
index bcae1e81b3..0601d528bc 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -12,6 +12,7 @@
*
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "migration/migration.h"
#include "migration/qemu-file.h"
diff --git a/nbd/client.c b/nbd/client.c
index 9e5b651082..f89c0a16ae 100644
--- a/nbd/client.c
+++ b/nbd/client.c
@@ -17,6 +17,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "nbd-internal.h"
static int nbd_errno_to_system_errno(int err)
diff --git a/nbd/common.c b/nbd/common.c
index bde673a04a..a44718ce58 100644
--- a/nbd/common.c
+++ b/nbd/common.c
@@ -17,6 +17,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "nbd-internal.h"
ssize_t nbd_wr_syncv(QIOChannel *ioc,
diff --git a/nbd/server.c b/nbd/server.c
index d4225cdb55..b95571bdf5 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -17,6 +17,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "nbd-internal.h"
static int system_errno_to_nbd_errno(int err)
diff --git a/net/dump.c b/net/dump.c
index 94ac32a39f..41f7673efd 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include "clients.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "qemu/iov.h"
diff --git a/net/filter-buffer.c b/net/filter-buffer.c
index 972177b453..cc6bd94445 100644
--- a/net/filter-buffer.c
+++ b/net/filter-buffer.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "net/filter.h"
#include "net/queue.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/timer.h"
#include "qemu/iov.h"
diff --git a/net/filter.c b/net/filter.c
index a08ef68ae6..1c4fc5a2c7 100644
--- a/net/filter.c
+++ b/net/filter.c
@@ -7,6 +7,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
diff --git a/net/socket.c b/net/socket.c
index 9826efb46f..9fa2cd8d51 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -26,6 +26,7 @@
#include "net/net.h"
#include "clients.h"
#include "monitor/monitor.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "qemu/option.h"
diff --git a/net/tap-aix.c b/net/tap-aix.c
index 9d830b7a32..0e6da63963 100644
--- a/net/tap-aix.c
+++ b/net/tap-aix.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "tap_int.h"
int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
diff --git a/net/tap-bsd.c b/net/tap-bsd.c
index 83de19a646..33642ae518 100644
--- a/net/tap-bsd.c
+++ b/net/tap-bsd.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "tap_int.h"
#include "qemu-common.h"
#include "sysemu/sysemu.h"
diff --git a/net/tap-haiku.c b/net/tap-haiku.c
index 397e53235e..b27e57e955 100644
--- a/net/tap-haiku.c
+++ b/net/tap-haiku.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "tap_int.h"
int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
diff --git a/net/tap-linux.c b/net/tap-linux.c
index 0929cf76f5..8077d2b575 100644
--- a/net/tap-linux.c
+++ b/net/tap-linux.c
@@ -32,6 +32,7 @@
#include <sys/ioctl.h>
#include "sysemu/sysemu.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
diff --git a/net/tap-solaris.c b/net/tap-solaris.c
index e3907a8218..26d2042922 100644
--- a/net/tap-solaris.c
+++ b/net/tap-solaris.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "tap_int.h"
#include "sysemu/sysemu.h"
diff --git a/net/tap.c b/net/tap.c
index 8f790d15ff..3ddf9ecd7d 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -36,6 +36,7 @@
#include "clients.h"
#include "monitor/monitor.h"
#include "sysemu/sysemu.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c
index 73e4acea7b..5e2b8832a8 100644
--- a/qapi/opts-visitor.c
+++ b/qapi/opts-visitor.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qapi/qmp/qerror.h"
#include "qapi/opts-visitor.h"
diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c
index 8afb12eb43..818730a660 100644
--- a/qapi/qapi-util.c
+++ b/qapi/qapi-util.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qapi/util.h"
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c
index 856606b253..fa680c9991 100644
--- a/qapi/qapi-visit-core.c
+++ b/qapi/qapi-visit-core.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qapi/qmp/qobject.h"
#include "qapi/qmp/qerror.h"
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index 8f27c3456d..510a1aead8 100644
--- a/qapi/qmp-dispatch.c
+++ b/qapi/qmp-dispatch.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qapi/qmp/types.h"
#include "qapi/qmp/dispatch.h"
#include "qapi/qmp/json-parser.h"
diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c
index e6598327c3..7cd1b777a0 100644
--- a/qapi/qmp-input-visitor.c
+++ b/qapi/qmp-input-visitor.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qapi/qmp-input-visitor.h"
#include "qapi/visitor-impl.h"
#include "qemu/queue.h"
diff --git a/qapi/string-input-visitor.c b/qapi/string-input-visitor.c
index 59eb5dc4e3..ab129536e4 100644
--- a/qapi/string-input-visitor.c
+++ b/qapi/string-input-visitor.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qapi/string-input-visitor.h"
#include "qapi/visitor-impl.h"
diff --git a/qemu-img.c b/qemu-img.c
index 29eae2a24b..8b54d05486 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qapi-visit.h"
#include "qapi/qmp-output-visitor.h"
#include "qapi/qmp/qerror.h"
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index e929d24a49..13fbb5944c 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
@@ -9,6 +9,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-io.h"
#include "sysemu/block-backend.h"
#include "block/block.h"
diff --git a/qemu-io.c b/qemu-io.c
index d7c2f26bbb..bc129536e4 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -11,6 +11,7 @@
#include <getopt.h>
#include <libgen.h>
+#include "qapi/error.h"
#include "qemu-io.h"
#include "qemu/error-report.h"
#include "qemu/main-loop.h"
diff --git a/qemu-nbd.c b/qemu-nbd.c
index f3528c8c04..2963c56df7 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -17,6 +17,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "sysemu/block-backend.h"
#include "block/block_int.h"
diff --git a/qga/channel-posix.c b/qga/channel-posix.c
index 7ad3c00765..63458c6632 100644
--- a/qga/channel-posix.c
+++ b/qga/channel-posix.c
@@ -1,6 +1,7 @@
#include "qemu/osdep.h"
#include <glib.h>
#include <termios.h>
+#include "qapi/error.h"
#include "qemu/sockets.h"
#include "qga/channel.h"
diff --git a/qobject/json-parser.c b/qobject/json-parser.c
index 6c05f6cc70..6e65b82264 100644
--- a/qobject/json-parser.c
+++ b/qobject/json-parser.c
@@ -13,6 +13,7 @@
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qapi/qmp/qstring.h"
#include "qapi/qmp/qint.h"
diff --git a/qom/cpu.c b/qom/cpu.c
index c45d0bb6de..c9007d3d06 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qom/cpu.h"
#include "sysemu/kvm.h"
diff --git a/qom/object.c b/qom/object.c
index 844ae7a0fd..6a1f03019b 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qom/object.h"
#include "qom/object_interfaces.h"
#include "qemu-common.h"
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index c2f6e2998e..ab5da35e4f 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -1,4 +1,5 @@
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qom/object_interfaces.h"
#include "qemu/module.h"
#include "qapi-visit.h"
diff --git a/qom/qom-qobject.c b/qom/qom-qobject.c
index 9cbc4c69a6..e6b17c1f1b 100644
--- a/qom/qom-qobject.c
+++ b/qom/qom-qobject.c
@@ -10,6 +10,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qom/object.h"
#include "qom/qom-qobject.h"
diff --git a/qtest.c b/qtest.c
index 58a7732ef3..87575bc0b4 100644
--- a/qtest.c
+++ b/qtest.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "sysemu/qtest.h"
#include "hw/qdev.h"
#include "sysemu/char.h"
diff --git a/replay/replay-input.c b/replay/replay-input.c
index 2d5d9191ca..06babe0ecc 100644
--- a/replay/replay-input.c
+++ b/replay/replay-input.c
@@ -10,6 +10,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "sysemu/replay.h"
#include "replay-internal.h"
diff --git a/replay/replay.c b/replay/replay.c
index fcfde4fc93..ec32c81072 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -10,6 +10,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "sysemu/replay.h"
#include "replay-internal.h"
diff --git a/scripts/clean-includes b/scripts/clean-includes
index 177d253eb9..8052bbd3b4 100755
--- a/scripts/clean-includes
+++ b/scripts/clean-includes
@@ -139,12 +139,13 @@ for f in "$@"; do
# Remove includes that osdep.h already provides
perl -n -i -e 'print if !/\s*#\s*include\s*(["<][^>"]*[">])/ ||
! (grep { $_ eq $1 } qw (
- "config-host.h" "qemu/compiler.h" "config.h"
+ "config-host.h" "config-target.h" "qemu/compiler.h"
<stdarg.h> <stddef.h> <stdbool.h> <stdint.h> <sys/types.h>
<stdlib.h> <stdio.h> <string.h> <strings.h> <inttypes.h>
<limits.h> <unistd.h> <time.h> <ctype.h> <errno.h> <fcntl.h>
<sys/stat.h> <sys/time.h> <assert.h> <signal.h>
- "glib-compat.h" "qapi/error.h"
+ "sysemu/os-posix.h, sysemu/os-win32.h "glib-compat.h"
+ "qemu/typedefs.h"
))' "$f"
done
diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py
index c147990efe..31d2330356 100644
--- a/scripts/qapi-visit.py
+++ b/scripts/qapi-visit.py
@@ -355,6 +355,7 @@ h_comment = '''
fdef.write(mcgen('''
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "qapi/error.h"
#include "%(prefix)sqapi-visit.h"
''',
prefix=prefix))
diff --git a/stubs/get-fd.c b/stubs/get-fd.c
index 85881fb678..7dfdfb55f7 100644
--- a/stubs/get-fd.c
+++ b/stubs/get-fd.c
@@ -1,4 +1,5 @@
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "monitor/monitor.h"
diff --git a/target-alpha/cpu.c b/target-alpha/cpu.c
index 2eab0609e4..8a155cae90 100644
--- a/target-alpha/cpu.c
+++ b/target-alpha/cpu.c
@@ -20,6 +20,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#include "migration/vmstate.h"
diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index 352d9f883d..e48e83acbb 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "internals.h"
#include "qemu-common.h"
diff --git a/target-arm/cpu64.c b/target-arm/cpu64.c
index fa5eda2cd1..1635debc1a 100644
--- a/target-arm/cpu64.c
+++ b/target-arm/cpu64.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#if !defined(CONFIG_USER_ONLY)
diff --git a/target-cris/cpu.c b/target-cris/cpu.c
index b2c8624dbf..1cb79dd977 100644
--- a/target-cris/cpu.c
+++ b/target-cris/cpu.c
@@ -22,6 +22,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#include "mmu.h"
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 08d6444741..87ab969ae1 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/utsname.h>
diff --git a/target-lm32/cpu.c b/target-lm32/cpu.c
index f93bb5d0dd..6e7e1b8e63 100644
--- a/target-lm32/cpu.c
+++ b/target-lm32/cpu.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
diff --git a/target-m68k/cpu.c b/target-m68k/cpu.c
index 6de74bf28e..0b5f9a581e 100644
--- a/target-m68k/cpu.c
+++ b/target-m68k/cpu.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#include "migration/vmstate.h"
diff --git a/target-microblaze/cpu.c b/target-microblaze/cpu.c
index 7a42897a00..fdfb01917f 100644
--- a/target-microblaze/cpu.c
+++ b/target-microblaze/cpu.c
@@ -22,6 +22,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#include "hw/qdev-properties.h"
diff --git a/target-mips/cpu.c b/target-mips/cpu.c
index 7dc3a44a15..0e2ecbebec 100644
--- a/target-mips/cpu.c
+++ b/target-mips/cpu.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "kvm_mips.h"
#include "qemu-common.h"
diff --git a/target-moxie/cpu.c b/target-moxie/cpu.c
index b33c2b3741..b4ee84e906 100644
--- a/target-moxie/cpu.c
+++ b/target-moxie/cpu.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#include "migration/vmstate.h"
diff --git a/target-openrisc/cpu.c b/target-openrisc/cpu.c
index cafc07f788..ae6ed9e92c 100644
--- a/target-openrisc/cpu.c
+++ b/target-openrisc/cpu.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
diff --git a/target-ppc/mmu-hash64.c b/target-ppc/mmu-hash64.c
index d175fdad45..72c4ab5d75 100644
--- a/target-ppc/mmu-hash64.c
+++ b/target-ppc/mmu-hash64.c
@@ -18,6 +18,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "qemu/error-report.h"
diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c
index fcb2cc5c79..ff217941b5 100644
--- a/target-ppc/mmu_helper.c
+++ b/target-ppc/mmu_helper.c
@@ -17,6 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "exec/helper-proto.h"
#include "sysemu/kvm.h"
diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
index 1cbf70355d..9746b1ddfe 100644
--- a/target-s390x/cpu.c
+++ b/target-s390x/cpu.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#include "qemu/timer.h"
diff --git a/target-s390x/helper.c b/target-s390x/helper.c
index 76d5fbebe8..92abe7e676 100644
--- a/target-s390x/helper.c
+++ b/target-s390x/helper.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "exec/gdbstub.h"
#include "qemu/timer.h"
diff --git a/target-sh4/cpu.c b/target-sh4/cpu.c
index 8621d70d4d..86ba38808b 100644
--- a/target-sh4/cpu.c
+++ b/target-sh4/cpu.c
@@ -20,6 +20,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#include "migration/vmstate.h"
diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c
index ce903f8dfd..fe4119e2bc 100644
--- a/target-sparc/cpu.c
+++ b/target-sparc/cpu.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu/error-report.h"
diff --git a/target-tilegx/cpu.c b/target-tilegx/cpu.c
index eceeb2c997..d2d0912034 100644
--- a/target-tilegx/cpu.c
+++ b/target-tilegx/cpu.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#include "hw/qdev-properties.h"
diff --git a/target-tricore/cpu.c b/target-tricore/cpu.c
index f8b8518558..69fca8c068 100644
--- a/target-tricore/cpu.c
+++ b/target-tricore/cpu.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
diff --git a/target-unicore32/cpu.c b/target-unicore32/cpu.c
index c92ccc4251..66f43acfff 100644
--- a/target-unicore32/cpu.c
+++ b/target-unicore32/cpu.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#include "migration/vmstate.h"
diff --git a/target-xtensa/cpu.c b/target-xtensa/cpu.c
index d572d56795..01b251fdc7 100644
--- a/target-xtensa/cpu.c
+++ b/target-xtensa/cpu.c
@@ -29,6 +29,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "cpu.h"
#include "qemu-common.h"
#include "migration/vmstate.h"
diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c
index a2bb556906..ffffd872f2 100644
--- a/tests/check-qom-proplist.c
+++ b/tests/check-qom-proplist.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include <glib.h>
+#include "qapi/error.h"
#include "qom/object.h"
#include "qemu/module.h"
diff --git a/tests/io-channel-helpers.c b/tests/io-channel-helpers.c
index a4dedbe0ad..05e5579cf8 100644
--- a/tests/io-channel-helpers.c
+++ b/tests/io-channel-helpers.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "io-channel-helpers.h"
+#include "qapi/error.h"
struct QIOChannelTest {
QIOChannel *src;
diff --git a/tests/test-aio.c b/tests/test-aio.c
index a109bd0c42..687dfa062e 100644
--- a/tests/test-aio.c
+++ b/tests/test-aio.c
@@ -13,6 +13,7 @@
#include "qemu/osdep.h"
#include <glib.h>
#include "block/aio.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "qemu/sockets.h"
#include "qemu/error-report.h"
diff --git a/tests/test-base64.c b/tests/test-base64.c
index ae0c107c7d..922e839dd6 100644
--- a/tests/test-base64.c
+++ b/tests/test-base64.c
@@ -21,9 +21,9 @@
#include "qemu/osdep.h"
#include <glib.h>
+#include "qapi/error.h"
#include "qemu/base64.h"
-
static void test_base64_good(void)
{
const char input[] =
diff --git a/tests/test-blockjob-txn.c b/tests/test-blockjob-txn.c
index c866da66c8..55fad9507a 100644
--- a/tests/test-blockjob-txn.c
+++ b/tests/test-blockjob-txn.c
@@ -12,6 +12,7 @@
#include "qemu/osdep.h"
#include <glib.h>
+#include "qapi/error.h"
#include "qemu/main-loop.h"
#include "block/blockjob.h"
diff --git a/tests/test-crypto-afsplit.c b/tests/test-crypto-afsplit.c
index ceaac0a06d..f9f2fcd417 100644
--- a/tests/test-crypto-afsplit.c
+++ b/tests/test-crypto-afsplit.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/init.h"
#include "crypto/afsplit.h"
diff --git a/tests/test-crypto-block.c b/tests/test-crypto-block.c
index cdbe09d4ed..a38110d3ff 100644
--- a/tests/test-crypto-block.c
+++ b/tests/test-crypto-block.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/init.h"
#include "crypto/block.h"
#include "qemu/buffer.h"
diff --git a/tests/test-crypto-cipher.c b/tests/test-crypto-cipher.c
index e52b741f87..66d1c63fd5 100644
--- a/tests/test-crypto-cipher.c
+++ b/tests/test-crypto-cipher.c
@@ -23,6 +23,7 @@
#include "crypto/init.h"
#include "crypto/cipher.h"
+#include "qapi/error.h"
typedef struct QCryptoCipherTestData QCryptoCipherTestData;
struct QCryptoCipherTestData {
diff --git a/tests/test-crypto-ivgen.c b/tests/test-crypto-ivgen.c
index 96129da367..a5ff5d3da6 100644
--- a/tests/test-crypto-ivgen.c
+++ b/tests/test-crypto-ivgen.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/ivgen.h"
diff --git a/tests/test-crypto-pbkdf.c b/tests/test-crypto-pbkdf.c
index bb9c14c110..8ceceb1827 100644
--- a/tests/test-crypto-pbkdf.c
+++ b/tests/test-crypto-pbkdf.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "crypto/init.h"
#ifndef _WIN32
#include <sys/resource.h>
diff --git a/tests/test-crypto-secret.c b/tests/test-crypto-secret.c
index 2bbc4d9e3c..43e295240c 100644
--- a/tests/test-crypto-secret.c
+++ b/tests/test-crypto-secret.c
@@ -23,6 +23,7 @@
#include "crypto/init.h"
#include "crypto/secret.h"
+#include "qapi/error.h"
static void test_secret_direct(void)
{
diff --git a/tests/test-crypto-tlscredsx509.c b/tests/test-crypto-tlscredsx509.c
index 7ca387db65..af2f80e89c 100644
--- a/tests/test-crypto-tlscredsx509.c
+++ b/tests/test-crypto-tlscredsx509.c
@@ -22,6 +22,7 @@
#include "crypto-tls-x509-helpers.h"
#include "crypto/tlscredsx509.h"
+#include "qapi/error.h"
#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT
diff --git a/tests/test-crypto-tlssession.c b/tests/test-crypto-tlssession.c
index 036a86b0c3..1a4a066d76 100644
--- a/tests/test-crypto-tlssession.c
+++ b/tests/test-crypto-tlssession.c
@@ -24,6 +24,7 @@
#include "crypto/tlscredsx509.h"
#include "crypto/tlssession.h"
#include "qom/object_interfaces.h"
+#include "qapi/error.h"
#include "qemu/sockets.h"
#include "qemu/acl.h"
diff --git a/tests/test-io-channel-command.c b/tests/test-io-channel-command.c
index 885543760a..1d1f461bed 100644
--- a/tests/test-io-channel-command.c
+++ b/tests/test-io-channel-command.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "io/channel-command.h"
#include "io-channel-helpers.h"
+#include "qapi/error.h"
#ifndef WIN32
static void test_io_channel_command_fifo(bool async)
diff --git a/tests/test-io-channel-file.c b/tests/test-io-channel-file.c
index 1e7f3c7f12..6bfede6bb7 100644
--- a/tests/test-io-channel-file.c
+++ b/tests/test-io-channel-file.c
@@ -22,7 +22,7 @@
#include "io/channel-file.h"
#include "io/channel-util.h"
#include "io-channel-helpers.h"
-
+#include "qapi/error.h"
static void test_io_channel_file(void)
{
diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c
index be0c3003d4..9d94adb9ac 100644
--- a/tests/test-io-channel-socket.c
+++ b/tests/test-io-channel-socket.c
@@ -22,6 +22,7 @@
#include "io/channel-socket.h"
#include "io/channel-util.h"
#include "io-channel-helpers.h"
+#include "qapi/error.h"
#ifndef AI_ADDRCONFIG
# define AI_ADDRCONFIG 0
diff --git a/tests/test-io-task.c b/tests/test-io-task.c
index ae46c56a47..5a9775086c 100644
--- a/tests/test-io-task.c
+++ b/tests/test-io-task.c
@@ -22,6 +22,7 @@
#include <glib.h>
#include "io/task.h"
+#include "qapi/error.h"
#define TYPE_DUMMY "qemu:dummy"
diff --git a/tests/test-opts-visitor.c b/tests/test-opts-visitor.c
index 297a02d6a2..008e677388 100644
--- a/tests/test-opts-visitor.c
+++ b/tests/test-opts-visitor.c
@@ -15,6 +15,7 @@
#include "qemu/config-file.h" /* qemu_add_opts() */
#include "qemu/option.h" /* qemu_opts_parse() */
+#include "qapi/error.h"
#include "qapi/opts-visitor.h" /* opts_visitor_new() */
#include "test-qapi-visit.h" /* visit_type_UserDefOptions() */
diff --git a/tests/test-qemu-opts.c b/tests/test-qemu-opts.c
index 848374e2bd..32abed5ea1 100644
--- a/tests/test-qemu-opts.c
+++ b/tests/test-qemu-opts.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qapi/qmp/qstring.h"
#include "qemu/config-file.h"
diff --git a/tests/test-qmp-input-strict.c b/tests/test-qmp-input-strict.c
index 6a33aa41e5..d71727e272 100644
--- a/tests/test-qmp-input-strict.c
+++ b/tests/test-qmp-input-strict.c
@@ -15,6 +15,7 @@
#include <glib.h>
#include "qemu-common.h"
+#include "qapi/error.h"
#include "qapi/qmp-input-visitor.h"
#include "test-qapi-types.h"
#include "test-qapi-visit.h"
diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c
index 5941e90b35..80527eb850 100644
--- a/tests/test-qmp-input-visitor.c
+++ b/tests/test-qmp-input-visitor.c
@@ -14,6 +14,7 @@
#include <glib.h>
#include "qemu-common.h"
+#include "qapi/error.h"
#include "qapi/qmp-input-visitor.h"
#include "test-qapi-types.h"
#include "test-qapi-visit.h"
diff --git a/tests/test-qmp-output-visitor.c b/tests/test-qmp-output-visitor.c
index dc35752969..c70926793a 100644
--- a/tests/test-qmp-output-visitor.c
+++ b/tests/test-qmp-output-visitor.c
@@ -14,6 +14,7 @@
#include <glib.h>
#include "qemu-common.h"
+#include "qapi/error.h"
#include "qapi/qmp-output-visitor.h"
#include "test-qapi-types.h"
#include "test-qapi-visit.h"
diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor.c
index 4b48ec25d3..9e6906a567 100644
--- a/tests/test-string-input-visitor.c
+++ b/tests/test-string-input-visitor.c
@@ -14,6 +14,7 @@
#include <glib.h>
#include "qemu-common.h"
+#include "qapi/error.h"
#include "qapi/string-input-visitor.h"
#include "test-qapi-types.h"
#include "test-qapi-visit.h"
diff --git a/tests/test-string-output-visitor.c b/tests/test-string-output-visitor.c
index 0beccf98c7..1ecd75b853 100644
--- a/tests/test-string-output-visitor.c
+++ b/tests/test-string-output-visitor.c
@@ -14,6 +14,7 @@
#include <glib.h>
#include "qemu-common.h"
+#include "qapi/error.h"
#include "qapi/string-output-visitor.h"
#include "test-qapi-types.h"
#include "test-qapi-visit.h"
diff --git a/tests/test-thread-pool.c b/tests/test-thread-pool.c
index 40600b40bb..88dc7316b3 100644
--- a/tests/test-thread-pool.c
+++ b/tests/test-thread-pool.c
@@ -4,6 +4,7 @@
#include "block/aio.h"
#include "block/thread-pool.h"
#include "block/block.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "qemu/error-report.h"
diff --git a/tests/test-throttle.c b/tests/test-throttle.c
index 59675fa57b..744a524368 100644
--- a/tests/test-throttle.c
+++ b/tests/test-throttle.c
@@ -16,6 +16,7 @@
#include <glib.h>
#include <math.h>
#include "block/aio.h"
+#include "qapi/error.h"
#include "qemu/throttle.h"
#include "qemu/error-report.h"
#include "block/throttle-groups.h"
diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c
index ef4dac5e01..9adbc30a41 100644
--- a/tests/test-visitor-serialization.c
+++ b/tests/test-visitor-serialization.c
@@ -18,6 +18,7 @@
#include "qemu-common.h"
#include "test-qapi-types.h"
#include "test-qapi-visit.h"
+#include "qapi/error.h"
#include "qapi/qmp/types.h"
#include "qapi/qmp-input-visitor.h"
#include "qapi/qmp-output-visitor.h"
diff --git a/ui/input-linux.c b/ui/input-linux.c
index 2cf5d4990c..84c52d3292 100644
--- a/ui/input-linux.c
+++ b/ui/input-linux.c
@@ -5,6 +5,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/config-file.h"
#include "qemu/sockets.h"
diff --git a/ui/vnc-auth-sasl.c b/ui/vnc-auth-sasl.c
index 56e45e3473..5ae29c14cf 100644
--- a/ui/vnc-auth-sasl.c
+++ b/ui/vnc-auth-sasl.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "vnc.h"
/* Max amount of data we send/recv for SASL steps to prevent DOS */
diff --git a/ui/vnc-auth-vencrypt.c b/ui/vnc-auth-vencrypt.c
index 8f3bb11cea..11c8c9a819 100644
--- a/ui/vnc-auth-vencrypt.c
+++ b/ui/vnc-auth-vencrypt.c
@@ -26,6 +26,7 @@
#include "qemu/osdep.h"
#include "vnc.h"
+#include "qapi/error.h"
#include "qemu/main-loop.h"
static void start_auth_vencrypt_subauth(VncState *vs)
diff --git a/ui/vnc-ws.c b/ui/vnc-ws.c
index 1d3ecc2330..7c79a4c372 100644
--- a/ui/vnc-ws.c
+++ b/ui/vnc-ws.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "vnc.h"
#include "io/channel-websock.h"
diff --git a/util/base64.c b/util/base64.c
index d4bf2a61f9..9d3c46cbcc 100644
--- a/util/base64.c
+++ b/util/base64.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/base64.h"
static const char *base64_valid_chars =
diff --git a/util/error.c b/util/error.c
index 47f93afe5f..cae2511732 100644
--- a/util/error.c
+++ b/util/error.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 7615be4e7a..dcc3c7ea01 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -46,6 +46,7 @@
#include "sysemu/sysemu.h"
#include "trace.h"
+#include "qapi/error.h"
#include "qemu/sockets.h"
#include <sys/mman.h>
#include <libgen.h>
diff --git a/util/oslib-win32.c b/util/oslib-win32.c
index a3f0664763..4ef4a9a13b 100644
--- a/util/oslib-win32.c
+++ b/util/oslib-win32.c
@@ -32,6 +32,7 @@
#include "qemu/osdep.h"
#include <windows.h>
#include <glib.h>
+#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "qemu/main-loop.h"
#include "trace.h"
diff --git a/util/qemu-option.c b/util/qemu-option.c
index e7aa43f857..98967ffde9 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -25,6 +25,7 @@
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "qapi/qmp/types.h"
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 540649a7af..6f344d4405 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -18,6 +18,7 @@
#include "qemu/osdep.h"
#include "monitor/monitor.h"
+#include "qapi/error.h"
#include "qemu/sockets.h"
#include "qemu/main-loop.h"
#include "qapi/qmp-input-visitor.h"
diff --git a/util/throttle.c b/util/throttle.c
index 371c769455..71246b2343 100644
--- a/util/throttle.c
+++ b/util/throttle.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qapi/error.h"
#include "qemu/throttle.h"
#include "qemu/timer.h"
#include "block/aio.h"