Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e680080e authored by Gleb Natapov's avatar Gleb Natapov Committed by Avi Kivity
Browse files

KVM: x86 emulator: fix X86EMUL_RETRY_INSTR and X86EMUL_CMPXCHG_FAILED values



Currently X86EMUL_PROPAGATE_FAULT, X86EMUL_RETRY_INSTR and
X86EMUL_CMPXCHG_FAILED have the same value so caller cannot
distinguish why function such as emulator_cmpxchg_emulated()
(which can return both X86EMUL_PROPAGATE_FAULT and
X86EMUL_CMPXCHG_FAILED) failed.

Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 338dbc97
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -51,8 +51,9 @@ struct x86_emulate_ctxt;
#define X86EMUL_UNHANDLEABLE    1
#define X86EMUL_UNHANDLEABLE    1
/* Terminate emulation but return success to the caller. */
/* Terminate emulation but return success to the caller. */
#define X86EMUL_PROPAGATE_FAULT 2 /* propagate a generated fault to guest */
#define X86EMUL_PROPAGATE_FAULT 2 /* propagate a generated fault to guest */
#define X86EMUL_RETRY_INSTR     2 /* retry the instruction for some reason */
#define X86EMUL_RETRY_INSTR     3 /* retry the instruction for some reason */
#define X86EMUL_CMPXCHG_FAILED  2 /* cmpxchg did not see expected value */
#define X86EMUL_CMPXCHG_FAILED  4 /* cmpxchg did not see expected value */

struct x86_emulate_ops {
struct x86_emulate_ops {
	/*
	/*
	 * read_std: Read bytes of standard (non-emulated/special) memory.
	 * read_std: Read bytes of standard (non-emulated/special) memory.