aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch_init.c2
-rw-r--r--cpus.c3
-rw-r--r--exec.c2
-rw-r--r--gdbstub.c2
-rw-r--r--hw/arm/nseries.c1
-rw-r--r--hw/arm/pxa2xx_gpio.c1
-rw-r--r--hw/core/nmi.c5
-rw-r--r--hw/display/cg3.c1
-rw-r--r--hw/i386/kvm/apic.c2
-rw-r--r--hw/i386/kvm/clock.c1
-rw-r--r--hw/i386/kvmvapic.c2
-rw-r--r--hw/intc/apic.c2
-rw-r--r--hw/intc/apic_common.c2
-rw-r--r--hw/intc/arm_gic_kvm.c2
-rw-r--r--hw/intc/armv7m_nvic.c1
-rw-r--r--hw/intc/openpic_kvm.c2
-rw-r--r--hw/intc/s390_flic_kvm.c2
-rw-r--r--hw/misc/mips_cpc.c1
-rw-r--r--hw/misc/mips_itu.c1
-rw-r--r--hw/ppc/ppc4xx_devs.c1
-rw-r--r--hw/ppc/prep.c1
-rw-r--r--hw/ppc/virtex_ml507.c1
-rw-r--r--hw/xtensa/pic_cpu.c1
-rw-r--r--include/disas/disas.h2
-rw-r--r--include/exec/gdbstub.h2
-rw-r--r--include/exec/hwaddr.h2
-rw-r--r--include/hw/arm/digic.h1
-rw-r--r--include/hw/arm/fsl-imx6.h1
-rw-r--r--include/hw/arm/virt-acpi-build.h1
-rw-r--r--include/hw/arm/virt.h1
-rw-r--r--include/hw/hw.h1
-rw-r--r--include/hw/sd/sd.h2
-rw-r--r--include/hw/xen/xen.h7
-rw-r--r--include/qemu-common.h5
-rw-r--r--include/sysemu/kvm.h1
-rw-r--r--ioport.c2
-rw-r--r--memory.c2
-rw-r--r--migration/ram.c2
-rw-r--r--migration/savevm.c1
-rw-r--r--monitor.c2
-rw-r--r--qtest.c2
-rw-r--r--scripts/tracetool/format/tcg_helper_c.py1
-rw-r--r--target-alpha/gdbstub.c1
-rw-r--r--target-alpha/machine.c2
-rw-r--r--target-arm/gdbstub.c1
-rw-r--r--target-arm/gdbstub64.c1
-rw-r--r--target-arm/kvm-stub.c1
-rw-r--r--target-arm/kvm32.c2
-rw-r--r--target-arm/kvm64.c2
-rw-r--r--target-arm/machine.c2
-rw-r--r--target-cris/gdbstub.c1
-rw-r--r--target-cris/machine.c2
-rw-r--r--target-i386/gdbstub.c1
-rw-r--r--target-i386/kvm-stub.c1
-rw-r--r--target-i386/kvm.c2
-rw-r--r--target-i386/machine.c2
-rw-r--r--target-lm32/gdbstub.c1
-rw-r--r--target-lm32/machine.c2
-rw-r--r--target-m68k/gdbstub.c1
-rw-r--r--target-microblaze/gdbstub.c1
-rw-r--r--target-mips/cpu.h18
-rw-r--r--target-mips/gdbstub.c1
-rw-r--r--target-mips/helper.c17
-rw-r--r--target-mips/kvm.c2
-rw-r--r--target-mips/machine.c2
-rw-r--r--target-moxie/machine.c2
-rw-r--r--target-openrisc/gdbstub.c1
-rw-r--r--target-openrisc/machine.c2
-rw-r--r--target-ppc/gdbstub.c1
-rw-r--r--target-ppc/kvm-stub.c1
-rw-r--r--target-ppc/kvm.c2
-rw-r--r--target-ppc/machine.c2
-rw-r--r--target-s390x/gdbstub.c1
-rw-r--r--target-s390x/kvm.c2
-rw-r--r--target-sh4/gdbstub.c1
-rw-r--r--target-sparc/gdbstub.c1
-rw-r--r--target-sparc/machine.c2
-rw-r--r--target-xtensa/gdbstub.c1
-rw-r--r--tcg/optimize.c3
-rw-r--r--tcg/tcg-op.c2
-rw-r--r--tcg/tcg.h1
-rw-r--r--xen-hvm.c1
82 files changed, 133 insertions, 36 deletions
diff --git a/arch_init.c b/arch_init.c
index e3bb1b3..07f047f 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -22,6 +22,8 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "sysemu/sysemu.h"
#include "sysemu/arch_init.h"
#include "hw/pci/pci.h"
diff --git a/cpus.c b/cpus.c
index cbeb1f6..7b6ebeb 100644
--- a/cpus.c
+++ b/cpus.c
@@ -24,7 +24,8 @@
/* Needed early for CONFIG_BSD etc. */
#include "qemu/osdep.h"
-
+#include "qemu-common.h"
+#include "cpu.h"
#include "monitor/monitor.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
diff --git a/exec.c b/exec.c
index ed10ba1..d26df55 100644
--- a/exec.c
+++ b/exec.c
@@ -28,10 +28,10 @@
#include "hw/qdev-core.h"
#if !defined(CONFIG_USER_ONLY)
#include "hw/boards.h"
+#include "hw/xen/xen.h"
#endif
#include "sysemu/kvm.h"
#include "sysemu/sysemu.h"
-#include "hw/xen/xen.h"
#include "qemu/timer.h"
#include "qemu/config-file.h"
#include "qemu/error-report.h"
diff --git a/gdbstub.c b/gdbstub.c
index 0e431fd..c19ce39 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -19,7 +19,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/cutils.h"
-
+#include "cpu.h"
#ifdef CONFIG_USER_ONLY
#include "qemu.h"
#else
diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c
index f3a9b1a..6131c34 100644
--- a/hw/arm/nseries.c
+++ b/hw/arm/nseries.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "cpu.h"
#include "qemu/cutils.h"
#include "qemu/bswap.h"
#include "sysemu/sysemu.h"
diff --git a/hw/arm/pxa2xx_gpio.c b/hw/arm/pxa2xx_gpio.c
index 67e7e70..8c9626e 100644
--- a/hw/arm/pxa2xx_gpio.c
+++ b/hw/arm/pxa2xx_gpio.c
@@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "hw/arm/pxa.h"
diff --git a/hw/core/nmi.c b/hw/core/nmi.c
index e8bcc41..f616a79 100644
--- a/hw/core/nmi.c
+++ b/hw/core/nmi.c
@@ -20,11 +20,16 @@
*/
#include "qemu/osdep.h"
+#include "qom/cpu.h"
#include "hw/nmi.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "monitor/monitor.h"
+#if defined(TARGET_I386)
+#include "cpu.h"
+#endif
+
struct do_nmi_s {
int cpu_index;
Error *err;
diff --git a/hw/display/cg3.c b/hw/display/cg3.c
index fc0d97f..eb0e71a 100644
--- a/hw/display/cg3.c
+++ b/hw/display/cg3.c
@@ -26,6 +26,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "qemu/error-report.h"
#include "ui/console.h"
#include "hw/sysbus.h"
diff --git a/hw/i386/kvm/apic.c b/hw/i386/kvm/apic.c
index 3c7c8fa..c5983c7 100644
--- a/hw/i386/kvm/apic.c
+++ b/hw/i386/kvm/apic.c
@@ -10,6 +10,8 @@
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/i386/apic_internal.h"
#include "hw/pci/msi.h"
#include "sysemu/kvm.h"
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index a3b300c..0f75dd3 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -15,6 +15,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "qemu/host-utils.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index f14445d..466c3c4 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -9,6 +9,8 @@
* top-level directory.
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "sysemu/sysemu.h"
#include "sysemu/cpus.h"
#include "sysemu/kvm.h"
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
index 28c2ea5..e1ab935 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
@@ -17,6 +17,8 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "qemu/thread.h"
#include "hw/i386/apic_internal.h"
#include "hw/i386/apic.h"
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index 4abe145..e6eb694 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -19,6 +19,8 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/i386/apic.h"
#include "hw/i386/apic_internal.h"
#include "trace.h"
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
index bc85ab7..5593cdb 100644
--- a/hw/intc/arm_gic_kvm.c
+++ b/hw/intc/arm_gic_kvm.c
@@ -21,6 +21,8 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/sysbus.h"
#include "migration/migration.h"
#include "sysemu/kvm.h"
diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index 669e82a..4d584ef 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -13,6 +13,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "hw/sysbus.h"
#include "qemu/timer.h"
#include "hw/arm/arm.h"
diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
index e47e94f..0518e01 100644
--- a/hw/intc/openpic_kvm.c
+++ b/hw/intc/openpic_kvm.c
@@ -24,6 +24,8 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include <sys/ioctl.h>
#include "exec/address-spaces.h"
#include "hw/hw.h"
diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
index 02449b3..eed6325 100644
--- a/hw/intc/s390_flic_kvm.c
+++ b/hw/intc/s390_flic_kvm.c
@@ -11,6 +11,8 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include <sys/ioctl.h>
#include "qemu/error-report.h"
#include "hw/sysbus.h"
diff --git a/hw/misc/mips_cpc.c b/hw/misc/mips_cpc.c
index d2b8e42..05688b7 100644
--- a/hw/misc/mips_cpc.c
+++ b/hw/misc/mips_cpc.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "cpu.h"
#include "hw/sysbus.h"
#include "hw/misc/mips_cpc.h"
diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c
index da54550..c1a4453 100644
--- a/hw/misc/mips_itu.c
+++ b/hw/misc/mips_itu.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "sysemu/sysemu.h"
diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c
index 7d59018..e7f413e 100644
--- a/hw/ppc/ppc4xx_devs.c
+++ b/hw/ppc/ppc4xx_devs.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/ppc/ppc.h"
#include "hw/ppc/ppc4xx.h"
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 3ffb85e..07ffe72 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/timer/m48t59.h"
#include "hw/i386/pc.h"
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
index b807a08..b97d966 100644
--- a/hw/ppc/virtex_ml507.c
+++ b/hw/ppc/virtex_ml507.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "cpu.h"
#include "hw/sysbus.h"
#include "hw/hw.h"
#include "hw/char/serial.h"
diff --git a/hw/xtensa/pic_cpu.c b/hw/xtensa/pic_cpu.c
index c835bd0..ccf65fd 100644
--- a/hw/xtensa/pic_cpu.c
+++ b/hw/xtensa/pic_cpu.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "qemu/log.h"
#include "qemu/timer.h"
diff --git a/include/disas/disas.h b/include/disas/disas.h
index 2b9293b..4930d78 100644
--- a/include/disas/disas.h
+++ b/include/disas/disas.h
@@ -4,6 +4,8 @@
#include "qemu-common.h"
#ifdef NEED_CPU_H
+#include "cpu.h"
+
/* Disassemble this for me please... (debugging). */
void disas(FILE *out, void *code, unsigned long size);
void target_disas(FILE *out, CPUState *cpu, target_ulong code,
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
index d9e8cf7..8e3f8d8 100644
--- a/include/exec/gdbstub.h
+++ b/include/exec/gdbstub.h
@@ -11,6 +11,8 @@
#define GDB_WATCHPOINT_ACCESS 4
#ifdef NEED_CPU_H
+#include "cpu.h"
+
typedef void (*gdb_syscall_complete_cb)(CPUState *cpu,
target_ulong ret, target_ulong err);
diff --git a/include/exec/hwaddr.h b/include/exec/hwaddr.h
index c9eb78f..bb41588 100644
--- a/include/exec/hwaddr.h
+++ b/include/exec/hwaddr.h
@@ -3,6 +3,8 @@
#ifndef HWADDR_H
#define HWADDR_H
+#include <inttypes.h>
+
#define HWADDR_BITS 64
/* hwaddr is the type of a physical address (its size can
be different from 'target_ulong'). */
diff --git a/include/hw/arm/digic.h b/include/hw/arm/digic.h
index aaefe0b..63785ba 100644
--- a/include/hw/arm/digic.h
+++ b/include/hw/arm/digic.h
@@ -18,6 +18,7 @@
#ifndef HW_ARM_DIGIC_H
#define HW_ARM_DIGIC_H
+#include "cpu.h"
#include "hw/timer/digic-timer.h"
#include "hw/char/digic-uart.h"
diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h
index d24aaee..e9157ea 100644
--- a/include/hw/arm/fsl-imx6.h
+++ b/include/hw/arm/fsl-imx6.h
@@ -29,6 +29,7 @@
#include "hw/sd/sdhci.h"
#include "hw/ssi/imx_spi.h"
#include "exec/memory.h"
+#include "cpu.h"
#define TYPE_FSL_IMX6 "fsl,imx6"
#define FSL_IMX6(obj) OBJECT_CHECK(FslIMX6State, (obj), TYPE_FSL_IMX6)
diff --git a/include/hw/arm/virt-acpi-build.h b/include/hw/arm/virt-acpi-build.h
index 7d3700e..e43330a 100644
--- a/include/hw/arm/virt-acpi-build.h
+++ b/include/hw/arm/virt-acpi-build.h
@@ -22,6 +22,7 @@
#include "qemu-common.h"
#include "hw/arm/virt.h"
+#include "qemu/notify.h"
#define ACPI_GICC_ENABLED 1
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
index ecd8589..82703d2 100644
--- a/include/hw/arm/virt.h
+++ b/include/hw/arm/virt.h
@@ -31,6 +31,7 @@
#define QEMU_ARM_VIRT_H
#include "qemu-common.h"
+#include "exec/hwaddr.h"
#define NUM_GICV2M_SPIS 64
#define NUM_VIRTIO_TRANSPORTS 32
diff --git a/include/hw/hw.h b/include/hw/hw.h
index 29931d1..a20321b 100644
--- a/include/hw/hw.h
+++ b/include/hw/hw.h
@@ -2,7 +2,6 @@
#ifndef QEMU_HW_H
#define QEMU_HW_H
-
#ifdef CONFIG_USER_ONLY
#error Cannot include hw/hw.h from user emulation
#endif
diff --git a/include/hw/sd/sd.h b/include/hw/sd/sd.h
index d5d273a..c8a4b98 100644
--- a/include/hw/sd/sd.h
+++ b/include/hw/sd/sd.h
@@ -29,6 +29,8 @@
#ifndef __hw_sd_h
#define __hw_sd_h 1
+#include "hw/qdev.h"
+
#define OUT_OF_RANGE (1 << 31)
#define ADDRESS_ERROR (1 << 30)
#define BLOCK_LEN_ERROR (1 << 29)
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index 6eb815a..6365483 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -7,8 +7,10 @@
* /usr/include/xen, so it can be included unconditionally.
*/
-#include "hw/irq.h"
#include "qemu-common.h"
+#include "qemu/typedefs.h"
+#include "exec/cpu-common.h"
+#include "hw/irq.h"
/* xen-machine.c */
enum xen_mode {
@@ -37,12 +39,11 @@ qemu_irq *xen_interrupt_controller_init(void);
void xenstore_store_pv_console_info(int i, struct CharDriverState *chr);
-#if defined(NEED_CPU_H) && !defined(CONFIG_USER_ONLY)
void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory);
+
void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size,
struct MemoryRegion *mr, Error **errp);
void xen_modified_memory(ram_addr_t start, ram_addr_t length);
-#endif
void xen_register_framebuffer(struct MemoryRegion *mr);
diff --git a/include/qemu-common.h b/include/qemu-common.h
index cd3139b..835cbc6 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -22,11 +22,6 @@
#include "qemu/option.h"
-/* FIXME: Remove NEED_CPU_H. */
-#ifdef NEED_CPU_H
-#include "cpu.h"
-#endif /* !defined(NEED_CPU_H) */
-
/* main function, renamed */
#if defined(CONFIG_COCOA)
int qemu_main(int argc, char **argv, char **envp);
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 0e18f15..f9f00e2 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -218,6 +218,7 @@ int kvm_init_vcpu(CPUState *cpu);
int kvm_cpu_exec(CPUState *cpu);
#ifdef NEED_CPU_H
+#include "cpu.h"
void kvm_setup_guest_memory(void *start, size_t size);
void kvm_flush_coalesced_mmio_buffer(void);
diff --git a/ioport.c b/ioport.c
index 7a84d54..901a997 100644
--- a/ioport.c
+++ b/ioport.c
@@ -26,6 +26,8 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "exec/ioport.h"
#include "trace.h"
#include "exec/memory.h"
diff --git a/memory.c b/memory.c
index f76f85d..a8ef852 100644
--- a/memory.c
+++ b/memory.c
@@ -15,6 +15,8 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "exec/memory.h"
#include "exec/address-spaces.h"
#include "exec/ioport.h"
diff --git a/migration/ram.c b/migration/ram.c
index 88fbffc..5e88080 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -26,6 +26,8 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include <zlib.h>
#include "qapi-event.h"
#include "qemu/cutils.h"
diff --git a/migration/savevm.c b/migration/savevm.c
index 16ba443..bfb3d91 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -27,6 +27,7 @@
*/
#include "qemu/osdep.h"
+#include "cpu.h"
#include "hw/boards.h"
#include "hw/hw.h"
#include "hw/qdev.h"
diff --git a/monitor.c b/monitor.c
index d1c1930..812383f 100644
--- a/monitor.c
+++ b/monitor.c
@@ -23,6 +23,8 @@
*/
#include "qemu/osdep.h"
#include <dirent.h>
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "monitor/qdev.h"
#include "hw/usb.h"
diff --git a/qtest.c b/qtest.c
index 87575bc..da4826c 100644
--- a/qtest.c
+++ b/qtest.c
@@ -13,6 +13,8 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "sysemu/qtest.h"
#include "hw/qdev.h"
#include "sysemu/char.h"
diff --git a/scripts/tracetool/format/tcg_helper_c.py b/scripts/tracetool/format/tcg_helper_c.py
index a089b0b..e3485b7 100644
--- a/scripts/tracetool/format/tcg_helper_c.py
+++ b/scripts/tracetool/format/tcg_helper_c.py
@@ -48,6 +48,7 @@ def generate(events, backend):
'',
'#include "qemu/osdep.h"',
'#include "qemu-common.h"',
+ '#include "cpu.h"',
'#include "trace.h"',
'#include "exec/helper-proto.h"',
'',
diff --git a/target-alpha/gdbstub.c b/target-alpha/gdbstub.c
index 199f028..d64bccc 100644
--- a/target-alpha/gdbstub.c
+++ b/target-alpha/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
int alpha_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
diff --git a/target-alpha/machine.c b/target-alpha/machine.c
index 3f72943..710b783 100644
--- a/target-alpha/machine.c
+++ b/target-alpha/machine.c
@@ -1,4 +1,6 @@
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "migration/cpu.h"
diff --git a/target-arm/gdbstub.c b/target-arm/gdbstub.c
index 3ba9aad..04c1208 100644
--- a/target-arm/gdbstub.c
+++ b/target-arm/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
/* Old gdb always expect FPA registers. Newer (xml-aware) gdb only expect
diff --git a/target-arm/gdbstub64.c b/target-arm/gdbstub64.c
index 634c6bc..49bc3fc 100644
--- a/target-arm/gdbstub64.c
+++ b/target-arm/gdbstub64.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
int aarch64_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
diff --git a/target-arm/kvm-stub.c b/target-arm/kvm-stub.c
index 38bf433..b2c66df 100644
--- a/target-arm/kvm-stub.c
+++ b/target-arm/kvm-stub.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "kvm_arm.h"
bool write_kvmstate_to_list(ARMCPU *cpu)
diff --git a/target-arm/kvm32.c b/target-arm/kvm32.c
index d44a7f9..7f5935a 100644
--- a/target-arm/kvm32.c
+++ b/target-arm/kvm32.c
@@ -15,11 +15,11 @@
#include <linux/kvm.h>
#include "qemu-common.h"
+#include "cpu.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
#include "kvm_arm.h"
-#include "cpu.h"
#include "internals.h"
#include "hw/arm/arm.h"
diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c
index e8527bf..e2a34f6 100644
--- a/target-arm/kvm64.c
+++ b/target-arm/kvm64.c
@@ -18,6 +18,7 @@
#include <linux/kvm.h>
#include "qemu-common.h"
+#include "cpu.h"
#include "qemu/timer.h"
#include "qemu/error-report.h"
#include "qemu/host-utils.h"
@@ -25,7 +26,6 @@
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
#include "kvm_arm.h"
-#include "cpu.h"
#include "internals.h"
#include "hw/arm/arm.h"
diff --git a/target-arm/machine.c b/target-arm/machine.c
index c23feb1..2f45260 100644
--- a/target-arm/machine.c
+++ b/target-arm/machine.c
@@ -1,4 +1,6 @@
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "qemu/error-report.h"
diff --git a/target-cris/gdbstub.c b/target-cris/gdbstub.c
index 1bbf17b..3a72ee2 100644
--- a/target-cris/gdbstub.c
+++ b/target-cris/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
int crisv10_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
diff --git a/target-cris/machine.c b/target-cris/machine.c
index 4c9287f..6b797e8 100644
--- a/target-cris/machine.c
+++ b/target-cris/machine.c
@@ -19,6 +19,8 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "migration/cpu.h"
diff --git a/target-i386/gdbstub.c b/target-i386/gdbstub.c
index 4b50713..c494535 100644
--- a/target-i386/gdbstub.c
+++ b/target-i386/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
#ifdef TARGET_X86_64
diff --git a/target-i386/kvm-stub.c b/target-i386/kvm-stub.c
index 8df9c59..cdf1506 100644
--- a/target-i386/kvm-stub.c
+++ b/target-i386/kvm-stub.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "kvm_i386.h"
bool kvm_allows_irq0_override(void)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 799fdfa..c76e7bb 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -22,10 +22,10 @@
#include <linux/kvm_para.h>
#include "qemu-common.h"
+#include "cpu.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm_int.h"
#include "kvm_i386.h"
-#include "cpu.h"
#include "hyperv.h"
#include "exec/gdbstub.h"
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 57203b2..658b066 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -1,4 +1,6 @@
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "hw/i386/pc.h"
diff --git a/target-lm32/gdbstub.c b/target-lm32/gdbstub.c
index 8ac1288..cf929dd 100644
--- a/target-lm32/gdbstub.c
+++ b/target-lm32/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
#include "hw/lm32/lm32_pic.h"
diff --git a/target-lm32/machine.c b/target-lm32/machine.c
index 6f56216..3c258a4 100644
--- a/target-lm32/machine.c
+++ b/target-lm32/machine.c
@@ -1,4 +1,6 @@
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "migration/cpu.h"
diff --git a/target-m68k/gdbstub.c b/target-m68k/gdbstub.c
index f02bb5c..c7f44c9 100644
--- a/target-m68k/gdbstub.c
+++ b/target-m68k/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
int m68k_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
diff --git a/target-microblaze/gdbstub.c b/target-microblaze/gdbstub.c
index 89d3898..7fb076c 100644
--- a/target-microblaze/gdbstub.c
+++ b/target-microblaze/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
int mb_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index c65f84e..a7c8660 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -1145,22 +1145,8 @@ static inline void cpu_mips_store_cause(CPUMIPSState *env, target_ulong val)
}
#endif
-static inline void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env,
- uint32_t exception,
- int error_code,
- uintptr_t pc)
-{
- CPUState *cs = CPU(mips_env_get_cpu(env));
-
- if (exception < EXCP_SC) {
- qemu_log_mask(CPU_LOG_INT, "%s: %d %d\n",
- __func__, exception, error_code);
- }
- cs->exception_index = exception;
- env->error_code = error_code;
-
- cpu_loop_exit_restore(cs, pc);
-}
+void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env, uint32_t exception,
+ int error_code, uintptr_t pc);
static inline void QEMU_NORETURN do_raise_exception(CPUMIPSState *env,
uint32_t exception,
diff --git a/target-mips/gdbstub.c b/target-mips/gdbstub.c
index b0b4a32..2707ff5 100644
--- a/target-mips/gdbstub.c
+++ b/target-mips/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
int mips_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
diff --git a/target-mips/helper.c b/target-mips/helper.c
index cfea177..1f35e7f 100644
--- a/target-mips/helper.c
+++ b/target-mips/helper.c
@@ -840,3 +840,20 @@ void r4k_invalidate_tlb (CPUMIPSState *env, int idx, int use_extra)
}
}
#endif
+
+void QEMU_NORETURN do_raise_exception_err(CPUMIPSState *env,
+ uint32_t exception,
+ int error_code,
+ uintptr_t pc)
+{
+ CPUState *cs = CPU(mips_env_get_cpu(env));
+
+ if (exception < EXCP_SC) {
+ qemu_log_mask(CPU_LOG_INT, "%s: %d %d\n",
+ __func__, exception, error_code);
+ }
+ cs->exception_index = exception;
+ env->error_code = error_code;
+
+ cpu_loop_exit_restore(cs, pc);
+}
diff --git a/target-mips/kvm.c b/target-mips/kvm.c
index 950bc05..a854e4d 100644
--- a/target-mips/kvm.c
+++ b/target-mips/kvm.c
@@ -16,11 +16,11 @@
#include <linux/kvm.h>
#include "qemu-common.h"
+#include "cpu.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
-#include "cpu.h"
#include "sysemu/cpus.h"
#include "kvm_mips.h"
#include "exec/memattrs.h"
diff --git a/target-mips/machine.c b/target-mips/machine.c
index eb3d916..7314cfe 100644
--- a/target-mips/machine.c
+++ b/target-mips/machine.c
@@ -1,4 +1,6 @@
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "cpu.h"
#include "migration/cpu.h"
diff --git a/target-moxie/machine.c b/target-moxie/machine.c
index 7810e1c..282dcd8 100644
--- a/target-moxie/machine.c
+++ b/target-moxie/machine.c
@@ -1,4 +1,6 @@
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "machine.h"
diff --git a/target-openrisc/gdbstub.c b/target-openrisc/gdbstub.c
index edc301a..cb16e76 100644
--- a/target-openrisc/gdbstub.c
+++ b/target-openrisc/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
int openrisc_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
diff --git a/target-openrisc/machine.c b/target-openrisc/machine.c
index bd5d50f..17b0c77 100644
--- a/target-openrisc/machine.c
+++ b/target-openrisc/machine.c
@@ -18,6 +18,8 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "migration/cpu.h"
diff --git a/target-ppc/gdbstub.c b/target-ppc/gdbstub.c
index 569c380..7a33813 100644
--- a/target-ppc/gdbstub.c
+++ b/target-ppc/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
static int ppc_gdb_register_len_apple(int n)
diff --git a/target-ppc/kvm-stub.c b/target-ppc/kvm-stub.c
index 627bcb4..efeafca 100644
--- a/target-ppc/kvm-stub.c
+++ b/target-ppc/kvm-stub.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "hw/ppc/openpic.h"
int kvm_openpic_connect_vcpu(DeviceState *d, CPUState *cs)
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index c4c81467..24d6032 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -24,11 +24,11 @@
#include "qemu-common.h"
#include "qemu/error-report.h"
+#include "cpu.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
#include "kvm_ppc.h"
-#include "cpu.h"
#include "sysemu/cpus.h"
#include "sysemu/device_tree.h"
#include "mmu-hash64.h"
diff --git a/target-ppc/machine.c b/target-ppc/machine.c
index c0b9182..4911cb7 100644
--- a/target-ppc/machine.c
+++ b/target-ppc/machine.c
@@ -1,4 +1,6 @@
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "sysemu/kvm.h"
diff --git a/target-s390x/gdbstub.c b/target-s390x/gdbstub.c
index 9fc36cb..0992ae7 100644
--- a/target-s390x/gdbstub.c
+++ b/target-s390x/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
#include "qemu/bitops.h"
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 55ae6d3..8f46fd0 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -29,12 +29,12 @@
#include <asm/ptrace.h>
#include "qemu-common.h"
+#include "cpu.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
#include "hw/hw.h"
-#include "cpu.h"
#include "sysemu/device_tree.h"
#include "qapi/qmp/qjson.h"
#include "exec/gdbstub.h"
diff --git a/target-sh4/gdbstub.c b/target-sh4/gdbstub.c
index 1b59ea8..13bea00 100644
--- a/target-sh4/gdbstub.c
+++ b/target-sh4/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
/* Hint: Use "set architecture sh4" in GDB to see fpu registers */
diff --git a/target-sparc/gdbstub.c b/target-sparc/gdbstub.c
index e530dc5..ffc2baa 100644
--- a/target-sparc/gdbstub.c
+++ b/target-sparc/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
#ifdef TARGET_ABI32
diff --git a/target-sparc/machine.c b/target-sparc/machine.c
index 04806f6..c8823af 100644
--- a/target-sparc/machine.c
+++ b/target-sparc/machine.c
@@ -1,4 +1,6 @@
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "qemu/timer.h"
diff --git a/target-xtensa/gdbstub.c b/target-xtensa/gdbstub.c
index 51d4db0..bfcd591 100644
--- a/target-xtensa/gdbstub.c
+++ b/target-xtensa/gdbstub.c
@@ -19,6 +19,7 @@
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
+#include "cpu.h"
#include "exec/gdbstub.h"
int xtensa_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
diff --git a/tcg/optimize.c b/tcg/optimize.c
index f011608..def4ba6 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -24,9 +24,8 @@
*/
#include "qemu/osdep.h"
-
-
#include "qemu-common.h"
+#include "cpu.h"
#include "tcg-op.h"
#define CASE_OP_32_64(x) \
diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index f554b86..7a15914 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -23,6 +23,8 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "tcg.h"
#include "tcg-op.h"
diff --git a/tcg/tcg.h b/tcg/tcg.h
index a013d77..8abf318 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -26,6 +26,7 @@
#define TCG_H
#include "qemu-common.h"
+#include "cpu.h"
#include "qemu/bitops.h"
#include "tcg-target.h"
diff --git a/xen-hvm.c b/xen-hvm.c
index 039680a..4236f78 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -11,6 +11,7 @@
#include "qemu/osdep.h"
#include <sys/mman.h>
+#include "cpu.h"
#include "hw/pci/pci.h"
#include "hw/i386/pc.h"
#include "hw/i386/apic-msidef.h"