static const struct SysemuCPUOps s390_sysemu_ops = {
.has_work = s390_cpu_has_work,
- .get_phys_page_debug = s390_cpu_get_phys_page_debug,
+ .get_phys_page_debug = s390_cpu_get_phys_addr_debug,
.get_crash_info = s390_cpu_get_crash_info,
.write_elf64_note = s390_cpu_write_elf64_note,
.legacy_vmsd = &vmstate_s390_cpu,
cpu_inject_cpu_timer((S390CPU *) opaque);
}
-hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr)
+hwaddr s390_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr)
{
S390CPU *cpu = S390_CPU(cs);
CPUS390XState *env = &cpu->env;
int prot;
uint64_t asc = env->psw.mask & PSW_MASK_ASC;
uint64_t tec;
+ vaddr page = addr & TARGET_PAGE_MASK;
/* 31-Bit mode */
if (!(env->psw.mask & PSW_MASK_64)) {
- vaddr &= 0x7fffffff;
+ page &= 0x7fffffff;
}
/* We want to read the code (e.g., see what we are single-stepping).*/
* We want to read code even if IEP is active. Use MMU_DATA_LOAD instead
* of MMU_INST_FETCH.
*/
- if (mmu_translate(env, vaddr, MMU_DATA_LOAD, asc, &raddr, &prot, &tec)) {
+ if (mmu_translate(env, page, MMU_DATA_LOAD, asc, &raddr, &prot, &tec)) {
return -1;
}
+ raddr += (addr & ~TARGET_PAGE_MASK);
return raddr;
}
-hwaddr s390_cpu_get_phys_addr_debug(CPUState *cs, vaddr v_addr)
-{
- hwaddr phys_addr;
- vaddr page;
-
- page = v_addr & TARGET_PAGE_MASK;
- phys_addr = cpu_get_phys_page_debug(cs, page);
- phys_addr += (v_addr & ~TARGET_PAGE_MASK);
-
- return phys_addr;
-}
-
static inline bool is_special_wait_psw(uint64_t psw_addr)
{
/* signal quiesce */
void s390x_tod_timer(void *opaque);
void s390x_cpu_timer(void *opaque);
void s390_handle_wait(S390CPU *cpu);
-hwaddr s390_cpu_get_phys_page_debug(CPUState *cpu, vaddr addr);
hwaddr s390_cpu_get_phys_addr_debug(CPUState *cpu, vaddr addr);
LowCore *cpu_map_lowcore(CPUS390XState *env);
void cpu_unmap_lowcore(CPUS390XState *env, LowCore *lowcore);