From: Gleb Natapov Date: Mon, 28 Mar 2011 14:57:49 +0000 (+0200) Subject: KVM: x86 emulator: do not open code return values from the emulator X-Git-Tag: MMI-PSA29.97-13-9~19664^2~92 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a0c0ab2feb9d696978a7475dce4253ec62e98a16;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git KVM: x86 emulator: do not open code return values from the emulator Signed-off-by: Gleb Natapov Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index d88dcfd66a8f..ae5f49105c3b 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2287,7 +2287,7 @@ int emulator_task_switch(struct x86_emulate_ctxt *ctxt, ctxt->eip = c->eip; } - return (rc == X86EMUL_UNHANDLEABLE) ? -1 : 0; + return (rc == X86EMUL_UNHANDLEABLE) ? EMULATION_FAILED : EMULATION_OK; } static void string_addr_inc(struct x86_emulate_ctxt *ctxt, unsigned seg, @@ -3333,7 +3333,7 @@ done_prefixes: } done: - return (rc == X86EMUL_UNHANDLEABLE) ? -1 : 0; + return (rc == X86EMUL_UNHANDLEABLE) ? EMULATION_FAILED : EMULATION_OK; } static bool string_insn_completed(struct x86_emulate_ctxt *ctxt) @@ -4163,5 +4163,5 @@ twobyte_insn: goto writeback; cannot_emulate: - return -1; + return EMULATION_FAILED; }