From: Takuya Yoshikawa Subject: Re: [PATCH 0/4] KVM: x86 emulator: Split decoder into separate functions Date: Tue, 24 Apr 2012 23:41:33 +0900 Message-ID: <20120424234133.b6d5b6a96d7e9ff4ddb066dc@gmail.com> References: <20120424003159.4fd245ec18b0b3eeddbea553@gmail.com> <4F96B4AA.8030204@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org, yoshikawa.takuya@oss.ntt.co.jp To: Avi Kivity Return-path: Received: from mail-pz0-f51.google.com ([209.85.210.51]:41540 "EHLO mail-pz0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755103Ab2DXOlh (ORCPT ); Tue, 24 Apr 2012 10:41:37 -0400 Received: by dadz8 with SMTP id z8so1006776dad.10 for ; Tue, 24 Apr 2012 07:41:37 -0700 (PDT) In-Reply-To: <4F96B4AA.8030204@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 24 Apr 2012 17:11:54 +0300 Avi Kivity wrote: > On 04/23/2012 06:31 PM, Takuya Yoshikawa wrote: > > Takuya Yoshikawa (4): > > KVM: x86 emulator: Introduce ctxt->op_prefix for 0x66 prefix > > KVM: x86 emulator: Make prefix decoding a separate function > > KVM: x86 emulator: Make opcode decoding a separate function > > > > I don't see the benefit for the first three patches. They add more > state, and don't encourage any reuse. The current code is complicated, > but just splitting it doesn't really fix that. I thought up these when some people tried to use some opcode/prefix bytes in wrong stages. Although I personally like splitting a long function into named sub-functions, it's just a matter of taste. OK, then I will focus on modrm fetching. Thanks, Takuya