From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xm2p7-0004AF-91 for qemu-devel@nongnu.org; Wed, 05 Nov 2014 10:48:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xm2oy-0001fZ-8f for qemu-devel@nongnu.org; Wed, 05 Nov 2014 10:48:41 -0500 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:60967) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xm2ox-0001fL-T0 for qemu-devel@nongnu.org; Wed, 05 Nov 2014 10:48:32 -0500 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 5 Nov 2014 15:48:31 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 851622190046 for ; Wed, 5 Nov 2014 15:48:02 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sA5FmRDk8520000 for ; Wed, 5 Nov 2014 15:48:27 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sA5FmP7Y014649 for ; Wed, 5 Nov 2014 08:48:27 -0700 From: Cornelia Huck Date: Wed, 5 Nov 2014 16:48:12 +0100 Message-Id: <1415202496-27190-2-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1415202496-27190-1-git-send-email-cornelia.huck@de.ibm.com> References: <1415202496-27190-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PULL 1/5] s390x/kvm: Fix opcode decoding for eb instruction handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: Frank Blaschka , qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, Cornelia Huck From: Frank Blaschka The second byte of the opcode is encoded in the lowest byte of the ipb field, not the lowest byte of the ipa field. Signed-off-by: Frank Blaschka Signed-off-by: Cornelia Huck Reviewed-by: Thomas Huth --- target-s390x/kvm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 5b10a25..690cb71 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -827,18 +827,18 @@ static int handle_b9(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1) return r; } -static int handle_eb(S390CPU *cpu, struct kvm_run *run, uint8_t ipa1) +static int handle_eb(S390CPU *cpu, struct kvm_run *run, uint8_t ipbl) { int r = 0; - switch (ipa1) { + switch (ipbl) { case PRIV_EB_SQBS: /* just inject exception */ r = -1; break; default: r = -1; - DPRINTF("KVM: unhandled PRIV: 0xeb%x\n", ipa1); + DPRINTF("KVM: unhandled PRIV: 0xeb%x\n", ipbl); break; } @@ -1039,7 +1039,7 @@ static int handle_instruction(S390CPU *cpu, struct kvm_run *run) r = handle_b9(cpu, run, ipa1); break; case IPA0_EB: - r = handle_eb(cpu, run, ipa1); + r = handle_eb(cpu, run, run->s390_sieic.ipb & 0xff); break; case IPA0_DIAG: r = handle_diag(cpu, run, run->s390_sieic.ipb); -- 1.7.9.5