diff options
author | Gleb Natapov <gleb@redhat.com> | 2011-03-28 10:57:49 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-05-11 07:57:03 -0400 |
commit | a0c0ab2feb9d696978a7475dce4253ec62e98a16 (patch) | |
tree | 1e3be230a2903386a7cf4f55cc4367d9d0f00a01 /arch/x86/kvm/emulate.c | |
parent | 0be839bfb4b12f17fba2d982353b0f674e327f9e (diff) |
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/emulate.c')
-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 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, | |||
2287 | ctxt->eip = c->eip; | 2287 | ctxt->eip = c->eip; |
2288 | } | 2288 | } |
2289 | 2289 | ||
2290 | return (rc == X86EMUL_UNHANDLEABLE) ? -1 : 0; | 2290 | return (rc == X86EMUL_UNHANDLEABLE) ? EMULATION_FAILED : EMULATION_OK; |
2291 | } | 2291 | } |
2292 | 2292 | ||
2293 | static void string_addr_inc(struct x86_emulate_ctxt *ctxt, unsigned seg, | 2293 | static void string_addr_inc(struct x86_emulate_ctxt *ctxt, unsigned seg, |
@@ -3333,7 +3333,7 @@ done_prefixes: | |||
3333 | } | 3333 | } |
3334 | 3334 | ||
3335 | done: | 3335 | done: |
3336 | return (rc == X86EMUL_UNHANDLEABLE) ? -1 : 0; | 3336 | return (rc == X86EMUL_UNHANDLEABLE) ? EMULATION_FAILED : EMULATION_OK; |
3337 | } | 3337 | } |
3338 | 3338 | ||
3339 | static bool string_insn_completed(struct x86_emulate_ctxt *ctxt) | 3339 | static bool string_insn_completed(struct x86_emulate_ctxt *ctxt) |
@@ -4163,5 +4163,5 @@ twobyte_insn: | |||
4163 | goto writeback; | 4163 | goto writeback; |
4164 | 4164 | ||
4165 | cannot_emulate: | 4165 | cannot_emulate: |
4166 | return -1; | 4166 | return EMULATION_FAILED; |
4167 | } | 4167 | } |