diff options
author | David 'Digit' Turner <digit@google.com> | 2014-03-25 17:19:27 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2014-04-09 19:43:25 +0200 |
commit | aaef275467ba13162d52ef6f690fd97f9733eb58 (patch) | |
tree | a72a602b69d2584ee38a1091570b9ec76fe6bfac /include | |
parent | bf7a22f3a6c38d359d2e933dec4706d1c7375f0a (diff) | |
download | qemu-aaef275467ba13162d52ef6f690fd97f9733eb58.tar.gz |
cpu_memory_rw_debug: Use CPUState instead of CPUOldState
Change-Id: I3c3440d6d13380dcde18260c54ebbba6e8616d6d
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/cpu-all.h | 8 | ||||
-rw-r--r-- | include/exec/softmmu-semi.h | 12 | ||||
-rw-r--r-- | include/hw/android/goldfish/vmem.h | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 8a9b71cb5d..b6a633a86d 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -447,7 +447,7 @@ void cpu_single_step(CPUState *cpu, int enabled); /* Return the physical page corresponding to a virtual one. Use it only for debugging because no protection checks are done. Return -1 if no page found. */ -hwaddr cpu_get_phys_page_debug(CPUOldState *env, target_ulong addr); +hwaddr cpu_get_phys_page_debug(CPUArchState *env, target_ulong addr); /* memory API */ @@ -543,7 +543,7 @@ static inline void cpu_physical_memory_mask_dirty_range(ram_addr_t start, void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end, int dirty_flags); -void cpu_tlb_update_dirty(CPUOldState *env); +void cpu_tlb_update_dirty(CPUArchState *env); int cpu_physical_memory_set_dirty_tracking(int enable); @@ -579,10 +579,10 @@ extern int64_t tlb_flush_time; extern int64_t dev_time; #endif -int cpu_memory_rw_debug(CPUOldState *env, target_ulong addr, +int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr, void *buf, int len, int is_write); -void cpu_inject_x86_mce(CPUOldState *cenv, int bank, uint64_t status, +void cpu_inject_x86_mce(CPUArchState *cenv, int bank, uint64_t status, uint64_t mcg_status, uint64_t addr, uint64_t misc); #endif /* CPU_ALL_H */ diff --git a/include/exec/softmmu-semi.h b/include/exec/softmmu-semi.h index 7d484cacd1..8401f7d587 100644 --- a/include/exec/softmmu-semi.h +++ b/include/exec/softmmu-semi.h @@ -13,14 +13,14 @@ static inline uint32_t softmmu_tget32(CPUArchState *env, uint32_t addr) { uint32_t val; - cpu_memory_rw_debug(env, addr, (uint8_t *)&val, 4, 0); + cpu_memory_rw_debug(ENV_GET_CPU(env), addr, (uint8_t *)&val, 4, 0); return tswap32(val); } static inline uint32_t softmmu_tget8(CPUArchState *env, uint32_t addr) { uint8_t val; - cpu_memory_rw_debug(env, addr, &val, 1, 0); + cpu_memory_rw_debug(ENV_GET_CPU(env), addr, &val, 1, 0); return val; } @@ -31,7 +31,7 @@ static inline uint32_t softmmu_tget8(CPUArchState *env, uint32_t addr) static inline void softmmu_tput32(CPUArchState *env, uint32_t addr, uint32_t val) { val = tswap32(val); - cpu_memory_rw_debug(env, addr, (uint8_t *)&val, 4, 1); + cpu_memory_rw_debug(ENV_GET_CPU(env), addr, (uint8_t *)&val, 4, 1); } #define put_user_u32(arg, p) ({ softmmu_tput32(env, p, arg) ; 0; }) #define put_user_ual(arg, p) put_user_u32(arg, p) @@ -43,7 +43,7 @@ static void *softmmu_lock_user(CPUArchState *env, uint32_t addr, uint32_t len, /* TODO: Make this something that isn't fixed size. */ p = malloc(len); if (p && copy) { - cpu_memory_rw_debug(env, addr, p, len, 0); + cpu_memory_rw_debug(ENV_GET_CPU(env), addr, p, len, 0); } return p; } @@ -59,7 +59,7 @@ static char *softmmu_lock_user_string(CPUArchState *env, uint32_t addr) return NULL; } do { - cpu_memory_rw_debug(env, addr, &c, 1, 0); + cpu_memory_rw_debug(ENV_GET_CPU(env), addr, &c, 1, 0); addr++; *(p++) = c; } while (c); @@ -70,7 +70,7 @@ static void softmmu_unlock_user(CPUArchState *env, void *p, target_ulong addr, target_ulong len) { if (len) { - cpu_memory_rw_debug(env, addr, p, len, 1); + cpu_memory_rw_debug(ENV_GET_CPU(env), addr, p, len, 1); } free(p); } diff --git a/include/hw/android/goldfish/vmem.h b/include/hw/android/goldfish/vmem.h index be7974d497..ff5d1c0bb8 100644 --- a/include/hw/android/goldfish/vmem.h +++ b/include/hw/android/goldfish/vmem.h @@ -18,10 +18,10 @@ // cpu_get_phys_page_debug to ensure virtual address translation always works // properly, and efficently, under KVM. -int safe_memory_rw_debug(CPUOldState *env, target_ulong addr, uint8_t *buf, +int safe_memory_rw_debug(CPUState *env, target_ulong addr, uint8_t *buf, int len, int is_write); -hwaddr safe_get_phys_page_debug(CPUOldState *env, target_ulong addr); +hwaddr safe_get_phys_page_debug(CPUState *env, target_ulong addr); #endif /* GOLDFISH_VMEM_H */ |