[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/10] s390x: s390_cpu_get_phys_page_debug has to ret
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 10/10] s390x: s390_cpu_get_phys_page_debug has to return -1 |
Date: |
Thu, 28 Jan 2016 12:09:11 +0100 |
From: David Hildenbrand <address@hidden>
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 <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
target-s390x/helper.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target-s390x/helper.c b/target-s390x/helper.c
index e541d69..1231e58 100644
--- a/target-s390x/helper.c
+++ b/target-s390x/helper.c
@@ -162,8 +162,9 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr
vaddr)
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;
}
--
2.7.0
- [Qemu-devel] [PULL 00/10] next round of s390x patches, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 02/10] s390x/machine: make addon register fields static, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 01/10] s390x/skeys: Fix instance and class size, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 03/10] s390x/sclp: add device to the sysbus in sclp_realize, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 06/10] watchdog: introduction of get_watchdog_action, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 08/10] s390x/css: fix control flags during csch, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 09/10] gdb: provide the name of the architecture in the target.xml, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 05/10] s390x: fix generation of event information crw, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 10/10] s390x: s390_cpu_get_phys_page_debug has to return -1,
Cornelia Huck <=
- [Qemu-devel] [PULL 07/10] watchdog/diag288: don't reset for action=none|debug|pause, Cornelia Huck, 2016/01/28
- [Qemu-devel] [PULL 04/10] s390x/ioinst: set type and len for SEI response, Cornelia Huck, 2016/01/28
- Re: [Qemu-devel] [PULL 00/10] next round of s390x patches, Peter Maydell, 2016/01/28