X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=include%2Fexec%2Fcpu-defs.h;h=12b1ca74266828d54a82ce5feaa04d29c34cb53d;hb=ed2803da58355413447f8c7c681a76873168114f;hp=ae832a9f83f576340b88d79520e7cb14bbd4b526;hpb=0d34282fdde1d8f337d2a9e10f5ac793b12ef2e7;p=qemu.git diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index ae832a9f8..12b1ca742 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -26,10 +26,11 @@ #include "config.h" #include #include -#include #include "qemu/osdep.h" #include "qemu/queue.h" +#ifndef CONFIG_USER_ONLY #include "exec/hwaddr.h" +#endif #ifndef TARGET_LONG_BITS #error TARGET_LONG_BITS must be defined before including this header @@ -37,22 +38,16 @@ #define TARGET_LONG_SIZE (TARGET_LONG_BITS / 8) -typedef int16_t target_short __attribute__ ((aligned(TARGET_SHORT_ALIGNMENT))); -typedef uint16_t target_ushort __attribute__((aligned(TARGET_SHORT_ALIGNMENT))); -typedef int32_t target_int __attribute__((aligned(TARGET_INT_ALIGNMENT))); -typedef uint32_t target_uint __attribute__((aligned(TARGET_INT_ALIGNMENT))); -typedef int64_t target_llong __attribute__((aligned(TARGET_LLONG_ALIGNMENT))); -typedef uint64_t target_ullong __attribute__((aligned(TARGET_LLONG_ALIGNMENT))); /* target_ulong is the type of a virtual address */ #if TARGET_LONG_SIZE == 4 -typedef int32_t target_long __attribute__((aligned(TARGET_LONG_ALIGNMENT))); -typedef uint32_t target_ulong __attribute__((aligned(TARGET_LONG_ALIGNMENT))); +typedef int32_t target_long; +typedef uint32_t target_ulong; #define TARGET_FMT_lx "%08x" #define TARGET_FMT_ld "%d" #define TARGET_FMT_lu "%u" #elif TARGET_LONG_SIZE == 8 -typedef int64_t target_long __attribute__((aligned(TARGET_LONG_ALIGNMENT))); -typedef uint64_t target_ulong __attribute__((aligned(TARGET_LONG_ALIGNMENT))); +typedef int64_t target_long; +typedef uint64_t target_ulong; #define TARGET_FMT_lx "%016" PRIx64 #define TARGET_FMT_ld "%" PRId64 #define TARGET_FMT_lu "%" PRIu64 @@ -106,7 +101,7 @@ typedef struct CPUTLBEntry { sizeof(uintptr_t))]; } CPUTLBEntry; -extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << CPU_TLB_ENTRY_BITS) ? 1 : -1]; +QEMU_BUILD_BUG_ON(sizeof(CPUTLBEntry) != (1 << CPU_TLB_ENTRY_BITS)); #define CPU_COMMON_TLB \ /* The meaning of the MMU modes is defined in the target code. */ \ @@ -149,7 +144,6 @@ typedef struct CPUWatchpoint { #define CPU_TEMP_BUF_NLONGS 128 #define CPU_COMMON \ - struct TranslationBlock *current_tb; /* currently executing TB */ \ /* soft mmu support */ \ /* in order to avoid passing too many arguments to the MMIO \ helpers, we store some rarely used information in the CPU \ @@ -158,9 +152,6 @@ typedef struct CPUWatchpoint { accessed */ \ target_ulong mem_io_vaddr; /* target virtual addr at which the \ memory was accessed */ \ - uint32_t halted; /* Nonzero if the CPU is in suspend state */ \ - uint32_t interrupt_request; \ - volatile sig_atomic_t exit_request; \ CPU_COMMON_TLB \ struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE]; \ /* buffer for temporaries in the code generator */ \ @@ -179,7 +170,6 @@ typedef struct CPUWatchpoint { /* from this point: preserved by CPU reset */ \ /* ice debug support */ \ QTAILQ_HEAD(breakpoints_head, CPUBreakpoint) breakpoints; \ - int singlestep_enabled; \ \ QTAILQ_HEAD(watchpoints_head, CPUWatchpoint) watchpoints; \ CPUWatchpoint *watchpoint_hit; \ @@ -187,11 +177,9 @@ typedef struct CPUWatchpoint { struct GDBRegisterState *gdb_regs; \ \ /* Core interrupt code */ \ - jmp_buf jmp_env; \ + sigjmp_buf jmp_env; \ int exception_index; \ \ - CPUArchState *next_cpu; /* next CPU sharing TB cache */ \ - int running; /* Nonzero if cpu is currently running(usermode). */ \ /* user data */ \ void *opaque; \ \