summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-09-13 15:24:04 +0200
committerCornelia Huck <cohuck@redhat.com>2017-09-19 18:31:31 +0200
commit525f4b65c7d337f0c83488ee1e951a134b6ccfb7 (patch)
treee00be1b873a71daf4c22db6f27d976126b33f97d /target
parent53d8e91d64ce2655f5945db2fe4c1ac7e00957a0 (diff)
downloadqemu-525f4b65c7d337f0c83488ee1e951a134b6ccfb7.zip
target/s390x: use trigger_pgm_exception() in s390_cpu_handle_mmu_fault()
This looks cleaner. linux-user will not use the ilen field, so setting it doesn't do any harm. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170913132417.24384-10-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/s390x/excp_helper.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c
index 361f970db3..14d3160e92 100644
--- a/target/s390x/excp_helper.c
+++ b/target/s390x/excp_helper.c
@@ -59,8 +59,7 @@ int s390_cpu_handle_mmu_fault(CPUState *cs, vaddr address,
{
S390CPU *cpu = S390_CPU(cs);
- cs->exception_index = EXCP_PGM;
- cpu->env.int_pgm_code = PGM_ADDRESSING;
+ trigger_pgm_exception(&cpu->env, PGM_ADDRESSING, ILEN_AUTO);
/* On real machines this value is dropped into LowMem. Since this
is userland, simply put this someplace that cpu_loop can find it. */
cpu->env.__excp_addr = address;