[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PATCH v2 1/7] s390x/tcg: Use guest_addr_valid() instead of
From: |
David Hildenbrand |
Subject: |
[qemu-s390x] [PATCH v2 1/7] s390x/tcg: Use guest_addr_valid() instead of h2g_valid() in probe_write_access() |
Date: |
Mon, 26 Aug 2019 09:51:06 +0200 |
If I'm not completely wrong, we are dealing with guest addresses here
and not with host addresses. Use the right check.
Fixes: c5a7392cfb96 ("s390x/tcg: Provide probe_write_access helper")
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/mem_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index 91ba2e03d9..7819aca15d 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -2616,7 +2616,7 @@ void probe_write_access(CPUS390XState *env, uint64_t
addr, uint64_t len,
uintptr_t ra)
{
#ifdef CONFIG_USER_ONLY
- if (!h2g_valid(addr) || !h2g_valid(addr + len - 1) ||
+ if (!guest_addr_valid(addr) || !guest_addr_valid(addr + len - 1) ||
page_check_range(addr, len, PAGE_WRITE) < 0) {
s390_program_interrupt(env, PGM_ADDRESSING, ILEN_AUTO, ra);
}
--
2.21.0
- [qemu-s390x] [PATCH v2 0/7] tcg: probe_write() refactorings, David Hildenbrand, 2019/08/26
- [qemu-s390x] [PATCH v2 1/7] s390x/tcg: Use guest_addr_valid() instead of h2g_valid() in probe_write_access(),
David Hildenbrand <=
- [qemu-s390x] [PATCH v2 2/7] s390x/tcg: Fix length calculation in probe_write_access(), David Hildenbrand, 2019/08/26
- [qemu-s390x] [PATCH v2 3/7] tcg: Factor out CONFIG_USER_ONLY probe_write() from s390x code, David Hildenbrand, 2019/08/26
- [qemu-s390x] [PATCH v2 4/7] tcg: Enforce single page access in probe_write(), David Hildenbrand, 2019/08/26
- [qemu-s390x] [PATCH v2 5/7] mips/tcg: Call probe_write() for CONFIG_USER_ONLY as well, David Hildenbrand, 2019/08/26
- [qemu-s390x] [PATCH v2 6/7] hppa/tcg: Call probe_write() also for CONFIG_USER_ONLY, David Hildenbrand, 2019/08/26