On Tue, Aug 24, 2010 at 04:41:10PM +0300, Avi Kivity wrote: > On 08/24/2010 04:37 PM, Gleb Natapov wrote: > >On Tue, Aug 24, 2010 at 04:13:38PM +0300, Avi Kivity wrote: > >> On 08/24/2010 02:30 PM, Gleb Natapov wrote: > >>>x86_emulate_insn() will return 1 if instruction can be restarted > >>>without re-entering a guest. > >>> > >>So now we have an undocumented -1/0/1 return code? > >> > >>Better to have an enum for this. > >> > >We already have two. First is X86EMUL_ (not enum but close) for > >more or less internal emulator use. Second is EMULATE_* for users of > >emulate_instruction() now you want one more enum for communication > >between emulate_instruction() and x86_emulate_insn(). Lost in enums. > >emulate_instruction() and x86_emulate_insn() are tightly coupled right > >now should we define formal interface between them? May be comment will > >be enough? > > Can we reuse one or the other? Perhaps with extensions? > We can, of course. But for me it looks as arbitrary as -1/0/1 since not all enum values have meanings to the caller. -- Gleb. -- 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