diff options
author | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2013-11-28 00:11:44 +0100 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2014-02-11 22:57:12 +1000 |
commit | f606604f1c10b60ef294f1b9b229426521a365e3 (patch) | |
tree | e73b5c2225aa503dffa2cdee565fedf2deb3c23a /target-s390x/helper.c | |
parent | 41701aa4ee11aafebb696c2e778ce0e57bcfc84f (diff) |
exec: Make stq_*_phys input an AddressSpace
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'target-s390x/helper.c')
-rw-r--r-- | target-s390x/helper.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/target-s390x/helper.c b/target-s390x/helper.c index d6afe14a1b..aa537e1bff 100644 --- a/target-s390x/helper.c +++ b/target-s390x/helper.c @@ -138,18 +138,21 @@ static int trans_bits(CPUS390XState *env, uint64_t mode) static void trigger_prot_fault(CPUS390XState *env, target_ulong vaddr, uint64_t mode) { + CPUState *cs = ENV_GET_CPU(env); int ilen = ILEN_LATER_INC; int bits = trans_bits(env, mode) | 4; DPRINTF("%s: vaddr=%016" PRIx64 " bits=%d\n", __func__, vaddr, bits); - stq_phys(env->psa + offsetof(LowCore, trans_exc_code), vaddr | bits); + stq_phys(cs->as, + env->psa + offsetof(LowCore, trans_exc_code), vaddr | bits); trigger_pgm_exception(env, PGM_PROTECTION, ilen); } static void trigger_page_fault(CPUS390XState *env, target_ulong vaddr, uint32_t type, uint64_t asc, int rw) { + CPUState *cs = ENV_GET_CPU(env); int ilen = ILEN_LATER; int bits = trans_bits(env, asc); @@ -160,7 +163,8 @@ static void trigger_page_fault(CPUS390XState *env, target_ulong vaddr, DPRINTF("%s: vaddr=%016" PRIx64 " bits=%d\n", __func__, vaddr, bits); - stq_phys(env->psa + offsetof(LowCore, trans_exc_code), vaddr | bits); + stq_phys(cs->as, + env->psa + offsetof(LowCore, trans_exc_code), vaddr | bits); trigger_pgm_exception(env, type, ilen); } |