From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 6/9] Completely decode in/out at decoding stage. Date: Sat, 11 Apr 2009 14:08:03 +0300 Message-ID: <49E07A13.6020002@redhat.com> References: <20090405135902.3014.62767.stgit@trex.usersys.redhat.com> <20090405135928.3014.39408.stgit@trex.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx2.redhat.com ([66.187.237.31]:60275 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753678AbZDKLII (ORCPT ); Sat, 11 Apr 2009 07:08:08 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3BB87Ct010573 for ; Sat, 11 Apr 2009 07:08:07 -0400 In-Reply-To: <20090405135928.3014.39408.stgit@trex.usersys.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Gleb Natapov wrote: > Signed-off-by: Gleb Natapov > --- > > arch/x86/kvm/x86_emulate.c | 10 ++++++---- > 1 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c > index 3c23af0..cf27e62 100644 > --- a/arch/x86/kvm/x86_emulate.c > +++ b/arch/x86/kvm/x86_emulate.c > @@ -193,8 +193,10 @@ static u32 opcode_table[256] = { > 0, 0, 0, 0, 0, 0, 0, 0, > /* 0xE0 - 0xE7 */ > 0, 0, 0, 0, > - SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, > - SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, > + SrcNone | ByteOp | SrcImmByte | ImplicitOps, > + SrcNone | SrcImmByte | ImplicitOps, > + SrcNone | ByteOp | SrcImmByte | ImplicitOps, > + SrcNone | SrcImmByte | ImplicitOps, > SrcImmByte sign extends, but you want zero extension here. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.