summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorPeter Maydell2019-06-12 14:50:01 +0200
committerPeter Maydell2019-06-12 14:50:02 +0200
commit59c58f96b270f5edd4ad10954c3a96556cb3a728 (patch)
tree005ac413277b8b88a2a580eab2d10d45f25d2fc8 /target
parentMerge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request'... (diff)
parentMAINTAINERS: Polish headline decorations (diff)
downloadqemu-59c58f96b270f5edd4ad10954c3a96556cb3a728.tar.gz
qemu-59c58f96b270f5edd4ad10954c3a96556cb3a728.tar.xz
qemu-59c58f96b270f5edd4ad10954c3a96556cb3a728.zip
Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2019-06-11-v3' into staging
Miscellaneous patches for 2019-06-11 # gpg: Signature made Wed 12 Jun 2019 12:20:41 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-misc-2019-06-11-v3: MAINTAINERS: Polish headline decorations MAINTAINERS: Improve section headlines MAINTAINERS: Remove duplicate entries of qemu-devel@nongnu.org Clean up a header guard symbols (again) Supply missing header guards Clean up a few header guard symbols scripts/clean-header-guards: Fix handling of trailing comments Normalize position of header guard Include qemu-common.h exactly where needed Include qemu/module.h where needed, drop it from qemu-common.h qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h qemu-common: Move tcg_enabled() etc. to sysemu/tcg.h Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r--target/alpha/cpu.c1
-rw-r--r--target/alpha/cpu.h1
-rw-r--r--target/alpha/gdbstub.c1
-rw-r--r--target/alpha/machine.c1
-rw-r--r--target/arm/arm-semi.c1
-rw-r--r--target/arm/cpu.c4
-rw-r--r--target/arm/cpu.h1
-rw-r--r--target/arm/cpu64.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/machine.c1
-rw-r--r--target/cris/cpu.c1
-rw-r--r--target/cris/cpu.h1
-rw-r--r--target/cris/crisv10-decode.h4
-rw-r--r--target/cris/gdbstub.c1
-rw-r--r--target/cris/machine.c1
-rw-r--r--target/cris/mmu.h5
-rw-r--r--target/cris/opcode-cris.h6
-rw-r--r--target/hppa/cpu.c2
-rw-r--r--target/hppa/cpu.h1
-rw-r--r--target/hppa/gdbstub.c1
-rw-r--r--target/hppa/machine.c1
-rw-r--r--target/i386/cpu.c2
-rw-r--r--target/i386/cpu.h2
-rw-r--r--target/i386/gdbstub.c1
-rw-r--r--target/i386/helper.c1
-rw-r--r--target/i386/kvm-stub.c1
-rw-r--r--target/i386/kvm.c1
-rw-r--r--target/i386/machine.c2
-rw-r--r--target/i386/sev-stub.c1
-rw-r--r--target/i386/sev.c1
-rw-r--r--target/i386/whp-dispatch.h7
-rw-r--r--target/i386/xsave_helper.c1
-rw-r--r--target/lm32/cpu.c1
-rw-r--r--target/lm32/cpu.h1
-rw-r--r--target/lm32/gdbstub.c1
-rw-r--r--target/lm32/machine.c1
-rw-r--r--target/m68k/cpu.c1
-rw-r--r--target/m68k/cpu.h1
-rw-r--r--target/m68k/gdbstub.c1
-rw-r--r--target/m68k/m68k-semi.c1
-rw-r--r--target/microblaze/cpu.c2
-rw-r--r--target/microblaze/cpu.h1
-rw-r--r--target/microblaze/gdbstub.c1
-rw-r--r--target/microblaze/microblaze-decode.h4
-rw-r--r--target/microblaze/mmu.h5
-rw-r--r--target/mips/cpu.c2
-rw-r--r--target/mips/cpu.h1
-rw-r--r--target/mips/gdbstub.c1
-rw-r--r--target/mips/machine.c1
-rw-r--r--target/moxie/cpu.c1
-rw-r--r--target/moxie/cpu.h1
-rw-r--r--target/moxie/machine.c1
-rw-r--r--target/moxie/mmu.h5
-rw-r--r--target/nios2/cpu.c2
-rw-r--r--target/nios2/cpu.h1
-rw-r--r--target/nios2/mmu.c1
-rw-r--r--target/openrisc/cpu.c1
-rw-r--r--target/openrisc/cpu.h1
-rw-r--r--target/openrisc/disas.c1
-rw-r--r--target/openrisc/exception.h1
-rw-r--r--target/openrisc/gdbstub.c1
-rw-r--r--target/openrisc/interrupt.c1
-rw-r--r--target/openrisc/machine.c1
-rw-r--r--target/openrisc/mmu.c1
-rw-r--r--target/openrisc/translate.c1
-rw-r--r--target/ppc/cpu-models.c1
-rw-r--r--target/ppc/cpu.h1
-rw-r--r--target/ppc/gdbstub.c1
-rw-r--r--target/ppc/kvm-stub.c1
-rw-r--r--target/ppc/machine.c1
-rw-r--r--target/ppc/monitor.c2
-rw-r--r--target/ppc/translate_init.inc.c2
-rw-r--r--target/riscv/cpu.c1
-rw-r--r--target/riscv/cpu.h1
-rw-r--r--target/riscv/cpu_bits.h5
-rw-r--r--target/riscv/cpu_user.h5
-rw-r--r--target/riscv/gdbstub.c1
-rw-r--r--target/riscv/instmap.h5
-rw-r--r--target/riscv/pmp.c1
-rw-r--r--target/s390x/cpu.c3
-rw-r--r--target/s390x/cpu.h1
-rw-r--r--target/s390x/cpu_models.c2
-rw-r--r--target/s390x/gdbstub.c3
-rw-r--r--target/s390x/helper.c1
-rw-r--r--target/s390x/interrupt.c1
-rw-r--r--target/s390x/kvm-stub.c1
-rw-r--r--target/s390x/machine.c1
-rw-r--r--target/s390x/mmu_helper.c1
-rw-r--r--target/s390x/sigp.c2
-rw-r--r--target/s390x/vec_helper.c1
-rw-r--r--target/sh4/cpu.c1
-rw-r--r--target/sh4/cpu.h1
-rw-r--r--target/sh4/gdbstub.c1
-rw-r--r--target/sparc/cpu.c1
-rw-r--r--target/sparc/cpu.h1
-rw-r--r--target/sparc/gdbstub.c1
-rw-r--r--target/sparc/machine.c1
-rw-r--r--target/tilegx/cpu.c2
-rw-r--r--target/tilegx/cpu.h1
-rw-r--r--target/tilegx/helper.c1
-rw-r--r--target/tilegx/simd_helper.c1
-rw-r--r--target/tilegx/spr_def_64.h10
-rw-r--r--target/tricore/cpu.c1
-rw-r--r--target/tricore/cpu.h1
-rw-r--r--target/tricore/tricore-opcodes.h5
-rw-r--r--target/unicore32/cpu.c1
-rw-r--r--target/unicore32/cpu.h1
-rw-r--r--target/xtensa/core-dc233c.c1
-rw-r--r--target/xtensa/core-de212.c1
-rw-r--r--target/xtensa/core-fsf.c1
-rw-r--r--target/xtensa/core-sample_controller.c1
-rw-r--r--target/xtensa/core-test_kc705_be.c1
-rw-r--r--target/xtensa/cpu.c2
-rw-r--r--target/xtensa/cpu.h1
-rw-r--r--target/xtensa/gdbstub.c1
117 files changed, 86 insertions, 106 deletions
diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c
index 952582567f..b3fd6643e8 100644
--- a/target/alpha/cpu.c
+++ b/target/alpha/cpu.c
@@ -23,7 +23,6 @@
#include "qapi/error.h"
#include "qemu/qemu-print.h"
#include "cpu.h"
-#include "qemu-common.h"
#include "exec/exec-all.h"
diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h
index 5d6fb222b5..b3e8a823e1 100644
--- a/target/alpha/cpu.h
+++ b/target/alpha/cpu.h
@@ -20,7 +20,6 @@
#ifndef ALPHA_CPU_H
#define ALPHA_CPU_H
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
diff --git a/target/alpha/gdbstub.c b/target/alpha/gdbstub.c
index d64bcccfa0..7f9cc092a9 100644
--- a/target/alpha/gdbstub.c
+++ b/target/alpha/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
diff --git a/target/alpha/machine.c b/target/alpha/machine.c
index abc81cef7b..fdab596438 100644
--- a/target/alpha/machine.c
+++ b/target/alpha/machine.c
@@ -1,5 +1,4 @@
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
diff --git a/target/arm/arm-semi.c b/target/arm/arm-semi.c
index 07af8d35da..bca9a25910 100644
--- a/target/arm/arm-semi.c
+++ b/target/arm/arm-semi.c
@@ -34,7 +34,6 @@
#define ARM_ANGEL_HEAP_SIZE (128 * 1024 * 1024)
#else
-#include "qemu-common.h"
#include "exec/gdbstub.h"
#include "qemu/cutils.h"
#endif
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index f70e07fd11..4d5d46db7f 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -19,18 +19,20 @@
*/
#include "qemu/osdep.h"
+#include "qemu-common.h"
#include "target/arm/idau.h"
+#include "qemu/module.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "cpu.h"
#include "internals.h"
-#include "qemu-common.h"
#include "exec/exec-all.h"
#include "hw/qdev-properties.h"
#if !defined(CONFIG_USER_ONLY)
#include "hw/loader.h"
#endif
#include "sysemu/sysemu.h"
+#include "sysemu/tcg.h"
#include "sysemu/hw_accel.h"
#include "kvm_arm.h"
#include "disas/capstone.h"
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 8fa9772c9d..06ddc49eb6 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -22,7 +22,6 @@
#include "kvm-consts.h"
#include "hw/registerfields.h"
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index b8bd1e88a5..1901997a06 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -21,7 +21,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "cpu.h"
-#include "qemu-common.h"
+#include "qemu/module.h"
#if !defined(CONFIG_USER_ONLY)
#include "hw/loader.h"
#endif
diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
index 0c64c0292e..1239abd984 100644
--- a/target/arm/gdbstub.c
+++ b/target/arm/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index 49bc3fc521..665ebb3ef6 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -17,7 +17,6 @@
* 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 "exec/gdbstub.h"
diff --git a/target/arm/kvm-stub.c b/target/arm/kvm-stub.c
index b2c66df532..56a7099e6b 100644
--- a/target/arm/kvm-stub.c
+++ b/target/arm/kvm-stub.c
@@ -10,7 +10,6 @@
*
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "kvm_arm.h"
diff --git a/target/arm/machine.c b/target/arm/machine.c
index 96d032f2a7..3fd319a309 100644
--- a/target/arm/machine.c
+++ b/target/arm/machine.c
@@ -1,5 +1,4 @@
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
diff --git a/target/cris/cpu.c b/target/cris/cpu.c
index 1dce6d10c3..7adfd6caf4 100644
--- a/target/cris/cpu.c
+++ b/target/cris/cpu.c
@@ -25,7 +25,6 @@
#include "qapi/error.h"
#include "qemu/qemu-print.h"
#include "cpu.h"
-#include "qemu-common.h"
#include "mmu.h"
diff --git a/target/cris/cpu.h b/target/cris/cpu.h
index 9d2a80d995..fb14ad51f1 100644
--- a/target/cris/cpu.h
+++ b/target/cris/cpu.h
@@ -21,7 +21,6 @@
#ifndef CRIS_CPU_H
#define CRIS_CPU_H
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
diff --git a/target/cris/crisv10-decode.h b/target/cris/crisv10-decode.h
index bdb4b6d318..028179bd0f 100644
--- a/target/cris/crisv10-decode.h
+++ b/target/cris/crisv10-decode.h
@@ -18,6 +18,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef TARGET_CRIS_CRISV10_DECODE_H
+#define TARGET_CRIS_CRISV10_DECODE_H
+
#define CRISV10_MODE_QIMMEDIATE 0
#define CRISV10_MODE_REG 1
#define CRISV10_MODE_INDIRECT 2
@@ -106,3 +109,4 @@
#define CRISV10_IND_MOVEM_M_R 14
#define CRISV10_IND_MOVEM_R_M 15
+#endif
diff --git a/target/cris/gdbstub.c b/target/cris/gdbstub.c
index 3a72ee2a98..a3d76d2e8c 100644
--- a/target/cris/gdbstub.c
+++ b/target/cris/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
diff --git a/target/cris/machine.c b/target/cris/machine.c
index 6b797e8c1d..ecec41c2c8 100644
--- a/target/cris/machine.c
+++ b/target/cris/machine.c
@@ -19,7 +19,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "hw/hw.h"
#include "migration/cpu.h"
diff --git a/target/cris/mmu.h b/target/cris/mmu.h
index 0217f476de..9ab1642b96 100644
--- a/target/cris/mmu.h
+++ b/target/cris/mmu.h
@@ -1,3 +1,6 @@
+#ifndef TARGET_CRIS_MMU_H
+#define TARGET_CRIS_MMU_H
+
#define CRIS_MMU_ERR_EXEC 0
#define CRIS_MMU_ERR_READ 1
#define CRIS_MMU_ERR_WRITE 2
@@ -15,3 +18,5 @@ void cris_mmu_flush_pid(CPUCRISState *env, uint32_t pid);
int cris_mmu_translate(struct cris_mmu_result *res,
CPUCRISState *env, uint32_t vaddr,
int rw, int mmu_idx, int debug);
+
+#endif
diff --git a/target/cris/opcode-cris.h b/target/cris/opcode-cris.h
index e7ebb98cd0..40509c88db 100644
--- a/target/cris/opcode-cris.h
+++ b/target/cris/opcode-cris.h
@@ -19,8 +19,8 @@ GNU General Public License for more details.
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 __CRIS_H_INCLUDED_
-#define __CRIS_H_INCLUDED_
+#ifndef TARGET_CRIS_OPCODE_CRIS_H
+#define TARGET_CRIS_OPCODE_CRIS_H
#if !defined(__STDC__) && !defined(const)
#define const
@@ -345,7 +345,7 @@ extern const struct cris_opcode cris_opcodes[];
sign-extended before adding to "target". */
#define CRIS_DIS_FLAG_MEM_TARGET2_MEM_WORD (1 << 7)
-#endif /* __CRIS_H_INCLUDED_ */
+#endif /* TARGET_CRIS_OPCODE_CRIS_H */
/*
* Local variables:
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index ae494abad1..368cb71e6d 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -22,7 +22,7 @@
#include "qapi/error.h"
#include "qemu/qemu-print.h"
#include "cpu.h"
-#include "qemu-common.h"
+#include "qemu/module.h"
#include "exec/exec-all.h"
#include "fpu/softfloat.h"
diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h
index c7db2eca9a..2e1f2ac67c 100644
--- a/target/hppa/cpu.h
+++ b/target/hppa/cpu.h
@@ -20,7 +20,6 @@
#ifndef HPPA_CPU_H
#define HPPA_CPU_H
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
diff --git a/target/hppa/gdbstub.c b/target/hppa/gdbstub.c
index 983bf92aaf..341888a9da 100644
--- a/target/hppa/gdbstub.c
+++ b/target/hppa/gdbstub.c
@@ -18,7 +18,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "exec/gdbstub.h"
diff --git a/target/hppa/machine.c b/target/hppa/machine.c
index a1bee9796f..73e8121bde 100644
--- a/target/hppa/machine.c
+++ b/target/hppa/machine.c
@@ -18,7 +18,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 7e5b545005..fbed2eb804 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -32,6 +32,7 @@
#include "sev_i386.h"
#include "qemu/error-report.h"
+#include "qemu/module.h"
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "qapi/error.h"
@@ -47,6 +48,7 @@
#include "standard-headers/asm-x86/kvm_para.h"
#include "sysemu/sysemu.h"
+#include "sysemu/tcg.h"
#include "hw/qdev-properties.h"
#include "hw/i386/topology.h"
#ifndef CONFIG_USER_ONLY
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index edad6e1efb..0732e059ec 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -20,7 +20,7 @@
#ifndef I386_CPU_H
#define I386_CPU_H
-#include "qemu-common.h"
+#include "sysemu/tcg.h"
#include "cpu-qom.h"
#include "hyperv-proto.h"
#include "exec/cpu-defs.h"
diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c
index 1221433bc7..aef25b70f1 100644
--- a/target/i386/gdbstub.c
+++ b/target/i386/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
diff --git a/target/i386/helper.c b/target/i386/helper.c
index ff3a60c7cf..23024926ac 100644
--- a/target/i386/helper.c
+++ b/target/i386/helper.c
@@ -25,6 +25,7 @@
#include "kvm_i386.h"
#ifndef CONFIG_USER_ONLY
#include "sysemu/sysemu.h"
+#include "sysemu/tcg.h"
#include "sysemu/hw_accel.h"
#include "monitor/monitor.h"
#include "hw/i386/apic_internal.h"
diff --git a/target/i386/kvm-stub.c b/target/i386/kvm-stub.c
index e7a673e5db..872ef7df4c 100644
--- a/target/i386/kvm-stub.c
+++ b/target/i386/kvm-stub.c
@@ -10,7 +10,6 @@
*
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "kvm_i386.h"
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 3b29ce5c0d..6899061b4e 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -20,7 +20,6 @@
#include <linux/kvm.h>
#include "standard-headers/asm-x86/kvm_para.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "sysemu/sysemu.h"
#include "sysemu/hw_accel.h"
diff --git a/target/i386/machine.c b/target/i386/machine.c
index 2c96cfc9a2..4aff1a763f 100644
--- a/target/i386/machine.c
+++ b/target/i386/machine.c
@@ -1,5 +1,4 @@
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "hw/hw.h"
@@ -10,6 +9,7 @@
#include "hyperv.h"
#include "sysemu/kvm.h"
+#include "sysemu/tcg.h"
#include "qemu/error-report.h"
diff --git a/target/i386/sev-stub.c b/target/i386/sev-stub.c
index 59a003a4eb..e5ee13309c 100644
--- a/target/i386/sev-stub.c
+++ b/target/i386/sev-stub.c
@@ -12,7 +12,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "sev_i386.h"
SevInfo *sev_get_info(void)
diff --git a/target/i386/sev.c b/target/i386/sev.c
index cd77f6b5d4..6dbdc3cdf1 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -21,6 +21,7 @@
#include "qapi/error.h"
#include "qom/object_interfaces.h"
#include "qemu/base64.h"
+#include "qemu/module.h"
#include "sysemu/kvm.h"
#include "sev_i386.h"
#include "sysemu/sysemu.h"
diff --git a/target/i386/whp-dispatch.h b/target/i386/whp-dispatch.h
index a23fb33a29..23791fbb47 100644
--- a/target/i386/whp-dispatch.h
+++ b/target/i386/whp-dispatch.h
@@ -1,12 +1,11 @@
+#ifndef WHP_DISPATCH_H
+#define WHP_DISPATCH_H
+
#include <windows.h>
#include <WinHvPlatform.h>
#include <WinHvEmulation.h>
-#ifndef WHP_DISPATCH_H
-#define WHP_DISPATCH_H
-
-
#define LIST_WINHVPLATFORM_FUNCTIONS(X) \
X(HRESULT, WHvGetCapability, (WHV_CAPABILITY_CODE CapabilityCode, VOID* CapabilityBuffer, UINT32 CapabilityBufferSizeInBytes, UINT32* WrittenSizeInBytes)) \
X(HRESULT, WHvCreatePartition, (WHV_PARTITION_HANDLE* Partition)) \
diff --git a/target/i386/xsave_helper.c b/target/i386/xsave_helper.c
index 52ea7e654b..818115e7d2 100644
--- a/target/i386/xsave_helper.c
+++ b/target/i386/xsave_helper.c
@@ -4,7 +4,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
void x86_cpu_xsave_all_areas(X86CPU *cpu, X86XSaveArea *buf)
diff --git a/target/lm32/cpu.c b/target/lm32/cpu.c
index a14191236f..b35537de62 100644
--- a/target/lm32/cpu.c
+++ b/target/lm32/cpu.c
@@ -22,7 +22,6 @@
#include "qapi/error.h"
#include "qemu/qemu-print.h"
#include "cpu.h"
-#include "qemu-common.h"
static void lm32_cpu_set_pc(CPUState *cs, vaddr value)
diff --git a/target/lm32/cpu.h b/target/lm32/cpu.h
index 3e10a693a3..c2bbfa2780 100644
--- a/target/lm32/cpu.h
+++ b/target/lm32/cpu.h
@@ -20,7 +20,6 @@
#ifndef LM32_CPU_H
#define LM32_CPU_H
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
diff --git a/target/lm32/gdbstub.c b/target/lm32/gdbstub.c
index cf929dd392..82ede436e1 100644
--- a/target/lm32/gdbstub.c
+++ b/target/lm32/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
#include "hw/lm32/lm32_pic.h"
diff --git a/target/lm32/machine.c b/target/lm32/machine.c
index 3c258a4bcc..cc46f77324 100644
--- a/target/lm32/machine.c
+++ b/target/lm32/machine.c
@@ -1,5 +1,4 @@
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index ea38cb46e9..3d0971d4a2 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -21,7 +21,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "cpu.h"
-#include "qemu-common.h"
#include "migration/vmstate.h"
#include "fpu/softfloat.h"
diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h
index 1ebd360afb..5ef200a9fb 100644
--- a/target/m68k/cpu.h
+++ b/target/m68k/cpu.h
@@ -21,7 +21,6 @@
#ifndef M68K_CPU_H
#define M68K_CPU_H
-#include "qemu-common.h"
#include "exec/cpu-defs.h"
#include "cpu-qom.h"
diff --git a/target/m68k/gdbstub.c b/target/m68k/gdbstub.c
index fd2bb46c42..e6baf0601e 100644
--- a/target/m68k/gdbstub.c
+++ b/target/m68k/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c
index 6716b93b5a..f97580af83 100644
--- a/target/m68k/m68k-semi.c
+++ b/target/m68k/m68k-semi.c
@@ -24,7 +24,6 @@
#include "qemu.h"
#define SEMIHOSTING_HEAP_SIZE (128 * 1024 * 1024)
#else
-#include "qemu-common.h"
#include "exec/gdbstub.h"
#include "exec/softmmu-semi.h"
#endif
diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c
index 5c537526c0..0bec54b2f8 100644
--- a/target/microblaze/cpu.c
+++ b/target/microblaze/cpu.c
@@ -24,7 +24,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "cpu.h"
-#include "qemu-common.h"
+#include "qemu/module.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "exec/exec-all.h"
diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h
index 98b4d915d7..95773089aa 100644
--- a/target/microblaze/cpu.h
+++ b/target/microblaze/cpu.h
@@ -20,7 +20,6 @@
#ifndef MICROBLAZE_CPU_H
#define MICROBLAZE_CPU_H
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
#include "fpu/softfloat-types.h"
diff --git a/target/microblaze/gdbstub.c b/target/microblaze/gdbstub.c
index 7fb076c2e9..30677b6d1f 100644
--- a/target/microblaze/gdbstub.c
+++ b/target/microblaze/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
diff --git a/target/microblaze/microblaze-decode.h b/target/microblaze/microblaze-decode.h
index 401319ed46..17b2f29fff 100644
--- a/target/microblaze/microblaze-decode.h
+++ b/target/microblaze/microblaze-decode.h
@@ -17,6 +17,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef TARGET_MICROBLAZE_MICROBLAZE_DECODE_H
+#define TARGET_MICROBLAZE_MICROBLAZE_DECODE_H
+
/* Convenient binary macros. */
#define HEX__(n) 0x##n##LU
#define B8__(x) ((x&0x0000000FLU)?1:0) \
@@ -53,3 +56,4 @@
#define DEC_STREAM {B8(00010011), B8(00110111)}
+#endif
diff --git a/target/microblaze/mmu.h b/target/microblaze/mmu.h
index a4272b6356..75e5301c79 100644
--- a/target/microblaze/mmu.h
+++ b/target/microblaze/mmu.h
@@ -17,6 +17,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef TARGET_MICROBLAZE_MMU_H
+#define TARGET_MICROBLAZE_MMU_H
+
#define MMU_R_PID 0
#define MMU_R_ZPR 1
#define MMU_R_TLBX 2
@@ -93,3 +96,5 @@ unsigned int mmu_translate(struct microblaze_mmu *mmu,
uint32_t mmu_read(CPUMBState *env, bool ea, uint32_t rn);
void mmu_write(CPUMBState *env, bool ea, uint32_t rn, uint32_t v);
void mmu_init(struct microblaze_mmu *mmu);
+
+#endif
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index 73232b80ad..39eafafc5c 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -23,7 +23,7 @@
#include "cpu.h"
#include "internal.h"
#include "kvm_mips.h"
-#include "qemu-common.h"
+#include "qemu/module.h"
#include "sysemu/kvm.h"
#include "exec/exec-all.h"
diff --git a/target/mips/cpu.h b/target/mips/cpu.h
index bbf1aa8b0d..21c0615e02 100644
--- a/target/mips/cpu.h
+++ b/target/mips/cpu.h
@@ -3,7 +3,6 @@
#define ALIGNED_ONLY
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
#include "fpu/softfloat.h"
diff --git a/target/mips/gdbstub.c b/target/mips/gdbstub.c
index 18e0e6dce4..ebcc98bdde 100644
--- a/target/mips/gdbstub.c
+++ b/target/mips/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "internal.h"
#include "exec/gdbstub.h"
diff --git a/target/mips/machine.c b/target/mips/machine.c
index 70d277db51..eb2d97001d 100644
--- a/target/mips/machine.c
+++ b/target/mips/machine.c
@@ -1,5 +1,4 @@
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "internal.h"
#include "hw/hw.h"
diff --git a/target/moxie/cpu.c b/target/moxie/cpu.c
index 4688cee8c1..48996d0554 100644
--- a/target/moxie/cpu.c
+++ b/target/moxie/cpu.c
@@ -20,7 +20,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "cpu.h"
-#include "qemu-common.h"
#include "migration/vmstate.h"
#include "machine.h"
diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h
index 2b596d5d45..91ef2dc25e 100644
--- a/target/moxie/cpu.h
+++ b/target/moxie/cpu.h
@@ -20,7 +20,6 @@
#ifndef MOXIE_CPU_H
#define MOXIE_CPU_H
-#include "qemu-common.h"
#include "exec/cpu-defs.h"
#define MOXIE_EX_DIV0 0
diff --git a/target/moxie/machine.c b/target/moxie/machine.c
index 282dcd869f..322a724e6f 100644
--- a/target/moxie/machine.c
+++ b/target/moxie/machine.c
@@ -1,5 +1,4 @@
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
diff --git a/target/moxie/mmu.h b/target/moxie/mmu.h
index 284a44d18e..d80690f4d2 100644
--- a/target/moxie/mmu.h
+++ b/target/moxie/mmu.h
@@ -1,3 +1,6 @@
+#ifndef TARGET_MOXIE_MMU_H
+#define TARGET_MOXIE_MMU_H
+
#define MOXIE_MMU_ERR_EXEC 0
#define MOXIE_MMU_ERR_READ 1
#define MOXIE_MMU_ERR_WRITE 2
@@ -12,3 +15,5 @@ typedef struct {
int moxie_mmu_translate(MoxieMMUResult *res,
CPUMoxieState *env, uint32_t vaddr,
int rw, int mmu_idx);
+
+#endif
diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c
index b00223e0c7..ca9c7a6df5 100644
--- a/target/nios2/cpu.c
+++ b/target/nios2/cpu.c
@@ -19,7 +19,7 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
+#include "qemu/module.h"
#include "qapi/error.h"
#include "cpu.h"
#include "exec/log.h"
diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h
index e40ee27e53..5d44b76389 100644
--- a/target/nios2/cpu.h
+++ b/target/nios2/cpu.h
@@ -21,7 +21,6 @@
#ifndef NIOS2_CPU_H
#define NIOS2_CPU_H
-#include "qemu-common.h"
#include "exec/cpu-defs.h"
#include "qom/cpu.h"
diff --git a/target/nios2/mmu.c b/target/nios2/mmu.c
index 9a0bafe786..2545c06761 100644
--- a/target/nios2/mmu.c
+++ b/target/nios2/mmu.c
@@ -19,7 +19,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "qemu/qemu-print.h"
#include "cpu.h"
#include "exec/exec-all.h"
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
index d5b0134371..f19e482a55 100644
--- a/target/openrisc/cpu.c
+++ b/target/openrisc/cpu.c
@@ -21,7 +21,6 @@
#include "qapi/error.h"
#include "qemu/qemu-print.h"
#include "cpu.h"
-#include "qemu-common.h"
static void openrisc_cpu_set_pc(CPUState *cs, vaddr value)
{
diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h
index 9b80834d68..f23b25262d 100644
--- a/target/openrisc/cpu.h
+++ b/target/openrisc/cpu.h
@@ -20,7 +20,6 @@
#ifndef OPENRISC_CPU_H
#define OPENRISC_CPU_H
-#include "qemu-common.h"
#include "exec/cpu-defs.h"
#include "qom/cpu.h"
diff --git a/target/openrisc/disas.c b/target/openrisc/disas.c
index 5923b2429e..7091832347 100644
--- a/target/openrisc/disas.c
+++ b/target/openrisc/disas.c
@@ -18,7 +18,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "disas/dis-asm.h"
#include "qemu/bitops.h"
#include "cpu.h"
diff --git a/target/openrisc/exception.h b/target/openrisc/exception.h
index c9c4e471d2..333bf84638 100644
--- a/target/openrisc/exception.h
+++ b/target/openrisc/exception.h
@@ -21,7 +21,6 @@
#define TARGET_OPENRISC_EXCEPTION_H
#include "cpu.h"
-#include "qemu-common.h"
void QEMU_NORETURN raise_exception(OpenRISCCPU *cpu, uint32_t excp);
diff --git a/target/openrisc/gdbstub.c b/target/openrisc/gdbstub.c
index 43b1a18d4b..0fcdb79668 100644
--- a/target/openrisc/gdbstub.c
+++ b/target/openrisc/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
diff --git a/target/openrisc/interrupt.c b/target/openrisc/interrupt.c
index ee280df895..3eab771dcd 100644
--- a/target/openrisc/interrupt.c
+++ b/target/openrisc/interrupt.c
@@ -20,7 +20,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/exec-all.h"
-#include "qemu-common.h"
#include "exec/gdbstub.h"
#include "qemu/host-utils.h"
#ifndef CONFIG_USER_ONLY
diff --git a/target/openrisc/machine.c b/target/openrisc/machine.c
index c9e084814c..9fa285217d 100644
--- a/target/openrisc/machine.c
+++ b/target/openrisc/machine.c
@@ -18,7 +18,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/boards.h"
diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c
index a73b12af03..94df8c7bef 100644
--- a/target/openrisc/mmu.c
+++ b/target/openrisc/mmu.c
@@ -21,7 +21,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/exec-all.h"
-#include "qemu-common.h"
#include "exec/gdbstub.h"
#include "qemu/host-utils.h"
#ifndef CONFIG_USER_ONLY
diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c
index 36821948c0..4360ce4045 100644
--- a/target/openrisc/translate.c
+++ b/target/openrisc/translate.c
@@ -23,7 +23,6 @@
#include "exec/exec-all.h"
#include "disas/disas.h"
#include "tcg-op.h"
-#include "qemu-common.h"
#include "qemu/log.h"
#include "qemu/bitops.h"
#include "qemu/qemu-print.h"
diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c
index 9d7050b5fa..086548e9b9 100644
--- a/target/ppc/cpu-models.c
+++ b/target/ppc/cpu-models.c
@@ -21,6 +21,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
+#include "qemu/module.h"
#include "cpu-models.h"
#if defined(CONFIG_USER_ONLY)
diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index c93ebc4c10..c9beba2a5c 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -20,7 +20,6 @@
#ifndef PPC_CPU_H
#define PPC_CPU_H
-#include "qemu-common.h"
#include "qemu/int128.h"
#include "exec/cpu-defs.h"
#include "cpu-qom.h"
diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c
index ce3625f44e..823759c92e 100644
--- a/target/ppc/gdbstub.c
+++ b/target/ppc/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
diff --git a/target/ppc/kvm-stub.c b/target/ppc/kvm-stub.c
index b8aa97f2d4..b98e1d404f 100644
--- a/target/ppc/kvm-stub.c
+++ b/target/ppc/kvm-stub.c
@@ -10,7 +10,6 @@
*
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "hw/ppc/openpic_kvm.h"
diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index 25cdb9088b..5ad7b40f45 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -1,5 +1,4 @@
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "hw/hw.h"
diff --git a/target/ppc/monitor.c b/target/ppc/monitor.c
index ee9d6e81d2..7f8360d903 100644
--- a/target/ppc/monitor.c
+++ b/target/ppc/monitor.c
@@ -21,9 +21,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+
#include "qemu/osdep.h"
#include "cpu.h"
#include "monitor/monitor.h"
+#include "qemu/ctype.h"
#include "monitor/hmp-target.h"
#include "hmp.h"
diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c
index b71b7bac20..03cb6d0521 100644
--- a/target/ppc/translate_init.inc.c
+++ b/target/ppc/translate_init.inc.c
@@ -24,10 +24,12 @@
#include "sysemu/arch_init.h"
#include "sysemu/cpus.h"
#include "sysemu/hw_accel.h"
+#include "sysemu/tcg.h"
#include "cpu-models.h"
#include "mmu-hash32.h"
#include "mmu-hash64.h"
#include "qemu/error-report.h"
+#include "qemu/module.h"
#include "qemu/qemu-print.h"
#include "qapi/error.h"
#include "qapi/qmp/qnull.h"
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 86fd8693a8..6f2b644220 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "qemu/qemu-print.h"
+#include "qemu/ctype.h"
#include "qemu/log.h"
#include "cpu.h"
#include "exec/exec-all.h"
diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
index a935b17dbd..6c5de37b25 100644
--- a/target/riscv/cpu.h
+++ b/target/riscv/cpu.h
@@ -20,7 +20,6 @@
#ifndef RISCV_CPU_H
#define RISCV_CPU_H
-#include "qemu-common.h"
#include "qom/cpu.h"
#include "exec/cpu-defs.h"
#include "fpu/softfloat.h"
diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h
index dc9d53d4be..47450a3cdb 100644
--- a/target/riscv/cpu_bits.h
+++ b/target/riscv/cpu_bits.h
@@ -1,5 +1,8 @@
/* RISC-V ISA constants */
+#ifndef TARGET_RISCV_CPU_BITS_H
+#define TARGET_RISCV_CPU_BITS_H
+
#define get_field(reg, mask) (((reg) & \
(target_ulong)(mask)) / ((mask) & ~((mask) << 1)))
#define set_field(reg, mask, val) (((reg) & ~(target_ulong)(mask)) | \
@@ -527,3 +530,5 @@
#define SIP_SSIP MIP_SSIP
#define SIP_STIP MIP_STIP
#define SIP_SEIP MIP_SEIP
+
+#endif
diff --git a/target/riscv/cpu_user.h b/target/riscv/cpu_user.h
index 52d380aa98..02afad608b 100644
--- a/target/riscv/cpu_user.h
+++ b/target/riscv/cpu_user.h
@@ -1,3 +1,6 @@
+#ifndef TARGET_RISCV_CPU_USER_H
+#define TARGET_RISCV_CPU_USER_H
+
#define xRA 1 /* return address (aka link register) */
#define xSP 2 /* stack pointer */
#define xGP 3 /* global pointer */
@@ -12,3 +15,5 @@
#define xA6 16
#define xA7 17 /* syscall number for RVI ABI */
#define xT0 5 /* syscall number for RVE ABI */
+
+#endif
diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c
index dfcdd834cf..27be93279b 100644
--- a/target/riscv/gdbstub.c
+++ b/target/riscv/gdbstub.c
@@ -17,7 +17,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "exec/gdbstub.h"
#include "cpu.h"
diff --git a/target/riscv/instmap.h b/target/riscv/instmap.h
index 58baa1ba1f..f8ad7d60fd 100644
--- a/target/riscv/instmap.h
+++ b/target/riscv/instmap.h
@@ -16,6 +16,9 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef TARGET_RISCV_INSTMAP_H
+#define TARGET_RISCV_INSTMAP_H
+
#define MASK_OP_MAJOR(op) (op & 0x7F)
enum {
/* rv32i, rv64i, rv32m */
@@ -362,3 +365,5 @@ enum {
#define GET_C_RS2(inst) extract32(inst, 2, 5)
#define GET_C_RS1S(inst) (8 + extract32(inst, 7, 3))
#define GET_C_RS2S(inst) (8 + extract32(inst, 2, 3))
+
+#endif
diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c
index b11c4ae22f..fed1c3c030 100644
--- a/target/riscv/pmp.c
+++ b/target/riscv/pmp.c
@@ -27,7 +27,6 @@
#include "qemu/log.h"
#include "qapi/error.h"
#include "cpu.h"
-#include "qemu-common.h"
#ifndef CONFIG_USER_ONLY
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index 4ca66fed1a..f2d93644d5 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -26,9 +26,9 @@
#include "internal.h"
#include "kvm_s390x.h"
#include "sysemu/kvm.h"
-#include "qemu-common.h"
#include "qemu/timer.h"
#include "qemu/error-report.h"
+#include "qemu/module.h"
#include "trace.h"
#include "qapi/visitor.h"
#include "qapi/qapi-visit-misc.h"
@@ -39,6 +39,7 @@
#include "hw/hw.h"
#include "sysemu/arch_init.h"
#include "sysemu/sysemu.h"
+#include "sysemu/tcg.h"
#endif
#include "fpu/softfloat.h"
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index cb103bc3e7..a606547b4d 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -21,7 +21,6 @@
#ifndef S390X_CPU_H
#define S390X_CPU_H
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "cpu_models.h"
#include "exec/cpu-defs.h"
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index b5d16e4c89..19ebde14db 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -15,9 +15,11 @@
#include "internal.h"
#include "kvm_s390x.h"
#include "sysemu/kvm.h"
+#include "sysemu/tcg.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "qemu/error-report.h"
+#include "qemu/module.h"
#include "qemu/qemu-print.h"
#include "qapi/qmp/qerror.h"
#include "qapi/qobject-input-visitor.h"
diff --git a/target/s390x/gdbstub.c b/target/s390x/gdbstub.c
index a45d805a21..e24a49f4a9 100644
--- a/target/s390x/gdbstub.c
+++ b/target/s390x/gdbstub.c
@@ -17,14 +17,15 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "internal.h"
#include "exec/exec-all.h"
#include "exec/gdbstub.h"
#include "qemu/bitops.h"
#include "sysemu/hw_accel.h"
+#include "sysemu/tcg.h"
int s390_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
{
diff --git a/target/s390x/helper.c b/target/s390x/helper.c
index 52a11daeae..13ae9909ad 100644
--- a/target/s390x/helper.c
+++ b/target/s390x/helper.c
@@ -28,6 +28,7 @@
#include "sysemu/hw_accel.h"
#ifndef CONFIG_USER_ONLY
#include "sysemu/sysemu.h"
+#include "sysemu/tcg.h"
#endif
#ifndef CONFIG_USER_ONLY
diff --git a/target/s390x/interrupt.c b/target/s390x/interrupt.c
index a8f9b38795..a841f7187d 100644
--- a/target/s390x/interrupt.c
+++ b/target/s390x/interrupt.c
@@ -14,6 +14,7 @@
#include "internal.h"
#include "exec/exec-all.h"
#include "sysemu/kvm.h"
+#include "sysemu/tcg.h"
#include "hw/s390x/ioinst.h"
#include "tcg_s390x.h"
#if !defined(CONFIG_USER_ONLY)
diff --git a/target/s390x/kvm-stub.c b/target/s390x/kvm-stub.c
index 22b4514ca6..5152e2bdf1 100644
--- a/target/s390x/kvm-stub.c
+++ b/target/s390x/kvm-stub.c
@@ -8,7 +8,6 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "kvm_s390x.h"
diff --git a/target/s390x/machine.c b/target/s390x/machine.c
index e6851a57bc..1e9526e937 100644
--- a/target/s390x/machine.c
+++ b/target/s390x/machine.c
@@ -21,6 +21,7 @@
#include "kvm_s390x.h"
#include "tcg_s390x.h"
#include "sysemu/kvm.h"
+#include "sysemu/tcg.h"
static int cpu_post_load(void *opaque, int version_id)
{
diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
index 9669bae393..6e9c4d6151 100644
--- a/target/s390x/mmu_helper.c
+++ b/target/s390x/mmu_helper.c
@@ -22,6 +22,7 @@
#include "internal.h"
#include "kvm_s390x.h"
#include "sysemu/kvm.h"
+#include "sysemu/tcg.h"
#include "exec/exec-all.h"
#include "trace.h"
#include "hw/s390x/storage-keys.h"
diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c
index ea5f69d5d8..ce49a792fc 100644
--- a/target/s390x/sigp.c
+++ b/target/s390x/sigp.c
@@ -9,13 +9,13 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "internal.h"
#include "sysemu/hw_accel.h"
#include "exec/address-spaces.h"
#include "exec/exec-all.h"
#include "sysemu/sysemu.h"
+#include "sysemu/tcg.h"
#include "trace.h"
#include "qapi/qapi-types-misc.h"
diff --git a/target/s390x/vec_helper.c b/target/s390x/vec_helper.c
index bb4c9304f0..986e7cc825 100644
--- a/target/s390x/vec_helper.c
+++ b/target/s390x/vec_helper.c
@@ -10,7 +10,6 @@
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "internal.h"
#include "vec.h"
diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c
index dfca03f266..816d6d7f31 100644
--- a/target/sh4/cpu.c
+++ b/target/sh4/cpu.c
@@ -23,7 +23,6 @@
#include "qapi/error.h"
#include "qemu/qemu-print.h"
#include "cpu.h"
-#include "qemu-common.h"
#include "migration/vmstate.h"
#include "exec/exec-all.h"
#include "fpu/softfloat.h"
diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h
index 08cf275f79..aee733eaaa 100644
--- a/target/sh4/cpu.h
+++ b/target/sh4/cpu.h
@@ -20,7 +20,6 @@
#ifndef SH4_CPU_H
#define SH4_CPU_H
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
diff --git a/target/sh4/gdbstub.c b/target/sh4/gdbstub.c
index 54568e96f9..44c1679e9d 100644
--- a/target/sh4/gdbstub.c
+++ b/target/sh4/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
index ad2c362c6a..ee60a5536a 100644
--- a/target/sparc/cpu.c
+++ b/target/sparc/cpu.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "cpu.h"
+#include "qemu/module.h"
#include "qemu/qemu-print.h"
#include "exec/exec-all.h"
#include "hw/qdev-properties.h"
diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
index 49e0349a81..8ed2250cd0 100644
--- a/target/sparc/cpu.h
+++ b/target/sparc/cpu.h
@@ -1,7 +1,6 @@
#ifndef SPARC_CPU_H
#define SPARC_CPU_H
-#include "qemu-common.h"
#include "qemu/bswap.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c
index ffc2baa2e7..8be742b5a3 100644
--- a/target/sparc/gdbstub.c
+++ b/target/sparc/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
diff --git a/target/sparc/machine.c b/target/sparc/machine.c
index 7791c84963..32d453c008 100644
--- a/target/sparc/machine.c
+++ b/target/sparc/machine.c
@@ -1,5 +1,4 @@
#include "qemu/osdep.h"
-#include "qemu-common.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "hw/hw.h"
diff --git a/target/tilegx/cpu.c b/target/tilegx/cpu.c
index 3567a2b664..69971247f2 100644
--- a/target/tilegx/cpu.c
+++ b/target/tilegx/cpu.c
@@ -21,7 +21,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "cpu.h"
-#include "qemu-common.h"
+#include "qemu/module.h"
#include "hw/qdev-properties.h"
#include "linux-user/syscall_defs.h"
#include "qemu/qemu-print.h"
diff --git a/target/tilegx/cpu.h b/target/tilegx/cpu.h
index c2acb43c2b..6fcec06a9b 100644
--- a/target/tilegx/cpu.h
+++ b/target/tilegx/cpu.h
@@ -20,7 +20,6 @@
#ifndef TILEGX_CPU_H
#define TILEGX_CPU_H
-#include "qemu-common.h"
#include "exec/cpu-defs.h"
/* TILE-Gx common register alias */
diff --git a/target/tilegx/helper.c b/target/tilegx/helper.c
index a57a679825..c006bf7454 100644
--- a/target/tilegx/helper.c
+++ b/target/tilegx/helper.c
@@ -21,7 +21,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/exec-all.h"
-#include "qemu-common.h"
#include "exec/helper-proto.h"
#include <zlib.h> /* For crc32 */
#include "syscall_defs.h"
diff --git a/target/tilegx/simd_helper.c b/target/tilegx/simd_helper.c
index 2d40ddb63e..0fdfad2fa9 100644
--- a/target/tilegx/simd_helper.c
+++ b/target/tilegx/simd_helper.c
@@ -20,7 +20,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "qemu-common.h"
#include "exec/helper-proto.h"
diff --git a/target/tilegx/spr_def_64.h b/target/tilegx/spr_def_64.h
index 67a6c1751e..d3c0cc26d8 100644
--- a/target/tilegx/spr_def_64.h
+++ b/target/tilegx/spr_def_64.h
@@ -12,10 +12,8 @@
* more details.
*/
-#ifndef __DOXYGEN__
-
-#ifndef __ARCH_SPR_DEF_64_H__
-#define __ARCH_SPR_DEF_64_H__
+#ifndef ARCH_SPR_DEF_64_H
+#define ARCH_SPR_DEF_64_H
#define SPR_AUX_PERF_COUNT_0 0x2105
#define SPR_AUX_PERF_COUNT_1 0x2106
@@ -211,6 +209,4 @@
#define SPR_WATCH_MASK 0x200a
#define SPR_WATCH_VAL 0x200b
-#endif /* !defined(__ARCH_SPR_DEF_64_H__) */
-
-#endif /* !defined(__DOXYGEN__) */
+#endif
diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c
index 8624103674..df807c1d74 100644
--- a/target/tricore/cpu.c
+++ b/target/tricore/cpu.c
@@ -20,7 +20,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "cpu.h"
-#include "qemu-common.h"
#include "exec/exec-all.h"
#include "qemu/error-report.h"
diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h
index 52b07c73bf..8c014fad07 100644
--- a/target/tricore/cpu.h
+++ b/target/tricore/cpu.h
@@ -20,7 +20,6 @@
#ifndef TRICORE_CPU_H
#define TRICORE_CPU_H
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
#include "tricore-defs.h"
diff --git a/target/tricore/tricore-opcodes.h b/target/tricore/tricore-opcodes.h
index 40bc121ba4..f7135f183d 100644
--- a/target/tricore/tricore-opcodes.h
+++ b/target/tricore/tricore-opcodes.h
@@ -15,6 +15,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef TARGET_TRICORE_TRICORE_OPCODES_H
+#define TARGET_TRICORE_TRICORE_OPCODES_H
+
/*
* Opcode Masks for Tricore
* Format MASK_OP_InstrFormatName_Field
@@ -1467,3 +1470,5 @@ enum {
OPC2_32_SYS_RESTORE = 0x0e,
OPC2_32_SYS_FRET = 0x03,
};
+
+#endif
diff --git a/target/unicore32/cpu.c b/target/unicore32/cpu.c
index 451082bbe6..802e2f1eba 100644
--- a/target/unicore32/cpu.c
+++ b/target/unicore32/cpu.c
@@ -15,7 +15,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "cpu.h"
-#include "qemu-common.h"
#include "migration/vmstate.h"
#include "exec/exec-all.h"
#include "fpu/softfloat.h"
diff --git a/target/unicore32/cpu.h b/target/unicore32/cpu.h
index 6b459dacde..50ed9dd99c 100644
--- a/target/unicore32/cpu.h
+++ b/target/unicore32/cpu.h
@@ -12,7 +12,6 @@
#ifndef UNICORE32_CPU_H
#define UNICORE32_CPU_H
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
diff --git a/target/xtensa/core-dc233c.c b/target/xtensa/core-dc233c.c
index 8853bfd4d0..f8204f7045 100644
--- a/target/xtensa/core-dc233c.c
+++ b/target/xtensa/core-dc233c.c
@@ -28,7 +28,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/gdbstub.h"
-#include "qemu-common.h"
#include "qemu/host-utils.h"
#include "core-dc233c/core-isa.h"
diff --git a/target/xtensa/core-de212.c b/target/xtensa/core-de212.c
index 7322179b56..a061158f6e 100644
--- a/target/xtensa/core-de212.c
+++ b/target/xtensa/core-de212.c
@@ -28,7 +28,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/gdbstub.h"
-#include "qemu-common.h"
#include "qemu/host-utils.h"
#include "core-de212/core-isa.h"
diff --git a/target/xtensa/core-fsf.c b/target/xtensa/core-fsf.c
index e100e212b9..1221a296fa 100644
--- a/target/xtensa/core-fsf.c
+++ b/target/xtensa/core-fsf.c
@@ -28,7 +28,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/gdbstub.h"
-#include "qemu-common.h"
#include "qemu/host-utils.h"
#include "core-fsf/core-isa.h"
diff --git a/target/xtensa/core-sample_controller.c b/target/xtensa/core-sample_controller.c
index f433ea8d66..a1d220bb9a 100644
--- a/target/xtensa/core-sample_controller.c
+++ b/target/xtensa/core-sample_controller.c
@@ -28,7 +28,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/gdbstub.h"
-#include "qemu-common.h"
#include "qemu/host-utils.h"
#include "core-sample_controller/core-isa.h"
diff --git a/target/xtensa/core-test_kc705_be.c b/target/xtensa/core-test_kc705_be.c
index 6fc20f3cdd..ab73c3885f 100644
--- a/target/xtensa/core-test_kc705_be.c
+++ b/target/xtensa/core-test_kc705_be.c
@@ -28,7 +28,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/gdbstub.h"
-#include "qemu-common.h"
#include "qemu/host-utils.h"
#include "core-test_kc705_be/core-isa.h"
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
index f3ec66e242..76db1741a7 100644
--- a/target/xtensa/cpu.c
+++ b/target/xtensa/cpu.c
@@ -31,7 +31,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "cpu.h"
-#include "qemu-common.h"
+#include "qemu/module.h"
#include "migration/vmstate.h"
diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h
index bfc6604b76..2c277134f1 100644
--- a/target/xtensa/cpu.h
+++ b/target/xtensa/cpu.h
@@ -28,7 +28,6 @@
#ifndef XTENSA_CPU_H
#define XTENSA_CPU_H
-#include "qemu-common.h"
#include "cpu-qom.h"
#include "exec/cpu-defs.h"
#include "xtensa-isa.h"
diff --git a/target/xtensa/gdbstub.c b/target/xtensa/gdbstub.c
index d43bb190c6..54727881f3 100644
--- a/target/xtensa/gdbstub.c
+++ b/target/xtensa/gdbstub.c
@@ -18,7 +18,6 @@
* 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 "exec/gdbstub.h"
#include "qemu/log.h"