diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-04-15 05:29:50 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 05:17:49 -0400 |
commit | 19d04437267f00c7b50343513693b7a3174ff908 (patch) | |
tree | 004f50464c662ee472b03149678bc3ca8af461c8 /arch/x86/kvm/emulate.c | |
parent | 5b7e0102ae744e9175b905f4267a81393bdb7a75 (diff) |
KVM: fix emulator_task_switch() return value.
emulator_task_switch() should return -1 for failure and 0 for success to
the caller, just like x86_emulate_insn() does.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 585d0ef4a5f6..5ac0bb465ed6 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -2453,7 +2453,7 @@ int emulator_task_switch(struct x86_emulate_ctxt *ctxt, | |||
2453 | rc = writeback(ctxt, ops); | 2453 | rc = writeback(ctxt, ops); |
2454 | } | 2454 | } |
2455 | 2455 | ||
2456 | return rc; | 2456 | return (rc == X86EMUL_UNHANDLEABLE) ? -1 : 0; |
2457 | } | 2457 | } |
2458 | 2458 | ||
2459 | static void string_addr_inc(struct x86_emulate_ctxt *ctxt, unsigned long base, | 2459 | static void string_addr_inc(struct x86_emulate_ctxt *ctxt, unsigned long base, |