From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4Aqp-00070L-A0 for qemu-devel@nongnu.org; Tue, 30 Jul 2013 10:24:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4Aqg-0007vV-Cw for qemu-devel@nongnu.org; Tue, 30 Jul 2013 10:24:35 -0400 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:39175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4ApH-0007Wz-HW for qemu-devel@nongnu.org; Tue, 30 Jul 2013 10:22:59 -0400 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Jul 2013 15:17:13 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id B71D917D8058 for ; Tue, 30 Jul 2013 15:24:38 +0100 (BST) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6UEMhq063307880 for ; Tue, 30 Jul 2013 14:22:43 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r6UEMsUm021066 for ; Tue, 30 Jul 2013 08:22:54 -0600 From: Christian Borntraeger Date: Tue, 30 Jul 2013 16:23:10 +0200 Message-Id: <1375194195-64390-4-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1375194195-64390-1-git-send-email-borntraeger@de.ibm.com> References: <1375194195-64390-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PATCH 3/8] s390x/ioinst: Throw addressing exception when memory_map failed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: Thomas Huth , qemu-devel Developers , Alexander Graf , Christian Borntraeger , Jens Freimann , cornelia.huck@de.ibm.com From: Thomas Huth So far, the IO instructions were throwing specification exceptions when there was a problem with accessing the memory. However, the better way is to throw an addressing exception instead. Signed-off-by: Thomas Huth Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger --- target-s390x/ioinst.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/target-s390x/ioinst.c b/target-s390x/ioinst.c index 91cc41b..0dc258f 100644 --- a/target-s390x/ioinst.c +++ b/target-s390x/ioinst.c @@ -163,7 +163,7 @@ int ioinst_handle_msch(CPUS390XState *env, uint64_t reg1, uint32_t ipb) } schib = s390_cpu_physical_memory_map(env, addr, &len, 0); if (!schib || len != sizeof(*schib)) { - program_interrupt(env, PGM_SPECIFICATION, 2); + program_interrupt(env, PGM_ADDRESSING, 2); cc = -EIO; goto out; } @@ -238,7 +238,7 @@ int ioinst_handle_ssch(CPUS390XState *env, uint64_t reg1, uint32_t ipb) } orig_orb = s390_cpu_physical_memory_map(env, addr, &len, 0); if (!orig_orb || len != sizeof(*orig_orb)) { - program_interrupt(env, PGM_SPECIFICATION, 2); + program_interrupt(env, PGM_ADDRESSING, 2); cc = -EIO; goto out; } @@ -286,7 +286,7 @@ int ioinst_handle_stcrw(CPUS390XState *env, uint32_t ipb) } crw = s390_cpu_physical_memory_map(env, addr, &len, 1); if (!crw || len != sizeof(*crw)) { - program_interrupt(env, PGM_SPECIFICATION, 2); + program_interrupt(env, PGM_ADDRESSING, 2); cc = -EIO; goto out; } @@ -318,7 +318,7 @@ int ioinst_handle_stsch(CPUS390XState *env, uint64_t reg1, uint32_t ipb) } schib = s390_cpu_physical_memory_map(env, addr, &len, 1); if (!schib || len != sizeof(*schib)) { - program_interrupt(env, PGM_SPECIFICATION, 2); + program_interrupt(env, PGM_ADDRESSING, 2); cc = -EIO; goto out; } @@ -367,7 +367,7 @@ int ioinst_handle_tsch(CPUS390XState *env, uint64_t reg1, uint32_t ipb) } irb = s390_cpu_physical_memory_map(env, addr, &len, 1); if (!irb || len != sizeof(*irb)) { - program_interrupt(env, PGM_SPECIFICATION, 2); + program_interrupt(env, PGM_ADDRESSING, 2); cc = -EIO; goto out; } @@ -600,7 +600,7 @@ int ioinst_handle_chsc(CPUS390XState *env, uint32_t ipb) } req = s390_cpu_physical_memory_map(env, addr, &map_size, 1); if (!req || map_size != TARGET_PAGE_SIZE) { - program_interrupt(env, PGM_SPECIFICATION, 2); + program_interrupt(env, PGM_ADDRESSING, 2); ret = -EIO; goto out; } @@ -655,7 +655,7 @@ int ioinst_handle_tpi(CPUS390XState *env, uint32_t ipb) orig_len = len; int_code = s390_cpu_physical_memory_map(env, addr, &len, 1); if (!int_code || (len != orig_len)) { - program_interrupt(env, PGM_SPECIFICATION, 2); + program_interrupt(env, PGM_ADDRESSING, 2); ret = -EIO; goto out; } -- 1.8.3.1