On Wed, 14 Sep 2011 14:37:21 +0300 Avi Kivity <avi@xxxxxxxxxx> wrote: > > 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. > > > > Nothing should be accessed from outside the emulator, except via > accessors. We should move initialization to the emulator as well (or > just initialize from x86_decode_insn() - any reason not to?) Not big reason but kvm_inject_realmode_interrupt() and kvm_task_switch() call emulate_int_real() and emulator_task_switch() respectively without doing generic decoding. So at least, we need some special initialization for them if we move init_emulate_ctxt() into x86_decode_insn(). Takuya -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html