[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/10] s390x: s390_cpu_get_phys_page_debug has to re
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PATCH 10/10] s390x: s390_cpu_get_phys_page_debug has to return -1 |
Date: |
Fri, 22 Jan 2016 13:23:33 +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] [PATCH 00/10] Next round of s390x patches, Cornelia Huck, 2016/01/22
- [Qemu-devel] [PATCH 01/10] s390x/skeys: Fix instance and class size, Cornelia Huck, 2016/01/22
- [Qemu-devel] [PATCH 02/10] s390x/machine: make addon register fields static, Cornelia Huck, 2016/01/22
- [Qemu-devel] [PATCH 07/10] watchdog/diag288: don't reset for action=none|debug|pause, Cornelia Huck, 2016/01/22
- [Qemu-devel] [PATCH 04/10] s390x/ioinst: set type and len for SEI response, Cornelia Huck, 2016/01/22
- [Qemu-devel] [PATCH 09/10] gdb: provide the name of the architecture in the target.xml, Cornelia Huck, 2016/01/22
- [Qemu-devel] [PATCH 03/10] s390x/sclp: add device to the sysbus in sclp_realize, Cornelia Huck, 2016/01/22
- [Qemu-devel] [PATCH 05/10] s390x: fix generation of event information crw, Cornelia Huck, 2016/01/22
- [Qemu-devel] [PATCH 08/10] s390x/css: fix control flags during csch, Cornelia Huck, 2016/01/22
- [Qemu-devel] [PATCH 06/10] watchdog: introduction of get_watchdog_action, Cornelia Huck, 2016/01/22
- [Qemu-devel] [PATCH 10/10] s390x: s390_cpu_get_phys_page_debug has to return -1,
Cornelia Huck <=