diff options
author | David Hildenbrand <david@redhat.com> | 2019-03-07 13:15:34 +0100 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2019-03-11 09:31:01 +0100 |
commit | c5a7392cfb965f70cff72155945a81ad62dd20a5 (patch) | |
tree | be7196789327ad812cd4458cdd7b15e49a4487a5 /target/s390x/internal.h | |
parent | a2338cfb07536c1d3c19ab9b698cb9c3e2a58ea2 (diff) |
s390x/tcg: Provide probe_write_access helper
Instead of checking e.g. the first access on every touched page, we should
check the actual access, otherwise we might get false positives when Low
Address Protection (LAP) is active. As probe_write() can only deal with
accesses to one page, we have to loop.
Use i64 for the length, although not needed - easier to reuse
TCG temps we already have in the translation functions where this will
be used. Also allow it to be used from other helpers.
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20190307121539.12842-28-david@redhat.com>
[CH: add missing page_check_range()]
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/internal.h')
-rw-r--r-- | target/s390x/internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/s390x/internal.h b/target/s390x/internal.h index 07b69b8ea0..3b4855c175 100644 --- a/target/s390x/internal.h +++ b/target/s390x/internal.h @@ -349,6 +349,8 @@ void ioinst_handle_sal(S390CPU *cpu, uint64_t reg1, uintptr_t ra); /* mem_helper.c */ target_ulong mmu_real2abs(CPUS390XState *env, target_ulong raddr); +void probe_write_access(CPUS390XState *env, uint64_t addr, uint64_t len, + uintptr_t ra); /* mmu_helper.c */ |