提交 234779a2 编写于 作者: D David Hildenbrand 提交者: Cornelia Huck

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: NChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
上级 b3820e6c
...@@ -162,8 +162,9 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr) ...@@ -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;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册