On Tue, 13 Sep 2011 10:45:40 +0300 Avi Kivity <a...@redhat.com> wrote:
> Simplifies further generalization of decode. > > Signed-off-by: Avi Kivity <a...@redhat.com> > --- > arch/x86/include/asm/kvm_emulate.h | 2 ++ > arch/x86/kvm/emulate.c | 34 +++++++++++++++++----------------- > 2 files changed, 19 insertions(+), 17 deletions(-) > > diff --git a/arch/x86/include/asm/kvm_emulate.h > b/arch/x86/include/asm/kvm_emulate.h > index 6040d11..56bac3e 100644 > --- a/arch/x86/include/asm/kvm_emulate.h > +++ b/arch/x86/include/asm/kvm_emulate.h > @@ -275,6 +275,8 @@ struct x86_emulate_ctxt { > unsigned long _eip; > /* Fields above regs are cleared together. */ > unsigned long regs[NR_VCPU_REGS]; > + struct operand memop; > + struct operand *memopp; > struct fetch_cache fetch; > struct read_cache io_read; > struct read_cache mem_read; Once the emulator context gets stablized, some comments will be nice to know which ones are supposed to be accessed from outside of the emulator, and which ones are only for the emulator internal usage. Practically, knowing each member's lifetime, decode stage only or emulation stage only or throughout the emulation, will make it easy to avoid extra ctxt/regs initialization and ... maybe more. Takuya -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html