cpu: move exec-all.h inclusion out of cpu.h

exec-all.h contains TCG-specific definitions. It is not needed outside
TCG-specific files such as translate.c, exec.c or *helper.c.

One generic function had snuck into include/exec/exec-all.h; move it to
include/qom/cpu.h.

Backports commit 63c915526d6a54a95919ebece83fa9ca631b2508 from qemu
This commit is contained in:
Paolo Bonzini 2018-02-24 02:26:26 -05:00 committed by Lioncash
parent 9779bff603
commit 9485b7c2e1
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
50 changed files with 63 additions and 23 deletions

View file

@ -20,6 +20,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "sysemu/cpus.h" #include "sysemu/cpus.h"
#include "exec/exec-all.h"
#include "exec/memory-internal.h" #include "exec/memory-internal.h"
/* exit the current TB from a signal handler. The host registers are /* exit the current TB from a signal handler. The host registers are

View file

@ -20,6 +20,8 @@
/* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */ /* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "tcg.h" #include "tcg.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "exec/address-spaces.h" #include "exec/address-spaces.h"

View file

@ -29,8 +29,10 @@
#include "qemu-common.h" #include "qemu-common.h"
#include "cpu.h" #include "cpu.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "sysemu/cpus.h" #include "exec/exec-all.h"
#include "qemu/thread.h" #include "qemu/thread.h"
#include "sysemu/cpus.h"
#include "exec/address-spaces.h" // debug, can be removed later #include "exec/address-spaces.h" // debug, can be removed later

View file

@ -30,6 +30,7 @@
#include "exec/memory-internal.h" #include "exec/memory-internal.h"
#include "exec/ram_addr.h" #include "exec/ram_addr.h"
#include "exec/exec-all.h"
#include "tcg/tcg.h" #include "tcg/tcg.h"
#include "uc_priv.h" #include "uc_priv.h"

View file

@ -26,6 +26,7 @@
#include "qemu/cutils.h" #include "qemu/cutils.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "tcg.h" #include "tcg.h"
#include "hw/hw.h" #include "hw/hw.h"
#include "hw/qdev.h" #include "hw/qdev.h"

View file

@ -80,15 +80,7 @@ void QEMU_NORETURN cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc);
* Note that with KVM only one address space is supported. * Note that with KVM only one address space is supported.
*/ */
void cpu_address_space_init(CPUState *cpu, AddressSpace *as, int asidx); void cpu_address_space_init(CPUState *cpu, AddressSpace *as, int asidx);
/**
* cpu_get_address_space:
* @cpu: CPU to get address space from
* @asidx: index identifying which address space to get
*
* Return the requested address space of this CPU. @asidx
* specifies which address space to read.
*/
AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx);
/* cputlb.c */ /* cputlb.c */
/** /**
* tlb_flush_page: * tlb_flush_page:
@ -98,7 +90,6 @@ AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx);
* Flush one page from the TLB of the specified CPU, for all * Flush one page from the TLB of the specified CPU, for all
* MMU indexes. * MMU indexes.
*/ */
void tlb_flush_page(CPUState *cpu, target_ulong addr); void tlb_flush_page(CPUState *cpu, target_ulong addr);
/** /**
* tlb_flush: * tlb_flush:

View file

@ -702,6 +702,16 @@ int cpu_watchpoint_remove(CPUState *cpu, vaddr addr,
void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint); void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint);
void cpu_watchpoint_remove_all(CPUState *cpu, int mask); void cpu_watchpoint_remove_all(CPUState *cpu, int mask);
/**
* cpu_get_address_space:
* @cpu: CPU to get address space from
* @asidx: index identifying which address space to get
*
* Return the requested address space of this CPU. @asidx
* specifies which address space to read.
*/
AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx);
/* Return true if PC matches an installed breakpoint. */ /* Return true if PC matches an installed breakpoint. */
static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask) static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask)
{ {

View file

@ -16,17 +16,17 @@
/* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */ /* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "cpu.h" #include "cpu.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu-common.h" #include "exec/exec-all.h"
#include "exec/memory.h" #include "exec/memory.h"
#include "exec/address-spaces.h" #include "exec/address-spaces.h"
#include "exec/ioport.h" #include "exec/ioport.h"
#include "qapi/visitor.h" #include "qapi/visitor.h"
#include "qemu/bitops.h" #include "qemu/bitops.h"
#include "qom/object.h" #include "qom/object.h"
#include <assert.h>
#include "exec/memory-internal.h" #include "exec/memory-internal.h"
#include "exec/ram_addr.h" #include "exec/ram_addr.h"

View file

@ -20,6 +20,7 @@
#ifndef ARM_LDST_H #ifndef ARM_LDST_H
#define ARM_LDST_H #define ARM_LDST_H
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#include "qemu/bswap.h" #include "qemu/bswap.h"

View file

@ -23,6 +23,7 @@
#include "cpu.h" #include "cpu.h"
#include "internals.h" #include "internals.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "exec/exec-all.h"
#include "qapi/qmp/qerror.h" #include "qapi/qmp/qerror.h"
#include "hw/arm/arm.h" #include "hw/arm/arm.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"

View file

@ -2364,8 +2364,6 @@ static inline uint64_t *aa64_vfp_qreg(CPUARMState *env, unsigned regno)
return &env->vfp.regs[2 * regno]; return &env->vfp.regs[2 * regno];
} }
#include "exec/exec-all.h"
enum { enum {
QEMU_PSCI_CONDUIT_DISABLED = 0, QEMU_PSCI_CONDUIT_DISABLED = 0,
QEMU_PSCI_CONDUIT_SMC = 1, QEMU_PSCI_CONDUIT_SMC = 1,

View file

@ -21,6 +21,7 @@
#include "cpu.h" #include "cpu.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "qemu/host-utils.h" #include "qemu/host-utils.h"
#include "qemu/log.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "qemu/bitops.h" #include "qemu/bitops.h"
#include "internals.h" #include "internals.h"

View file

@ -6,6 +6,7 @@
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "qemu/bitops.h" #include "qemu/bitops.h"
#include "qemu/crc32c.h" #include "qemu/crc32c.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#include "arm_ldst.h" #include "arm_ldst.h"

View file

@ -20,6 +20,7 @@
#include "cpu.h" #include "cpu.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "internals.h" #include "internals.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#define SIGNBIT (uint32_t)0x80000000 #define SIGNBIT (uint32_t)0x80000000

View file

@ -15,12 +15,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>. * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/ */
#include "qemu/osdep.h"
#include <cpu.h> #include <cpu.h>
#include <cpu-qom.h> #include <cpu-qom.h>
#include <exec/helper-proto.h> #include <exec/helper-proto.h>
#include <kvm-consts.h> #include <kvm-consts.h>
#include <sysemu/sysemu.h> #include <sysemu/sysemu.h>
#include "internals.h" #include "internals.h"
#include "exec/exec-all.h"
bool arm_is_psci_call(ARMCPU *cpu, int excp_type) bool arm_is_psci_call(ARMCPU *cpu, int excp_type)
{ {

View file

@ -20,6 +20,7 @@
#include "unicorn/platform.h" #include "unicorn/platform.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "tcg-op.h" #include "tcg-op.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "arm_ldst.h" #include "arm_ldst.h"

View file

@ -24,6 +24,7 @@
#include "cpu.h" #include "cpu.h"
#include "internals.h" #include "internals.h"
#include "exec/exec-all.h"
#include "tcg-op.h" #include "tcg-op.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "qemu/bitops.h" #include "qemu/bitops.h"

View file

@ -19,6 +19,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#ifndef CONFIG_USER_ONLY #ifndef CONFIG_USER_ONLY

View file

@ -23,6 +23,7 @@
#include "unicorn/platform.h" #include "unicorn/platform.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "sysemu/cpus.h" #include "sysemu/cpus.h"
#include "qapi/qmp/qerror.h" #include "qapi/qmp/qerror.h"

View file

@ -1351,8 +1351,6 @@ void tcg_x86_init(struct uc_struct *);
#include "hw/i386/apic.h" #include "hw/i386/apic.h"
#endif #endif
#include "exec/exec-all.h"
static inline void cpu_get_tb_cpu_state(CPUX86State *env, target_ulong *pc, static inline void cpu_get_tb_cpu_state(CPUX86State *env, target_ulong *pc,
target_ulong *cs_base, uint32_t *flags) target_ulong *cs_base, uint32_t *flags)
{ {

View file

@ -19,6 +19,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"

View file

@ -22,6 +22,7 @@
#include "cpu.h" #include "cpu.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "qemu/host-utils.h" #include "qemu/host-utils.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#define FPU_RC_MASK 0xc00 #define FPU_RC_MASK 0xc00

View file

@ -19,6 +19,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#ifndef CONFIG_USER_ONLY #ifndef CONFIG_USER_ONLY
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#endif #endif

View file

@ -19,6 +19,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "qemu/host-utils.h" #include "qemu/host-utils.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"

View file

@ -20,6 +20,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#include "uc_priv.h" #include "uc_priv.h"

View file

@ -21,6 +21,7 @@
#include "cpu.h" #include "cpu.h"
#include "exec/ioport.h" #include "exec/ioport.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#include "uc_priv.h" #include "uc_priv.h"

View file

@ -20,6 +20,7 @@
#include "cpu.h" #include "cpu.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#include "exec/exec-all.h"
void cpu_sync_bndcs_hflags(CPUX86State *env) void cpu_sync_bndcs_hflags(CPUX86State *env)

View file

@ -22,6 +22,7 @@
#include "cpu.h" #include "cpu.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#include "uc_priv.h" #include "uc_priv.h"

View file

@ -21,6 +21,7 @@
#include "cpu.h" #include "cpu.h"
#include "exec/cpu-all.h" #include "exec/cpu-all.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
/* Secure Virtual Machine helpers */ /* Secure Virtual Machine helpers */

View file

@ -22,6 +22,7 @@
#include "qemu/host-utils.h" #include "qemu/host-utils.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "tcg-op.h" #include "tcg-op.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"

View file

@ -23,6 +23,7 @@
#include "hw/m68k/m68k.h" #include "hw/m68k/m68k.h"
#include "cpu.h" #include "cpu.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "exec/exec-all.h"
static void m68k_cpu_set_pc(CPUState *cs, vaddr value) static void m68k_cpu_set_pc(CPUState *cs, vaddr value)

View file

@ -282,6 +282,4 @@ static inline void cpu_get_tb_cpu_state(CPUM68KState *env, target_ulong *pc,
| ((env->macsr >> 4) & 0xf); /* Bits 0-3 */ | ((env->macsr >> 4) & 0xf); /* Bits 0-3 */
} }
#include "exec/exec-all.h"
#endif #endif

View file

@ -20,6 +20,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"

View file

@ -19,6 +19,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#if defined(CONFIG_USER_ONLY) #if defined(CONFIG_USER_ONLY)

View file

@ -20,6 +20,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "tcg-op.h" #include "tcg-op.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"

View file

@ -22,6 +22,7 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "cpu.h" #include "cpu.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "exec/exec-all.h"
#include "hw/mips/mips.h" #include "hw/mips/mips.h"

View file

@ -926,8 +926,6 @@ static inline int mips_vp_active(CPUMIPSState *env)
return 1; return 1;
} }
#include "exec/exec-all.h"
static inline void compute_hflags(CPUMIPSState *env) static inline void compute_hflags(CPUMIPSState *env)
{ {
env->hflags &= ~(MIPS_HFLAG_COP1X | MIPS_HFLAG_64 | MIPS_HFLAG_CP0 | env->hflags &= ~(MIPS_HFLAG_COP1X | MIPS_HFLAG_64 | MIPS_HFLAG_CP0 |

View file

@ -21,6 +21,7 @@
#include "unicorn/platform.h" #include "unicorn/platform.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
enum { enum {

View file

@ -19,6 +19,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
/* Data format min and max values */ /* Data format min and max values */

View file

@ -20,6 +20,7 @@
#include "cpu.h" #include "cpu.h"
#include "qemu/host-utils.h" #include "qemu/host-utils.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
/*****************************************************************************/ /*****************************************************************************/

View file

@ -23,6 +23,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "tcg-op.h" #include "tcg-op.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"

View file

@ -20,6 +20,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "hw/sparc/sparc.h" #include "hw/sparc/sparc.h"
//#define DEBUG_FEATURES //#define DEBUG_FEATURES

View file

@ -771,6 +771,4 @@ static inline bool tb_am_enabled(int tb_flags)
#endif #endif
} }
#include "exec/exec-all.h"
#endif #endif

View file

@ -19,6 +19,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "qemu/host-utils.h" #include "qemu/host-utils.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"

View file

@ -20,6 +20,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "cpu.h" #include "cpu.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
//#define DEBUG_MMU //#define DEBUG_MMU

View file

@ -18,6 +18,7 @@
*/ */
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "exec/address-spaces.h" #include "exec/address-spaces.h"
/* Sparc MMU emulation */ /* Sparc MMU emulation */

View file

@ -23,6 +23,7 @@
#include "cpu.h" #include "cpu.h"
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "exec/exec-all.h"
#include "tcg-op.h" #include "tcg-op.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#include "exec/helper-gen.h" #include "exec/helper-gen.h"

View file

@ -25,6 +25,7 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "tcg.h" #include "tcg.h"
#include "tcg-op.h" #include "tcg-op.h"

View file

@ -41,6 +41,11 @@
#define NO_CPU_IO_DEFS #define NO_CPU_IO_DEFS
#include "cpu.h" #include "cpu.h"
#include "qemu/host-utils.h"
#include "qemu/timer.h"
#include "exec/cpu-common.h"
#include "exec/exec-all.h"
#include "tcg-op.h" #include "tcg-op.h"
#if UINTPTR_MAX == UINT32_MAX #if UINTPTR_MAX == UINT32_MAX

View file

@ -31,6 +31,7 @@
#include "qemu-common.h" #include "qemu-common.h"
#define NO_CPU_IO_DEFS #define NO_CPU_IO_DEFS
#include "cpu.h" #include "cpu.h"
#include "exec/exec-all.h"
#include "tcg.h" #include "tcg.h"
#if defined(CONFIG_USER_ONLY) #if defined(CONFIG_USER_ONLY)
#include "qemu.h" #include "qemu.h"