diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-10-01 10:16:05 -0700 |
---|---|---|
committer | David Hildenbrand <david@redhat.com> | 2019-10-09 12:49:01 +0200 |
commit | ce7ac79d28edd72ee4ada624a709706b9ff312f8 (patch) | |
tree | 56624635744c505133ba47b9723ac9187cda0f29 /target/s390x/mem_helper.c | |
parent | c7363b28ffd2008dab09ffe7077e84f090cc80d0 (diff) | |
download | qemu-ce7ac79d28edd72ee4ada624a709706b9ff312f8.zip qemu-ce7ac79d28edd72ee4ada624a709706b9ff312f8.tar.gz qemu-ce7ac79d28edd72ee4ada624a709706b9ff312f8.tar.bz2 |
target/s390x: Return exception from mmu_translate
Do not raise the exception directly within mmu_translate,
but pass it back so that caller may do so.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20191001171614.8405-10-richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'target/s390x/mem_helper.c')
-rw-r--r-- | target/s390x/mem_helper.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 7d2a652..e15aa29 100644 --- a/target/s390x/mem_helper.c +++ b/target/s390x/mem_helper.c @@ -2364,8 +2364,8 @@ uint64_t HELPER(lra)(CPUS390XState *env, uint64_t addr) CPUState *cs = env_cpu(env); uint32_t cc = 0; uint64_t asc = env->psw.mask & PSW_MASK_ASC; - uint64_t ret; - int old_exc, flags; + uint64_t ret, tec; + int old_exc, flags, exc; /* XXX incomplete - has more corner cases */ if (!(env->psw.mask & PSW_MASK_64) && (addr >> 32)) { @@ -2373,7 +2373,14 @@ uint64_t HELPER(lra)(CPUS390XState *env, uint64_t addr) } old_exc = cs->exception_index; - if (mmu_translate(env, addr, 0, asc, &ret, &flags, true)) { + exc = mmu_translate(env, addr, 0, asc, &ret, &flags, &tec); + if (exc) { + /* + * We don't care about ILEN or TEC, as we're not going to + * deliver the exception -- thus resetting exception_index below. + * TODO: clean this up. + */ + trigger_pgm_exception(env, exc, ILEN_UNWIND); cc = 3; } if (cs->exception_index == EXCP_PGM) { |