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>
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user