diff options
author | Gleb Natapov <gleb@redhat.com> | 2011-03-28 16:57:49 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-11 07:57:03 -0400 |
commit | a0c0ab2feb9d696978a7475dce4253ec62e98a16 (patch) | |
tree | 1e3be230a2903386a7cf4f55cc4367d9d0f00a01 /arch/x86/kvm | |
parent | 0be839bfb4b12f17fba2d982353b0f674e327f9e (diff) | |
download | op-kernel-dev-a0c0ab2feb9d696978a7475dce4253ec62e98a16.zip op-kernel-dev-a0c0ab2feb9d696978a7475dce4253ec62e98a16.tar.gz |
KVM: x86 emulator: do not open code return values from the emulator
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/emulate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index d88dcfd..ae5f491 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; } |