mirror of https://github.com/xemu-project/xemu.git
s390x: s390_cpu_get_phys_page_debug has to return -1
If translation fails, we have to return -1. For now, we would simply return the value last stored to raddr (if any). This way, reading invalid memory via gdb will return values, although it shouldn't. Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
parent
b3820e6ca0
commit
234779a2b9
|
@ -162,8 +162,9 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr)
|
||||||
vaddr &= 0x7fffffff;
|
vaddr &= 0x7fffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
mmu_translate(env, vaddr, MMU_INST_FETCH, asc, &raddr, &prot, false);
|
if (mmu_translate(env, vaddr, MMU_INST_FETCH, asc, &raddr, &prot, false)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
return raddr;
|
return raddr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue