aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-04-15 12:29:50 +0300
committerAvi Kivity <avi@redhat.com>2010-05-17 12:17:49 +0300
commit19d04437267f00c7b50343513693b7a3174ff908 (patch)
tree004f50464c662ee472b03149678bc3ca8af461c8 /arch/x86/kvm/emulate.c
parentKVM: MMU: Replace role.glevels with role.cr4_pae (diff)
downloadlinux-dev-19d04437267f00c7b50343513693b7a3174ff908.tar.xz
linux-dev-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.c2
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,