Changeset 37689 in vbox for trunk/src/recompiler/cpu-defs.h
- Timestamp:
- Jun 29, 2011 4:01:23 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 72549
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/cpu-defs.h
r37675 r37689 39 39 #ifndef VBOX 40 40 #include <signal.h> 41 #endif 41 #else /* VBOX */ 42 # define sig_atomic_t int32_t 43 #endif /* VBOX */ 42 44 #include "osdep.h" 43 45 #include "qemu-queue.h" … … 91 93 #define TB_JMP_PAGE_MASK (TB_JMP_CACHE_SIZE - TB_JMP_PAGE_SIZE) 92 94 95 #if !defined(CONFIG_USER_ONLY) 93 96 #define CPU_TLB_BITS 8 94 97 #define CPU_TLB_SIZE (1 << CPU_TLB_BITS) 95 98 96 #if TARGET_PHYS_ADDR_BITS == 32 && TARGET_LONG_BITS == 3299 #if HOST_LONG_BITS == 32 && TARGET_LONG_BITS == 32 97 100 #define CPU_TLB_ENTRY_BITS 4 98 101 #else … … 110 113 target_ulong addr_write; 111 114 target_ulong addr_code; 112 /* Addend to virtual address to get physicaladdress. IO accesses115 /* Addend to virtual address to get host address. IO accesses 113 116 use the corresponding iotlb value. */ 114 #if TARGET_PHYS_ADDR_BITS == 64 115 /* on i386 Linux make sure it is aligned */ 116 target_phys_addr_t addend __attribute__((aligned(8))); 117 #else 118 target_phys_addr_t addend; 119 #endif 117 unsigned long addend; 120 118 /* padding to get a power of two size */ 121 119 uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) - 122 120 (sizeof(target_ulong) * 3 + 123 ((-sizeof(target_ulong) * 3) & (sizeof( target_phys_addr_t) - 1)) +124 sizeof( target_phys_addr_t))];121 ((-sizeof(target_ulong) * 3) & (sizeof(unsigned long) - 1)) + 122 sizeof(unsigned long))]; 125 123 } CPUTLBEntry; 124 125 extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << CPU_TLB_ENTRY_BITS) ? 1 : -1]; 126 127 #define CPU_COMMON_TLB \ 128 /* The meaning of the MMU modes is defined in the target code. */ \ 129 CPUTLBEntry tlb_table[NB_MMU_MODES][CPU_TLB_SIZE]; \ 130 target_phys_addr_t iotlb[NB_MMU_MODES][CPU_TLB_SIZE]; \ 131 target_ulong tlb_flush_addr; \ 132 target_ulong tlb_flush_mask; 133 134 #else 135 136 #define CPU_COMMON_TLB 137 138 #endif 139 126 140 127 141 #ifdef HOST_WORDS_BIGENDIAN … … 139 153 struct kvm_run; 140 154 struct KVMState; 155 struct qemu_work_item; 141 156 142 157 typedef struct CPUBreakpoint { … … 165 180 memory was accessed */ \ 166 181 uint32_t halted; /* Nonzero if the CPU is in suspend state */ \ 167 uint32_t stop; /* Stop request */ \168 uint32_t stopped; /* Artificially stopped */ \169 182 uint32_t interrupt_request; \ 170 volatile /*sig_atomic_t - vbox*/ int32_t exit_request; \ 171 /* The meaning of the MMU modes is defined in the target code. */ \ 172 CPUTLBEntry tlb_table[NB_MMU_MODES][CPU_TLB_SIZE]; \ 173 target_phys_addr_t iotlb[NB_MMU_MODES][CPU_TLB_SIZE]; \ 174 /** addends for HVA -> GPA translations */ \ 175 VBOX_ONLY(target_phys_addr_t phys_addends[NB_MMU_MODES][CPU_TLB_SIZE]); \ 183 volatile sig_atomic_t exit_request; \ 184 CPU_COMMON_TLB \ 176 185 struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE]; \ 177 186 /* buffer for temporaries in the code generator */ \ … … 213 222 \ 214 223 uint32_t created; \ 224 uint32_t stop; /* Stop request */ \ 225 uint32_t stopped; /* Artificially stopped */ \ 215 226 struct QemuThread *thread; \ 216 227 struct QemuCond *halt_cond; \ 228 struct qemu_work_item *queued_work_first, *queued_work_last; \ 217 229 const char *cpu_model_str; \ 218 230 struct KVMState *kvm_state; \ 219 231 struct kvm_run *kvm_run; \ 220 int kvm_fd; 221 222 #endif 232 int kvm_fd; \ 233 int kvm_vcpu_dirty; 234 235 #endif
Note:
See TracChangeset
for help on using the changeset viewer.