Received: from eggs.gnu.org ([2001:4830:134:3::10]:51196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlIq9-0004am-JP for qemu-devel@nongnu.org; Mon, 03 Nov 2014 09:42:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlIq0-0002jE-Cv for qemu-devel@nongnu.org; Mon, 03 Nov 2014 09:42:41 -0500 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:55442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlIq0-0002iw-3g for qemu-devel@nongnu.org; Mon, 03 Nov 2014 09:42:32 -0500 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 3 Nov 2014 14:42:30 -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 D48CE2190056 for ; Mon, 3 Nov 2014 14:42:03 +0000 (GMT) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sA3EgSne64946278 for ; Mon, 3 Nov 2014 14:42:28 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sA3EgS4U017928 for ; Mon, 3 Nov 2014 07:42:28 -0700 Date: Mon, 3 Nov 2014 15:42:27 +0100 From: Thomas Huth Message-ID: <20141103154227.796f445a@oc7435384737.ibm.com> In-Reply-To: <1415025034-24918-2-git-send-email-cornelia.huck@de.ibm.com> References: <1415025034-24918-1-git-send-email-cornelia.huck@de.ibm.com> <1415025034-24918-2-git-send-email-cornelia.huck@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] s390x/kvm: Fix opcode decoding for eb instruction handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, Frank Blaschka , qemu-devel@nongnu.org, agraf@suse.de On Mon, 3 Nov 2014 15:30:33 +0100 Cornelia Huck wrote: > 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 > --- > 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); Looks right! Reviewed-by: Thomas Huth