diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-04-15 11:29:50 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 11:17:49 +0200 |
commit | 19d04437267f00c7b50343513693b7a3174ff908 (patch) | |
tree | 004f50464c662ee472b03149678bc3ca8af461c8 /arch/x86/kvm/emulate.c | |
parent | KVM: MMU: Replace role.glevels with role.cr4_pae (diff) | |
download | linux-19d04437267f00c7b50343513693b7a3174ff908.tar.xz linux-19d04437267f00c7b50343513693b7a3174ff908.zip |
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, rc = writeback(ctxt, ops); } - return rc; + return (rc == X86EMUL_UNHANDLEABLE) ? -1 : 0; } static void string_addr_inc(struct x86_emulate_ctxt *ctxt, unsigned long base, |