summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/authz/base.h1
-rw-r--r--include/block/aio.h1
-rw-r--r--include/block/dirty-bitmap.h1
-rw-r--r--include/block/write-threshold.h1
-rw-r--r--include/chardev/char-io.h1
-rw-r--r--include/crypto/random.h1
-rw-r--r--include/crypto/xts.h1
-rw-r--r--include/disas/dis-asm.h6
-rw-r--r--include/disas/disas.h1
-rw-r--r--include/exec/cpu-all.h1
-rw-r--r--include/exec/exec-all.h1
-rw-r--r--include/exec/ram_addr.h1
-rw-r--r--include/fpu/softfloat-macros.h5
-rw-r--r--include/hw/acpi/tco.h1
-rw-r--r--include/hw/arm/allwinner-a10.h5
-rw-r--r--include/hw/arm/bcm2835_peripherals.h1
-rw-r--r--include/hw/arm/exynos4210.h1
-rw-r--r--include/hw/arm/omap.h8
-rw-r--r--include/hw/arm/raspi_platform.h5
-rw-r--r--include/hw/arm/virt.h1
-rw-r--r--include/hw/arm/xlnx-zynqmp.h3
-rw-r--r--include/hw/block/fdc.h1
-rw-r--r--include/hw/boards.h1
-rw-r--r--include/hw/char/cadence_uart.h2
-rw-r--r--include/hw/display/xlnx_dp.h9
-rw-r--r--include/hw/dma/bcm2835_dma.h1
-rw-r--r--include/hw/dma/xlnx-zynq-devcfg.h2
-rw-r--r--include/hw/fw-path-provider.h1
-rw-r--r--include/hw/hw.h1
-rw-r--r--include/hw/i2c/ppc4xx_i2c.h1
-rw-r--r--include/hw/i386/apic.h1
-rw-r--r--include/hw/i386/pc.h2
-rw-r--r--include/hw/ipmi/ipmi.h1
-rw-r--r--include/hw/isa/apm.h1
-rw-r--r--include/hw/isa/superio.h1
-rw-r--r--include/hw/kvm/clock.h6
-rw-r--r--include/hw/lm32/lm32_pic.h1
-rw-r--r--include/hw/m68k/mcf_fec.h5
-rw-r--r--include/hw/mips/bios.h5
-rw-r--r--include/hw/net/cadence_gem.h2
-rw-r--r--include/hw/nmi.h1
-rw-r--r--include/hw/pci-bridge/simba.h5
-rw-r--r--include/hw/pci-host/pam.h1
-rw-r--r--include/hw/pci/msi.h1
-rw-r--r--include/hw/pci/msix.h1
-rw-r--r--include/hw/pci/pci_regs.h5
-rw-r--r--include/hw/pci/shpc.h1
-rw-r--r--include/hw/pci/slotid_cap.h1
-rw-r--r--include/hw/ppc/openpic.h1
-rw-r--r--include/hw/ptimer.h1
-rw-r--r--include/hw/qdev-dma.h6
-rw-r--r--include/hw/sd/sdhci.h1
-rw-r--r--include/hw/semihosting/console.h6
-rw-r--r--include/hw/sh4/sh_intc.h1
-rw-r--r--include/hw/sparc/sparc64.h4
-rw-r--r--include/hw/sparc/sun4m_iommu.h1
-rw-r--r--include/hw/sparc/sun4u_iommu.h1
-rw-r--r--include/hw/stream.h1
-rw-r--r--include/hw/timer/m48t59.h1
-rw-r--r--include/hw/timer/xlnx-zynqmp-rtc.h5
-rw-r--r--include/hw/vfio/vfio-common.h1
-rw-r--r--include/hw/virtio/vhost-scsi-common.h1
-rw-r--r--include/hw/virtio/vhost-scsi.h1
-rw-r--r--include/hw/virtio/vhost-user-blk.h1
-rw-r--r--include/hw/virtio/vhost-user-scsi.h1
-rw-r--r--include/hw/xen/io/ring.h6
-rw-r--r--include/hw/xen/xen.h1
-rw-r--r--include/io/channel.h1
-rw-r--r--include/io/dns-resolver.h1
-rw-r--r--include/io/task.h1
-rw-r--r--include/migration/colo.h1
-rw-r--r--include/migration/failover.h1
-rw-r--r--include/monitor/monitor.h1
-rw-r--r--include/net/announce.h1
-rw-r--r--include/net/filter.h1
-rw-r--r--include/net/queue.h1
-rw-r--r--include/net/tap.h1
-rw-r--r--include/qemu-common.h30
-rw-r--r--include/qemu-io.h1
-rw-r--r--include/qemu/base64.h1
-rw-r--r--include/qemu/buffer.h1
-rw-r--r--include/qemu/crc32c.h1
-rw-r--r--include/qemu/ctype.h27
-rw-r--r--include/qemu/event_notifier.h1
-rw-r--r--include/qemu/filemonitor.h1
-rw-r--r--include/qemu/mmap-alloc.h1
-rw-r--r--include/qemu/qdist.h1
-rw-r--r--include/qemu/throttle.h1
-rw-r--r--include/qemu/timer.h1
-rw-r--r--include/qemu/uuid.h1
-rw-r--r--include/qom/object.h1
-rw-r--r--include/sysemu/cryptodev-vhost.h1
-rw-r--r--include/sysemu/cryptodev.h1
-rw-r--r--include/sysemu/hax.h1
-rw-r--r--include/sysemu/hvf.h1
-rw-r--r--include/sysemu/qtest.h1
-rw-r--r--include/sysemu/rng.h1
-rw-r--r--include/sysemu/tcg.h19
-rw-r--r--include/sysemu/tpm_backend.h1
-rw-r--r--include/sysemu/whpx.h1
-rw-r--r--include/ui/spice-display.h5
101 files changed, 130 insertions, 129 deletions
diff --git a/include/authz/base.h b/include/authz/base.h
index 14a59a0425..0782981ad8 100644
--- a/include/authz/base.h
+++ b/include/authz/base.h
@@ -21,7 +21,6 @@
 #ifndef QAUTHZ_BASE_H
 #define QAUTHZ_BASE_H
 
-#include "qemu-common.h"
 #include "qapi/error.h"
 #include "qom/object.h"
 
diff --git a/include/block/aio.h b/include/block/aio.h
index 0ca25dfec6..6b0d52f732 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -14,7 +14,6 @@
 #ifndef QEMU_AIO_H
 #define QEMU_AIO_H
 
-#include "qemu-common.h"
 #include "qemu/queue.h"
 #include "qemu/event_notifier.h"
 #include "qemu/thread.h"
diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h
index 8044ace63e..62682eb865 100644
--- a/include/block/dirty-bitmap.h
+++ b/include/block/dirty-bitmap.h
@@ -1,7 +1,6 @@
 #ifndef BLOCK_DIRTY_BITMAP_H
 #define BLOCK_DIRTY_BITMAP_H
 
-#include "qemu-common.h"
 #include "qapi/qapi-types-block-core.h"
 #include "qemu/hbitmap.h"
 
diff --git a/include/block/write-threshold.h b/include/block/write-threshold.h
index 234d2193e0..80d8aab5d0 100644
--- a/include/block/write-threshold.h
+++ b/include/block/write-threshold.h
@@ -12,7 +12,6 @@
 #ifndef BLOCK_WRITE_THRESHOLD_H
 #define BLOCK_WRITE_THRESHOLD_H
 
-#include "qemu-common.h"
 
 /*
  * bdrv_write_threshold_set:
diff --git a/include/chardev/char-io.h b/include/chardev/char-io.h
index 9638da5100..1709b59c9f 100644
--- a/include/chardev/char-io.h
+++ b/include/chardev/char-io.h
@@ -24,7 +24,6 @@
 #ifndef CHAR_IO_H
 #define CHAR_IO_H
 
-#include "qemu-common.h"
 #include "io/channel.h"
 #include "chardev/char.h"
 
diff --git a/include/crypto/random.h b/include/crypto/random.h
index fde592904e..c09998894f 100644
--- a/include/crypto/random.h
+++ b/include/crypto/random.h
@@ -21,7 +21,6 @@
 #ifndef QCRYPTO_RANDOM_H
 #define QCRYPTO_RANDOM_H
 
-#include "qemu-common.h"
 
 /**
  * qcrypto_random_bytes:
diff --git a/include/crypto/xts.h b/include/crypto/xts.h
index 3c8967ac6c..39ccaed822 100644
--- a/include/crypto/xts.h
+++ b/include/crypto/xts.h
@@ -26,7 +26,6 @@
 #ifndef QCRYPTO_XTS_H
 #define QCRYPTO_XTS_H
 
-#include "qemu-common.h"
 
 #define XTS_BLOCK_SIZE 16
 
diff --git a/include/disas/dis-asm.h b/include/disas/dis-asm.h
index 9240ec32c2..e9c7dd8eb4 100644
--- a/include/disas/dis-asm.h
+++ b/include/disas/dis-asm.h
@@ -6,8 +6,8 @@
    interface, for making instruction-processing programs more independent
    of the instruction set being processed.  */
 
-#ifndef DISAS_BFD_H
-#define DISAS_BFD_H
+#ifndef DISAS_DIS_ASM_H
+#define DISAS_DIS_ASM_H
 
 typedef void *PTR;
 typedef uint64_t bfd_vma;
@@ -508,4 +508,4 @@ bfd_vma bfd_getl16 (const bfd_byte *addr);
 bfd_vma bfd_getb16 (const bfd_byte *addr);
 typedef bool bfd_boolean;
 
-#endif /* DISAS_BFD_H */
+#endif /* DISAS_DIS_ASM_H */
diff --git a/include/disas/disas.h b/include/disas/disas.h
index 4d48c13c65..15da511f49 100644
--- a/include/disas/disas.h
+++ b/include/disas/disas.h
@@ -1,7 +1,6 @@
 #ifndef QEMU_DISAS_H
 #define QEMU_DISAS_H
 
-#include "qemu-common.h"
 
 #ifdef NEED_CPU_H
 #include "cpu.h"
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index f4fed7d82e..536ea58f81 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -19,7 +19,6 @@
 #ifndef CPU_ALL_H
 #define CPU_ALL_H
 
-#include "qemu-common.h"
 #include "exec/cpu-common.h"
 #include "exec/memory.h"
 #include "qemu/thread.h"
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 31f0ecc461..16034ee651 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -20,7 +20,6 @@
 #ifndef EXEC_ALL_H
 #define EXEC_ALL_H
 
-#include "qemu-common.h"
 #include "exec/tb-context.h"
 #include "sysemu/cpus.h"
 
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 139ad79390..f96777bb99 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -21,6 +21,7 @@
 
 #ifndef CONFIG_USER_ONLY
 #include "hw/xen/xen.h"
+#include "sysemu/tcg.h"
 #include "exec/ramlist.h"
 
 struct RAMBlock {
diff --git a/include/fpu/softfloat-macros.h b/include/fpu/softfloat-macros.h
index bd5b6418e3..c55aa6d174 100644
--- a/include/fpu/softfloat-macros.h
+++ b/include/fpu/softfloat-macros.h
@@ -79,6 +79,9 @@ this code that are retained.
  * version 2 or later. See the COPYING file in the top-level directory.
  */
 
+#ifndef FPU_SOFTFLOAT_MACROS_H
+#define FPU_SOFTFLOAT_MACROS_H
+
 /*----------------------------------------------------------------------------
 | Shifts `a' right by the number of bits given in `count'.  If any nonzero
 | bits are shifted off, they are ``jammed'' into the least significant bit of
@@ -796,3 +799,5 @@ static inline flag ne128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
     return ( a0 != b0 ) || ( a1 != b1 );
 
 }
+
+#endif
diff --git a/include/hw/acpi/tco.h b/include/hw/acpi/tco.h
index 52ad767ddd..d19dd59353 100644
--- a/include/hw/acpi/tco.h
+++ b/include/hw/acpi/tco.h
@@ -9,7 +9,6 @@
 #ifndef HW_ACPI_TCO_H
 #define HW_ACPI_TCO_H
 
-#include "qemu-common.h"
 
 /* As per ICH9 spec, the internal timer has an error of ~0.6s on every tick */
 #define TCO_TICK_NSEC 600000000LL
diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h
index 6305b9c586..e99fe2ea2e 100644
--- a/include/hw/arm/allwinner-a10.h
+++ b/include/hw/arm/allwinner-a10.h
@@ -1,6 +1,6 @@
-#ifndef ALLWINNER_H_
+#ifndef HW_ARM_ALLWINNER_A10_H
+#define HW_ARM_ALLWINNER_A10_H
 
-#include "qemu-common.h"
 #include "qemu/error-report.h"
 #include "hw/char/serial.h"
 #include "hw/arm/boot.h"
@@ -38,5 +38,4 @@ typedef struct AwA10State {
     MemoryRegion sram_a;
 } AwA10State;
 
-#define ALLWINNER_H_
 #endif
diff --git a/include/hw/arm/bcm2835_peripherals.h b/include/hw/arm/bcm2835_peripherals.h
index e79c21771f..6b17f6a382 100644
--- a/include/hw/arm/bcm2835_peripherals.h
+++ b/include/hw/arm/bcm2835_peripherals.h
@@ -11,7 +11,6 @@
 #ifndef BCM2835_PERIPHERALS_H
 #define BCM2835_PERIPHERALS_H
 
-#include "qemu-common.h"
 #include "hw/sysbus.h"
 #include "hw/char/pl011.h"
 #include "hw/char/bcm2835_aux.h"
diff --git a/include/hw/arm/exynos4210.h b/include/hw/arm/exynos4210.h
index 27c684e851..aa137271c0 100644
--- a/include/hw/arm/exynos4210.h
+++ b/include/hw/arm/exynos4210.h
@@ -25,7 +25,6 @@
 #ifndef EXYNOS4210_H
 #define EXYNOS4210_H
 
-#include "qemu-common.h"
 #include "exec/memory.h"
 #include "target/arm/cpu-qom.h"
 
diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h
index 9de867daa4..d21e418242 100644
--- a/include/hw/arm/omap.h
+++ b/include/hw/arm/omap.h
@@ -16,9 +16,11 @@
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
-#ifndef hw_omap_h
+
+#ifndef HW_ARM_OMAP_H
+#define HW_ARM_OMAP_H
+
 #include "exec/memory.h"
-# define hw_omap_h		"omap.h"
 #include "hw/irq.h"
 #include "hw/input/tsc2xxx.h"
 #include "target/arm/cpu-qom.h"
@@ -991,4 +993,4 @@ enum {
 
 # define OMAP_MPUI_REG_MASK		0x000007ff
 
-#endif /* hw_omap_h */
+#endif
diff --git a/include/hw/arm/raspi_platform.h b/include/hw/arm/raspi_platform.h
index 6467e88ae6..10083d33df 100644
--- a/include/hw/arm/raspi_platform.h
+++ b/include/hw/arm/raspi_platform.h
@@ -22,6 +22,9 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifndef HW_ARM_RASPI_PLATFORM_H
+#define HW_ARM_RASPI_PLATFORM_H
+
 #define MCORE_OFFSET            0x0000   /* Fake frame buffer device
                                           * (the multicore sync block) */
 #define IC0_OFFSET              0x2000
@@ -126,3 +129,5 @@
 #define INTERRUPT_VPU1_HALTED          5
 #define INTERRUPT_ILLEGAL_TYPE0        6
 #define INTERRUPT_ILLEGAL_TYPE1        7
+
+#endif
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index 73005f05ae..a72094204e 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -30,7 +30,6 @@
 #ifndef QEMU_ARM_VIRT_H
 #define QEMU_ARM_VIRT_H
 
-#include "qemu-common.h"
 #include "exec/hwaddr.h"
 #include "qemu/notify.h"
 #include "hw/boards.h"
diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h
index cd90b04310..35804ea80a 100644
--- a/include/hw/arm/xlnx-zynqmp.h
+++ b/include/hw/arm/xlnx-zynqmp.h
@@ -16,8 +16,8 @@
  */
 
 #ifndef XLNX_ZYNQMP_H
+#define XLNX_ZYNQMP_H
 
-#include "qemu-common.h"
 #include "hw/arm/boot.h"
 #include "hw/intc/arm_gic.h"
 #include "hw/net/cadence_gem.h"
@@ -114,5 +114,4 @@ typedef struct XlnxZynqMPState {
     bool has_rpu;
 }  XlnxZynqMPState;
 
-#define XLNX_ZYNQMP_H
 #endif
diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h
index 3b813c7f7d..8cece84326 100644
--- a/include/hw/block/fdc.h
+++ b/include/hw/block/fdc.h
@@ -1,7 +1,6 @@
 #ifndef HW_FDC_H
 #define HW_FDC_H
 
-#include "qemu-common.h"
 #include "qapi/qapi-types-block.h"
 
 /* fdc.c */
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 6ff02bf3e4..b7362af3f1 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -6,6 +6,7 @@
 #include "sysemu/blockdev.h"
 #include "sysemu/accel.h"
 #include "hw/qdev.h"
+#include "qemu/module.h"
 #include "qom/object.h"
 #include "qom/cpu.h"
 
diff --git a/include/hw/char/cadence_uart.h b/include/hw/char/cadence_uart.h
index 118e3f10de..e1cf33e94c 100644
--- a/include/hw/char/cadence_uart.h
+++ b/include/hw/char/cadence_uart.h
@@ -17,6 +17,7 @@
  */
 
 #ifndef CADENCE_UART_H
+#define CADENCE_UART_H
 
 #include "hw/sysbus.h"
 #include "chardev/char-fe.h"
@@ -66,5 +67,4 @@ static inline DeviceState *cadence_uart_create(hwaddr addr,
     return dev;
 }
 
-#define CADENCE_UART_H
 #endif
diff --git a/include/hw/display/xlnx_dp.h b/include/hw/display/xlnx_dp.h
index 45a805033a..ab0dd250cc 100644
--- a/include/hw/display/xlnx_dp.h
+++ b/include/hw/display/xlnx_dp.h
@@ -19,9 +19,11 @@
  *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, see <http://www.gnu.org/licenses/>.
- *
  */
 
+#ifndef XLNX_DP_H
+#define XLNX_DP_H
+
 #include "hw/sysbus.h"
 #include "ui/console.h"
 #include "hw/misc/auxbus.h"
@@ -33,9 +35,6 @@
 #include "hw/dma/xlnx_dpdma.h"
 #include "audio/audio.h"
 
-#ifndef XLNX_DP_H
-#define XLNX_DP_H
-
 #define AUD_CHBUF_MAX_DEPTH                 (32 * KiB)
 #define MAX_QEMU_BUFFER_SIZE                (4 * KiB)
 
@@ -107,4 +106,4 @@ typedef struct XlnxDPState {
 #define TYPE_XLNX_DP "xlnx.v-dp"
 #define XLNX_DP(obj) OBJECT_CHECK(XlnxDPState, (obj), TYPE_XLNX_DP)
 
-#endif /* !XLNX_DP_H */
+#endif
diff --git a/include/hw/dma/bcm2835_dma.h b/include/hw/dma/bcm2835_dma.h
index 60138f4d31..91ed8d05d1 100644
--- a/include/hw/dma/bcm2835_dma.h
+++ b/include/hw/dma/bcm2835_dma.h
@@ -6,7 +6,6 @@
 #ifndef BCM2835_DMA_H
 #define BCM2835_DMA_H
 
-#include "qemu-common.h"
 #include "hw/sysbus.h"
 
 typedef struct {
diff --git a/include/hw/dma/xlnx-zynq-devcfg.h b/include/hw/dma/xlnx-zynq-devcfg.h
index 9f5119a89a..1d3969d91f 100644
--- a/include/hw/dma/xlnx-zynq-devcfg.h
+++ b/include/hw/dma/xlnx-zynq-devcfg.h
@@ -25,6 +25,7 @@
  */
 
 #ifndef XLNX_ZYNQ_DEVCFG_H
+#define XLNX_ZYNQ_DEVCFG_H
 
 #include "hw/register.h"
 #include "hw/sysbus.h"
@@ -58,5 +59,4 @@ typedef struct XlnxZynqDevcfg {
     RegisterInfo regs_info[XLNX_ZYNQ_DEVCFG_R_MAX];
 } XlnxZynqDevcfg;
 
-#define XLNX_ZYNQ_DEVCFG_H
 #endif
diff --git a/include/hw/fw-path-provider.h b/include/hw/fw-path-provider.h
index 5df893a3d8..10d1bd4959 100644
--- a/include/hw/fw-path-provider.h
+++ b/include/hw/fw-path-provider.h
@@ -18,7 +18,6 @@
 #ifndef FW_PATH_PROVIDER_H
 #define FW_PATH_PROVIDER_H
 
-#include "qemu-common.h"
 #include "qom/object.h"
 
 #define TYPE_FW_PATH_PROVIDER "fw-path-provider"
diff --git a/include/hw/hw.h b/include/hw/hw.h
index ab4950c312..b1b79964b5 100644
--- a/include/hw/hw.h
+++ b/include/hw/hw.h
@@ -12,7 +12,6 @@
 #include "hw/irq.h"
 #include "migration/vmstate.h"
 #include "migration/qemu-file-types.h"
-#include "qemu/module.h"
 #include "sysemu/reset.h"
 
 void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
diff --git a/include/hw/i2c/ppc4xx_i2c.h b/include/hw/i2c/ppc4xx_i2c.h
index b3450bacf7..aa2a2bf9de 100644
--- a/include/hw/i2c/ppc4xx_i2c.h
+++ b/include/hw/i2c/ppc4xx_i2c.h
@@ -27,7 +27,6 @@
 #ifndef PPC4XX_I2C_H
 #define PPC4XX_I2C_H
 
-#include "qemu-common.h"
 #include "hw/sysbus.h"
 #include "hw/i2c/i2c.h"
 
diff --git a/include/hw/i386/apic.h b/include/hw/i386/apic.h
index a9f6c0aa33..da1d2fe155 100644
--- a/include/hw/i386/apic.h
+++ b/include/hw/i386/apic.h
@@ -1,7 +1,6 @@
 #ifndef APIC_H
 #define APIC_H
 
-#include "qemu-common.h"
 
 /* apic.c */
 void apic_deliver_irq(uint8_t dest, uint8_t dest_mode, uint8_t delivery_mode,
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 5d5636241e..a7d0b87166 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -1,7 +1,6 @@
 #ifndef HW_PC_H
 #define HW_PC_H
 
-#include "qemu-common.h"
 #include "exec/memory.h"
 #include "hw/boards.h"
 #include "hw/isa/isa.h"
@@ -12,6 +11,7 @@
 
 #include "qemu/range.h"
 #include "qemu/bitmap.h"
+#include "qemu/module.h"
 #include "sysemu/sysemu.h"
 #include "hw/pci/pci.h"
 #include "hw/mem/pc-dimm.h"
diff --git a/include/hw/ipmi/ipmi.h b/include/hw/ipmi/ipmi.h
index 99661d2bf0..011faf22e9 100644
--- a/include/hw/ipmi/ipmi.h
+++ b/include/hw/ipmi/ipmi.h
@@ -26,7 +26,6 @@
 #define HW_IPMI_H
 
 #include "exec/memory.h"
-#include "qemu-common.h"
 #include "hw/qdev.h"
 
 #define MAX_IPMI_MSG_SIZE 300
diff --git a/include/hw/isa/apm.h b/include/hw/isa/apm.h
index b7098bf7ca..0f93602936 100644
--- a/include/hw/isa/apm.h
+++ b/include/hw/isa/apm.h
@@ -1,7 +1,6 @@
 #ifndef APM_H
 #define APM_H
 
-#include "qemu-common.h"
 #include "hw/hw.h"
 #include "exec/memory.h"
 
diff --git a/include/hw/isa/superio.h b/include/hw/isa/superio.h
index 345f006081..b151dcd753 100644
--- a/include/hw/isa/superio.h
+++ b/include/hw/isa/superio.h
@@ -10,7 +10,6 @@
 #ifndef HW_ISA_SUPERIO_H
 #define HW_ISA_SUPERIO_H
 
-#include "qemu-common.h"
 #include "sysemu/sysemu.h"
 #include "hw/isa/isa.h"
 
diff --git a/include/hw/kvm/clock.h b/include/hw/kvm/clock.h
index 252ea13461..81c66b2302 100644
--- a/include/hw/kvm/clock.h
+++ b/include/hw/kvm/clock.h
@@ -8,9 +8,11 @@
  *
  * This work is licensed under the terms of the GNU GPL version 2.
  * See the COPYING file in the top-level directory.
- *
  */
 
+#ifndef HW_KVM_CLOCK_H
+#define HW_KVM_CLOCK_H
+
 #ifdef CONFIG_KVM
 
 void kvmclock_create(void);
@@ -22,3 +24,5 @@ static inline void kvmclock_create(void)
 }
 
 #endif /* !CONFIG_KVM */
+
+#endif
diff --git a/include/hw/lm32/lm32_pic.h b/include/hw/lm32/lm32_pic.h
index e6479b8f63..9e5e038437 100644
--- a/include/hw/lm32/lm32_pic.h
+++ b/include/hw/lm32/lm32_pic.h
@@ -1,7 +1,6 @@
 #ifndef QEMU_HW_LM32_PIC_H
 #define QEMU_HW_LM32_PIC_H
 
-#include "qemu-common.h"
 
 uint32_t lm32_pic_get_ip(DeviceState *d);
 uint32_t lm32_pic_get_im(DeviceState *d);
diff --git a/include/hw/m68k/mcf_fec.h b/include/hw/m68k/mcf_fec.h
index 7f029f7b59..eeb471f9c9 100644
--- a/include/hw/m68k/mcf_fec.h
+++ b/include/hw/m68k/mcf_fec.h
@@ -7,7 +7,12 @@
  * (at your option) any later version.
  */
 
+#ifndef HW_M68K_MCF_FEC_H
+#define HW_M68K_MCF_FEC_H
+
 #define TYPE_MCF_FEC_NET "mcf-fec"
 #define MCF_FEC_NET(obj) OBJECT_CHECK(mcf_fec_state, (obj), TYPE_MCF_FEC_NET)
 
 #define FEC_NUM_IRQ 13
+
+#endif
diff --git a/include/hw/mips/bios.h b/include/hw/mips/bios.h
index d67ef33e83..c03007999a 100644
--- a/include/hw/mips/bios.h
+++ b/include/hw/mips/bios.h
@@ -1,3 +1,6 @@
+#ifndef HW_MIPS_BIOS_H
+#define HW_MIPS_BIOS_H
+
 #include "qemu/units.h"
 #include "cpu.h"
 
@@ -7,3 +10,5 @@
 #else
 #define BIOS_FILENAME "mipsel_bios.bin"
 #endif
+
+#endif
diff --git a/include/hw/net/cadence_gem.h b/include/hw/net/cadence_gem.h
index 5426961d91..5c83036ade 100644
--- a/include/hw/net/cadence_gem.h
+++ b/include/hw/net/cadence_gem.h
@@ -23,6 +23,7 @@
  */
 
 #ifndef CADENCE_GEM_H
+#define CADENCE_GEM_H
 
 #define TYPE_CADENCE_GEM "cadence_gem"
 #define CADENCE_GEM(obj) OBJECT_CHECK(CadenceGEMState, (obj), TYPE_CADENCE_GEM)
@@ -84,5 +85,4 @@ typedef struct CadenceGEMState {
     bool sar_active[4];
 } CadenceGEMState;
 
-#define CADENCE_GEM_H
 #endif
diff --git a/include/hw/nmi.h b/include/hw/nmi.h
index ad857f3832..a1e128724e 100644
--- a/include/hw/nmi.h
+++ b/include/hw/nmi.h
@@ -22,7 +22,6 @@
 #ifndef NMI_H
 #define NMI_H
 
-#include "qemu-common.h"
 #include "qom/object.h"
 
 #define TYPE_NMI "nmi"
diff --git a/include/hw/pci-bridge/simba.h b/include/hw/pci-bridge/simba.h
index e13ba27d0b..d8649973ee 100644
--- a/include/hw/pci-bridge/simba.h
+++ b/include/hw/pci-bridge/simba.h
@@ -24,6 +24,9 @@
  * THE SOFTWARE.
  */
 
+#ifndef HW_PCI_BRIDGE_SIMBA_H
+#define HW_PCI_BRIDGE_SIMBA_H
+
 #include "hw/pci/pci_bridge.h"
 
 
@@ -35,3 +38,5 @@ typedef struct SimbaPCIBridge {
 #define TYPE_SIMBA_PCI_BRIDGE "pbm-bridge"
 #define SIMBA_PCI_BRIDGE(obj) \
     OBJECT_CHECK(SimbaPCIBridge, (obj), TYPE_SIMBA_PCI_BRIDGE)
+
+#endif
diff --git a/include/hw/pci-host/pam.h b/include/hw/pci-host/pam.h
index 6116c638f9..fec5cd35d6 100644
--- a/include/hw/pci-host/pam.h
+++ b/include/hw/pci-host/pam.h
@@ -50,7 +50,6 @@
  * 0xf0000 - 0xfffff System BIOS Area Memory Segments
  */
 
-#include "qemu-common.h"
 #include "exec/memory.h"
 
 #define SMRAM_C_BASE    0xa0000
diff --git a/include/hw/pci/msi.h b/include/hw/pci/msi.h
index 8440eaee11..4087688486 100644
--- a/include/hw/pci/msi.h
+++ b/include/hw/pci/msi.h
@@ -21,7 +21,6 @@
 #ifndef QEMU_MSI_H
 #define QEMU_MSI_H
 
-#include "qemu-common.h"
 #include "hw/pci/pci.h"
 
 struct MSIMessage {
diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h
index 08acfa836e..4c4a60c739 100644
--- a/include/hw/pci/msix.h
+++ b/include/hw/pci/msix.h
@@ -1,7 +1,6 @@
 #ifndef QEMU_MSIX_H
 #define QEMU_MSIX_H
 
-#include "qemu-common.h"
 #include "hw/pci/pci.h"
 
 #define MSIX_CAP_LENGTH 12
diff --git a/include/hw/pci/pci_regs.h b/include/hw/pci/pci_regs.h
index 7a83142578..77ba64b931 100644
--- a/include/hw/pci/pci_regs.h
+++ b/include/hw/pci/pci_regs.h
@@ -1,3 +1,8 @@
+#ifndef HW_PCI_PCI_REGS_H
+#define HW_PCI_PCI_REGS_H
+
 #include "standard-headers/linux/pci_regs.h"
 
 #define  PCI_PM_CAP_VER_1_1     0x0002  /* PCI PM spec ver. 1.1 */
+
+#endif
diff --git a/include/hw/pci/shpc.h b/include/hw/pci/shpc.h
index 18f6ec1cd5..bd8204f64e 100644
--- a/include/hw/pci/shpc.h
+++ b/include/hw/pci/shpc.h
@@ -1,7 +1,6 @@
 #ifndef SHPC_H
 #define SHPC_H
 
-#include "qemu-common.h"
 #include "exec/memory.h"
 #include "hw/hotplug.h"
 #include "hw/pci/pci.h"
diff --git a/include/hw/pci/slotid_cap.h b/include/hw/pci/slotid_cap.h
index a777ea0e49..8b4dc0ce83 100644
--- a/include/hw/pci/slotid_cap.h
+++ b/include/hw/pci/slotid_cap.h
@@ -1,7 +1,6 @@
 #ifndef PCI_SLOTID_CAP_H
 #define PCI_SLOTID_CAP_H
 
-#include "qemu-common.h"
 
 int slotid_cap_init(PCIDevice *dev, int nslots,
                     uint8_t chassis,
diff --git a/include/hw/ppc/openpic.h b/include/hw/ppc/openpic.h
index dad08fe9be..7642a8ea1d 100644
--- a/include/hw/ppc/openpic.h
+++ b/include/hw/ppc/openpic.h
@@ -1,7 +1,6 @@
 #ifndef OPENPIC_H
 #define OPENPIC_H
 
-#include "qemu-common.h"
 #include "hw/sysbus.h"
 #include "hw/qdev-core.h"
 #include "qom/cpu.h"
diff --git a/include/hw/ptimer.h b/include/hw/ptimer.h
index 0731d9aef1..2b866902aa 100644
--- a/include/hw/ptimer.h
+++ b/include/hw/ptimer.h
@@ -8,7 +8,6 @@
 #ifndef PTIMER_H
 #define PTIMER_H
 
-#include "qemu-common.h"
 #include "qemu/timer.h"
 #include "migration/vmstate.h"
 
diff --git a/include/hw/qdev-dma.h b/include/hw/qdev-dma.h
index 8cfb0f348e..b00391aa0c 100644
--- a/include/hw/qdev-dma.h
+++ b/include/hw/qdev-dma.h
@@ -6,5 +6,11 @@
  * This work is licensed under the terms of the GNU GPL, version 2 or later.
  * See the COPYING file in the top-level directory.
  */
+
+#ifndef HW_QDEV_DMA_H
+#define HW_QDEV_DMA_H
+
 #define DEFINE_PROP_DMAADDR(_n, _s, _f, _d)                               \
     DEFINE_PROP_UINT64(_n, _s, _f, _d)
+
+#endif
diff --git a/include/hw/sd/sdhci.h b/include/hw/sd/sdhci.h
index f321767c56..cbf415e43a 100644
--- a/include/hw/sd/sdhci.h
+++ b/include/hw/sd/sdhci.h
@@ -25,7 +25,6 @@
 #ifndef SDHCI_H
 #define SDHCI_H
 
-#include "qemu-common.h"
 #include "hw/pci/pci.h"
 #include "hw/sysbus.h"
 #include "hw/sd/sd.h"
diff --git a/include/hw/semihosting/console.h b/include/hw/semihosting/console.h
index 30e66ae20a..9eb45b7c53 100644
--- a/include/hw/semihosting/console.h
+++ b/include/hw/semihosting/console.h
@@ -6,8 +6,8 @@
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
 
-#ifndef _SEMIHOST_CONSOLE_H_
-#define _SEMIHOST_CONSOLE_H_
+#ifndef SEMIHOST_CONSOLE_H
+#define SEMIHOST_CONSOLE_H
 
 /**
  * qemu_semihosting_console_out:
@@ -35,4 +35,4 @@ int qemu_semihosting_console_out(CPUArchState *env, target_ulong s, int len);
  */
 int qemu_semihosting_log_out(const char *s, int len);
 
-#endif /* _SEMIHOST_CONSOLE_H_ */
+#endif /* SEMIHOST_CONSOLE_H */
diff --git a/include/hw/sh4/sh_intc.h b/include/hw/sh4/sh_intc.h
index adfedb2efc..b7c2404334 100644
--- a/include/hw/sh4/sh_intc.h
+++ b/include/hw/sh4/sh_intc.h
@@ -1,7 +1,6 @@
 #ifndef SH_INTC_H
 #define SH_INTC_H
 
-#include "qemu-common.h"
 #include "hw/irq.h"
 
 typedef unsigned char intc_enum;
diff --git a/include/hw/sparc/sparc64.h b/include/hw/sparc/sparc64.h
index 5af4344459..21ab79e343 100644
--- a/include/hw/sparc/sparc64.h
+++ b/include/hw/sparc/sparc64.h
@@ -1,6 +1,10 @@
+#ifndef HW_SPARC_SPARC64_H
+#define HW_SPARC_SPARC64_H
 
 #define IVEC_MAX             0x40
 
 SPARCCPU *sparc64_cpu_devinit(const char *cpu_type, uint64_t prom_addr);
 
 void sparc64_cpu_set_ivec_irq(void *opaque, int irq, int level);
+
+#endif
diff --git a/include/hw/sparc/sun4m_iommu.h b/include/hw/sparc/sun4m_iommu.h
index 938937eb04..482266c6a7 100644
--- a/include/hw/sparc/sun4m_iommu.h
+++ b/include/hw/sparc/sun4m_iommu.h
@@ -25,7 +25,6 @@
 #ifndef SUN4M_IOMMU_H
 #define SUN4M_IOMMU_H
 
-#include "qemu-common.h"
 #include "hw/sysbus.h"
 
 #define IOMMU_NREGS         (4 * 4096 / 4)
diff --git a/include/hw/sparc/sun4u_iommu.h b/include/hw/sparc/sun4u_iommu.h
index a760172e8e..5472d489cf 100644
--- a/include/hw/sparc/sun4u_iommu.h
+++ b/include/hw/sparc/sun4u_iommu.h
@@ -27,7 +27,6 @@
 #ifndef SUN4U_IOMMU_H
 #define SUN4U_IOMMU_H
 
-#include "qemu-common.h"
 #include "hw/sysbus.h"
 
 #define IOMMU_NREGS             3
diff --git a/include/hw/stream.h b/include/hw/stream.h
index 15774f07ab..d02f62ca89 100644
--- a/include/hw/stream.h
+++ b/include/hw/stream.h
@@ -1,7 +1,6 @@
 #ifndef STREAM_H
 #define STREAM_H
 
-#include "qemu-common.h"
 #include "qom/object.h"
 
 /* stream slave. Used until qdev provides a generic way.  */
diff --git a/include/hw/timer/m48t59.h b/include/hw/timer/m48t59.h
index 6f8db04fce..43efc91f56 100644
--- a/include/hw/timer/m48t59.h
+++ b/include/hw/timer/m48t59.h
@@ -1,7 +1,6 @@
 #ifndef HW_M48T59_H
 #define HW_M48T59_H
 
-#include "qemu-common.h"
 #include "qom/object.h"
 
 #define TYPE_NVRAM "nvram"
diff --git a/include/hw/timer/xlnx-zynqmp-rtc.h b/include/hw/timer/xlnx-zynqmp-rtc.h
index 5ba4d8bc4a..6e9134edf6 100644
--- a/include/hw/timer/xlnx-zynqmp-rtc.h
+++ b/include/hw/timer/xlnx-zynqmp-rtc.h
@@ -24,6 +24,9 @@
  * THE SOFTWARE.
  */
 
+#ifndef HW_TIMER_XLNX_ZYNQMP_RTC_H
+#define HW_TIMER_XLNX_ZYNQMP_RTC_H
+
 #include "hw/register.h"
 
 #define TYPE_XLNX_ZYNQMP_RTC "xlnx-zynmp.rtc"
@@ -84,3 +87,5 @@ typedef struct XlnxZynqMPRTC {
     uint32_t regs[XLNX_ZYNQMP_RTC_R_MAX];
     RegisterInfo regs_info[XLNX_ZYNQMP_RTC_R_MAX];
 } XlnxZynqMPRTC;
+
+#endif
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index 1155b79678..e05bc09794 100644
--- a/include/hw/vfio/vfio-common.h
+++ b/include/hw/vfio/vfio-common.h
@@ -21,7 +21,6 @@
 #ifndef HW_VFIO_VFIO_COMMON_H
 #define HW_VFIO_VFIO_COMMON_H
 
-#include "qemu-common.h"
 #include "exec/memory.h"
 #include "qemu/queue.h"
 #include "qemu/notify.h"
diff --git a/include/hw/virtio/vhost-scsi-common.h b/include/hw/virtio/vhost-scsi-common.h
index 4eab767ee8..54357164f0 100644
--- a/include/hw/virtio/vhost-scsi-common.h
+++ b/include/hw/virtio/vhost-scsi-common.h
@@ -14,7 +14,6 @@
 #ifndef VHOST_SCSI_COMMON_H
 #define VHOST_SCSI_COMMON_H
 
-#include "qemu-common.h"
 #include "hw/qdev.h"
 #include "hw/virtio/virtio-scsi.h"
 #include "hw/virtio/vhost.h"
diff --git a/include/hw/virtio/vhost-scsi.h b/include/hw/virtio/vhost-scsi.h
index 04658d14f5..df5bfdb188 100644
--- a/include/hw/virtio/vhost-scsi.h
+++ b/include/hw/virtio/vhost-scsi.h
@@ -14,7 +14,6 @@
 #ifndef VHOST_SCSI_H
 #define VHOST_SCSI_H
 
-#include "qemu-common.h"
 #include "hw/qdev.h"
 #include "hw/virtio/virtio-scsi.h"
 #include "hw/virtio/vhost.h"
diff --git a/include/hw/virtio/vhost-user-blk.h b/include/hw/virtio/vhost-user-blk.h
index 51457fb857..8dbf11c6f0 100644
--- a/include/hw/virtio/vhost-user-blk.h
+++ b/include/hw/virtio/vhost-user-blk.h
@@ -16,7 +16,6 @@
 #define VHOST_USER_BLK_H
 
 #include "standard-headers/linux/virtio_blk.h"
-#include "qemu-common.h"
 #include "hw/qdev.h"
 #include "hw/block/block.h"
 #include "chardev/char-fe.h"
diff --git a/include/hw/virtio/vhost-user-scsi.h b/include/hw/virtio/vhost-user-scsi.h
index 738f9288bd..1b332ea910 100644
--- a/include/hw/virtio/vhost-user-scsi.h
+++ b/include/hw/virtio/vhost-user-scsi.h
@@ -17,7 +17,6 @@
 #ifndef VHOST_USER_SCSI_H
 #define VHOST_USER_SCSI_H
 
-#include "qemu-common.h"
 #include "hw/qdev.h"
 #include "hw/virtio/virtio-scsi.h"
 #include "hw/virtio/vhost.h"
diff --git a/include/hw/xen/io/ring.h b/include/hw/xen/io/ring.h
index 1adacf09f9..62abfd7a6e 100644
--- a/include/hw/xen/io/ring.h
+++ b/include/hw/xen/io/ring.h
@@ -24,8 +24,8 @@
  * Tim Deegan and Andrew Warfield November 2004.
  */
 
-#ifndef __XEN_PUBLIC_IO_RING_H__
-#define __XEN_PUBLIC_IO_RING_H__
+#ifndef XEN_PUBLIC_IO_RING_H
+#define XEN_PUBLIC_IO_RING_H
 
 /*
  * When #include'ing this header, you need to provide the following
@@ -469,7 +469,7 @@ struct name##_data_intf {                                                     \
 };                                                                            \
 DEFINE_XEN_FLEX_RING(name)
 
-#endif /* __XEN_PUBLIC_IO_RING_H__ */
+#endif /* XEN_PUBLIC_IO_RING_H */
 
 /*
  * Local variables:
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index ba039c146d..9c7b5f78dc 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -8,7 +8,6 @@
  *   /usr/include/xen, so it can be included unconditionally.
  */
 
-#include "qemu-common.h"
 #include "exec/cpu-common.h"
 #include "hw/irq.h"
 
diff --git a/include/io/channel.h b/include/io/channel.h
index 59460cb1ec..d4557f0930 100644
--- a/include/io/channel.h
+++ b/include/io/channel.h
@@ -21,7 +21,6 @@
 #ifndef QIO_CHANNEL_H
 #define QIO_CHANNEL_H
 
-#include "qemu-common.h"
 #include "qom/object.h"
 #include "qemu/coroutine.h"
 #include "block/aio.h"
diff --git a/include/io/dns-resolver.h b/include/io/dns-resolver.h
index 1a162185cc..a475e978c8 100644
--- a/include/io/dns-resolver.h
+++ b/include/io/dns-resolver.h
@@ -21,7 +21,6 @@
 #ifndef QIO_DNS_RESOLVER_H
 #define QIO_DNS_RESOLVER_H
 
-#include "qemu-common.h"
 #include "qapi/qapi-types-sockets.h"
 #include "qom/object.h"
 #include "io/task.h"
diff --git a/include/io/task.h b/include/io/task.h
index 57d8ba835e..5cb9faf9f2 100644
--- a/include/io/task.h
+++ b/include/io/task.h
@@ -21,7 +21,6 @@
 #ifndef QIO_TASK_H
 #define QIO_TASK_H
 
-#include "qemu-common.h"
 #include "qom/object.h"
 
 typedef struct QIOTask QIOTask;
diff --git a/include/migration/colo.h b/include/migration/colo.h
index f6fbe23ec9..1636e6f907 100644
--- a/include/migration/colo.h
+++ b/include/migration/colo.h
@@ -13,7 +13,6 @@
 #ifndef QEMU_COLO_H
 #define QEMU_COLO_H
 
-#include "qemu-common.h"
 #include "qapi/qapi-types-migration.h"
 
 enum colo_event {
diff --git a/include/migration/failover.h b/include/migration/failover.h
index 4c37218dcc..475f88f533 100644
--- a/include/migration/failover.h
+++ b/include/migration/failover.h
@@ -13,7 +13,6 @@
 #ifndef QEMU_FAILOVER_H
 #define QEMU_FAILOVER_H
 
-#include "qemu-common.h"
 #include "qapi/qapi-types-migration.h"
 
 void failover_init_state(void);
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
index 86656297f1..06cfcd8f36 100644
--- a/include/monitor/monitor.h
+++ b/include/monitor/monitor.h
@@ -1,7 +1,6 @@
 #ifndef MONITOR_H
 #define MONITOR_H
 
-#include "qemu-common.h"
 #include "block/block.h"
 #include "qapi/qapi-types-misc.h"
 #include "qemu/readline.h"
diff --git a/include/net/announce.h b/include/net/announce.h
index 892d302b65..04a035f679 100644
--- a/include/net/announce.h
+++ b/include/net/announce.h
@@ -9,7 +9,6 @@
 #ifndef QEMU_NET_ANNOUNCE_H
 #define QEMU_NET_ANNOUNCE_H
 
-#include "qemu-common.h"
 #include "qapi/qapi-types-net.h"
 #include "qemu/timer.h"
 
diff --git a/include/net/filter.h b/include/net/filter.h
index 49da666ac0..9bc6fa3cc6 100644
--- a/include/net/filter.h
+++ b/include/net/filter.h
@@ -11,7 +11,6 @@
 
 #include "qapi/qapi-types-net.h"
 #include "qom/object.h"
-#include "qemu-common.h"
 #include "net/queue.h"
 
 #define TYPE_NETFILTER "netfilter"
diff --git a/include/net/queue.h b/include/net/queue.h
index 5469fdbeaa..c0269bb1dc 100644
--- a/include/net/queue.h
+++ b/include/net/queue.h
@@ -24,7 +24,6 @@
 #ifndef QEMU_NET_QUEUE_H
 #define QEMU_NET_QUEUE_H
 
-#include "qemu-common.h"
 
 typedef struct NetPacket NetPacket;
 typedef struct NetQueue NetQueue;
diff --git a/include/net/tap.h b/include/net/tap.h
index ce6f8418ac..5d585515f9 100644
--- a/include/net/tap.h
+++ b/include/net/tap.h
@@ -26,7 +26,6 @@
 #ifndef QEMU_NET_TAP_H
 #define QEMU_NET_TAP_H
 
-#include "qemu-common.h"
 #include "standard-headers/linux/virtio_net.h"
 
 int tap_enable(NetClientState *nc);
diff --git a/include/qemu-common.h b/include/qemu-common.h
index f891e05e7e..0235cd3b91 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -1,6 +1,4 @@
-
-/* Common header file that is included by all of QEMU.
- *
+/*
  * This file is supposed to be included only by .c files. No header file should
  * depend on qemu-common.h, as this would easily lead to circular header
  * dependencies.
@@ -31,22 +29,6 @@ int qemu_main(int argc, char **argv, char **envp);
 void qemu_get_timedate(struct tm *tm, int offset);
 int qemu_timedate_diff(struct tm *tm);
 
-#define qemu_isalnum(c)		isalnum((unsigned char)(c))
-#define qemu_isalpha(c)		isalpha((unsigned char)(c))
-#define qemu_iscntrl(c)		iscntrl((unsigned char)(c))
-#define qemu_isdigit(c)		isdigit((unsigned char)(c))
-#define qemu_isgraph(c)		isgraph((unsigned char)(c))
-#define qemu_islower(c)		islower((unsigned char)(c))
-#define qemu_isprint(c)		isprint((unsigned char)(c))
-#define qemu_ispunct(c)		ispunct((unsigned char)(c))
-#define qemu_isspace(c)		isspace((unsigned char)(c))
-#define qemu_isupper(c)		isupper((unsigned char)(c))
-#define qemu_isxdigit(c)	isxdigit((unsigned char)(c))
-#define qemu_tolower(c)		tolower((unsigned char)(c))
-#define qemu_toupper(c)		toupper((unsigned char)(c))
-#define qemu_isascii(c)		isascii((unsigned char)(c))
-#define qemu_toascii(c)		toascii((unsigned char)(c))
-
 void *qemu_oom_check(void *ptr);
 
 ssize_t qemu_write_full(int fd, const void *buf, size_t count)
@@ -77,14 +59,6 @@ int qemu_openpty_raw(int *aslave, char *pty_name);
     sendto(sockfd, buf, len, flags, destaddr, addrlen)
 #endif
 
-extern bool tcg_allowed;
-void tcg_exec_init(unsigned long tb_size);
-#ifdef CONFIG_TCG
-#define tcg_enabled() (tcg_allowed)
-#else
-#define tcg_enabled() 0
-#endif
-
 void cpu_exec_init_all(void);
 void cpu_exec_step_atomic(CPUState *cpu);
 
@@ -137,8 +111,6 @@ void os_setup_early_signal_handling(void);
 char *os_find_datadir(void);
 int os_parse_cmd_args(int index, const char *optarg);
 
-#include "qemu/module.h"
-
 /*
  * Hexdump a buffer to a file. An optional string prefix is added to every line
  */
diff --git a/include/qemu-io.h b/include/qemu-io.h
index 7433239372..3af513004a 100644
--- a/include/qemu-io.h
+++ b/include/qemu-io.h
@@ -18,7 +18,6 @@
 #ifndef QEMU_IO_H
 #define QEMU_IO_H
 
-#include "qemu-common.h"
 
 #define CMD_FLAG_GLOBAL ((int)0x80000000) /* don't iterate "args" */
 
diff --git a/include/qemu/base64.h b/include/qemu/base64.h
index 815d85267d..0a3c5c9c53 100644
--- a/include/qemu/base64.h
+++ b/include/qemu/base64.h
@@ -21,7 +21,6 @@
 #ifndef QEMU_BASE64_H
 #define QEMU_BASE64_H
 
-#include "qemu-common.h"
 
 
 /**
diff --git a/include/qemu/buffer.h b/include/qemu/buffer.h
index b2ead1f051..3a909aeca4 100644
--- a/include/qemu/buffer.h
+++ b/include/qemu/buffer.h
@@ -21,7 +21,6 @@
 #ifndef QEMU_BUFFER_H
 #define QEMU_BUFFER_H
 
-#include "qemu-common.h"
 
 typedef struct Buffer Buffer;
 
diff --git a/include/qemu/crc32c.h b/include/qemu/crc32c.h
index dafb6a1ada..5b78884c38 100644
--- a/include/qemu/crc32c.h
+++ b/include/qemu/crc32c.h
@@ -28,7 +28,6 @@
 #ifndef QEMU_CRC32C_H
 #define QEMU_CRC32C_H
 
-#include "qemu-common.h"
 
 uint32_t crc32c(uint32_t crc, const uint8_t *data, unsigned int length);
 
diff --git a/include/qemu/ctype.h b/include/qemu/ctype.h
new file mode 100644
index 0000000000..3691f0984d
--- /dev/null
+++ b/include/qemu/ctype.h
@@ -0,0 +1,27 @@
+/*
+ * QEMU TCG support
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_CTYPE_H
+#define QEMU_CTYPE_H
+
+#define qemu_isalnum(c)         isalnum((unsigned char)(c))
+#define qemu_isalpha(c)         isalpha((unsigned char)(c))
+#define qemu_iscntrl(c)         iscntrl((unsigned char)(c))
+#define qemu_isdigit(c)         isdigit((unsigned char)(c))
+#define qemu_isgraph(c)         isgraph((unsigned char)(c))
+#define qemu_islower(c)         islower((unsigned char)(c))
+#define qemu_isprint(c)         isprint((unsigned char)(c))
+#define qemu_ispunct(c)         ispunct((unsigned char)(c))
+#define qemu_isspace(c)         isspace((unsigned char)(c))
+#define qemu_isupper(c)         isupper((unsigned char)(c))
+#define qemu_isxdigit(c)        isxdigit((unsigned char)(c))
+#define qemu_tolower(c)         tolower((unsigned char)(c))
+#define qemu_toupper(c)         toupper((unsigned char)(c))
+#define qemu_isascii(c)         isascii((unsigned char)(c))
+#define qemu_toascii(c)         toascii((unsigned char)(c))
+
+#endif
diff --git a/include/qemu/event_notifier.h b/include/qemu/event_notifier.h
index 599c99f1a5..3380b662f3 100644
--- a/include/qemu/event_notifier.h
+++ b/include/qemu/event_notifier.h
@@ -13,7 +13,6 @@
 #ifndef QEMU_EVENT_NOTIFIER_H
 #define QEMU_EVENT_NOTIFIER_H
 
-#include "qemu-common.h"
 
 #ifdef _WIN32
 #include <windows.h>
diff --git a/include/qemu/filemonitor.h b/include/qemu/filemonitor.h
index 70e613dfe3..a41ceb0244 100644
--- a/include/qemu/filemonitor.h
+++ b/include/qemu/filemonitor.h
@@ -21,7 +21,6 @@
 #ifndef QEMU_FILEMONITOR_H
 #define QEMU_FILEMONITOR_H
 
-#include "qemu-common.h"
 
 
 typedef struct QFileMonitor QFileMonitor;
diff --git a/include/qemu/mmap-alloc.h b/include/qemu/mmap-alloc.h
index eec98d82c1..e786266b92 100644
--- a/include/qemu/mmap-alloc.h
+++ b/include/qemu/mmap-alloc.h
@@ -1,7 +1,6 @@
 #ifndef QEMU_MMAP_ALLOC_H
 #define QEMU_MMAP_ALLOC_H
 
-#include "qemu-common.h"
 
 size_t qemu_fd_getpagesize(int fd);
 
diff --git a/include/qemu/qdist.h b/include/qemu/qdist.h
index 54ece760d6..bfb3211537 100644
--- a/include/qemu/qdist.h
+++ b/include/qemu/qdist.h
@@ -7,7 +7,6 @@
 #ifndef QEMU_QDIST_H
 #define QEMU_QDIST_H
 
-#include "qemu-common.h"
 #include "qemu/bitops.h"
 
 /*
diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h
index abeb886d93..05f6346137 100644
--- a/include/qemu/throttle.h
+++ b/include/qemu/throttle.h
@@ -25,7 +25,6 @@
 #ifndef THROTTLE_H
 #define THROTTLE_H
 
-#include "qemu-common.h"
 #include "qapi/qapi-types-block-core.h"
 #include "qemu/timer.h"
 
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index a86330c987..5d978e1634 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -1,7 +1,6 @@
 #ifndef QEMU_TIMER_H
 #define QEMU_TIMER_H
 
-#include "qemu-common.h"
 #include "qemu/bitops.h"
 #include "qemu/notify.h"
 #include "qemu/host-utils.h"
diff --git a/include/qemu/uuid.h b/include/qemu/uuid.h
index 037357d990..129c45f2c5 100644
--- a/include/qemu/uuid.h
+++ b/include/qemu/uuid.h
@@ -16,7 +16,6 @@
 #ifndef QEMU_UUID_H
 #define QEMU_UUID_H
 
-#include "qemu-common.h"
 
 /* Version 4 UUID (pseudo random numbers), RFC4122 4.4. */
 
diff --git a/include/qom/object.h b/include/qom/object.h
index 288cdddf44..7bb82a7f56 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -16,6 +16,7 @@
 
 #include "qapi/qapi-builtin-types.h"
 #include "qemu/queue.h"
+#include "qemu/module.h"
 
 struct TypeImpl;
 typedef struct TypeImpl *Type;
diff --git a/include/sysemu/cryptodev-vhost.h b/include/sysemu/cryptodev-vhost.h
index fb26b86977..f42824fbde 100644
--- a/include/sysemu/cryptodev-vhost.h
+++ b/include/sysemu/cryptodev-vhost.h
@@ -24,7 +24,6 @@
 #ifndef CRYPTODEV_VHOST_H
 #define CRYPTODEV_VHOST_H
 
-#include "qemu-common.h"
 #include "hw/virtio/vhost.h"
 #include "hw/virtio/vhost-backend.h"
 #include "chardev/char.h"
diff --git a/include/sysemu/cryptodev.h b/include/sysemu/cryptodev.h
index faeb6f891a..92bbb79131 100644
--- a/include/sysemu/cryptodev.h
+++ b/include/sysemu/cryptodev.h
@@ -24,7 +24,6 @@
 #define CRYPTODEV_H
 
 #include "qom/object.h"
-#include "qemu-common.h"
 
 /**
  * CryptoDevBackend:
diff --git a/include/sysemu/hax.h b/include/sysemu/hax.h
index 1f6c46186d..f005995c50 100644
--- a/include/sysemu/hax.h
+++ b/include/sysemu/hax.h
@@ -22,7 +22,6 @@
 #ifndef QEMU_HAX_H
 #define QEMU_HAX_H
 
-#include "qemu-common.h"
 
 int hax_sync_vcpus(void);
 int hax_init_vcpu(CPUState *cpu);
diff --git a/include/sysemu/hvf.h b/include/sysemu/hvf.h
index 300bf3e9a8..d275b5a843 100644
--- a/include/sysemu/hvf.h
+++ b/include/sysemu/hvf.h
@@ -13,7 +13,6 @@
 #ifndef HVF_H
 #define HVF_H
 
-#include "qemu-common.h"
 #include "qemu/bitops.h"
 #include "exec/memory.h"
 #include "sysemu/accel.h"
diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h
index 096ddfc20c..cd114b8d80 100644
--- a/include/sysemu/qtest.h
+++ b/include/sysemu/qtest.h
@@ -14,7 +14,6 @@
 #ifndef QTEST_H
 #define QTEST_H
 
-#include "qemu-common.h"
 
 extern bool qtest_allowed;
 
diff --git a/include/sysemu/rng.h b/include/sysemu/rng.h
index 27b37da05d..2a02f47771 100644
--- a/include/sysemu/rng.h
+++ b/include/sysemu/rng.h
@@ -14,7 +14,6 @@
 #define QEMU_RNG_H
 
 #include "qom/object.h"
-#include "qemu-common.h"
 
 #define TYPE_RNG_BACKEND "rng-backend"
 #define RNG_BACKEND(obj) \
diff --git a/include/sysemu/tcg.h b/include/sysemu/tcg.h
new file mode 100644
index 0000000000..7d116d2e80
--- /dev/null
+++ b/include/sysemu/tcg.h
@@ -0,0 +1,19 @@
+/*
+ * QEMU TCG support
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef SYSEMU_TCG_H
+#define SYSEMU_TCG_H
+
+extern bool tcg_allowed;
+void tcg_exec_init(unsigned long tb_size);
+#ifdef CONFIG_TCG
+#define tcg_enabled() (tcg_allowed)
+#else
+#define tcg_enabled() 0
+#endif
+
+#endif
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index 14488820f6..9e7451fb52 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -14,7 +14,6 @@
 #define TPM_BACKEND_H
 
 #include "qom/object.h"
-#include "qemu-common.h"
 #include "qemu/option.h"
 #include "sysemu/tpm.h"
 #include "qapi/error.h"
diff --git a/include/sysemu/whpx.h b/include/sysemu/whpx.h
index d200ee01d0..4794e8effe 100644
--- a/include/sysemu/whpx.h
+++ b/include/sysemu/whpx.h
@@ -13,7 +13,6 @@
 #ifndef QEMU_WHPX_H
 #define QEMU_WHPX_H
 
-#include "qemu-common.h"
 
 int whpx_init_vcpu(CPUState *cpu);
 int whpx_vcpu_exec(CPUState *cpu);
diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h
index 53c3612c32..eed60e4fae 100644
--- a/include/ui/spice-display.h
+++ b/include/ui/spice-display.h
@@ -15,6 +15,9 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifndef UI_SPICE_DISPLAY_H
+#define UI_SPICE_DISPLAY_H
+
 #include <spice/ipc_ring.h>
 #include <spice/enums.h>
 #include <spice/qxl_dev.h>
@@ -183,3 +186,5 @@ int qemu_spice_display_is_running(SimpleSpiceDisplay *ssd);
 bool qemu_spice_fill_device_address(QemuConsole *con,
                                     char *device_address,
                                     size_t size);
+
+#endif