Re: [PATCH 0/4] KVM: x86 emulator: Split decoder into separate functions

Takuya Yoshikawa
2012-04-24T14:41:37Z

On Tue, 24 Apr 2012 17:11:54 +0300
Avi Kivity <avi@redhat.com> 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