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

Commit b6744dc3 authored by Avi Kivity's avatar Avi Kivity Committed by Marcelo Tosatti
Browse files

KVM: x86 emulator: introduce NoWrite flag



Instead of disabling writeback via OP_NONE, just specify NoWrite.

Acked-by: default avatarGleb Natapov <gleb@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi.kivity@gmail.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent b7d491e7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@
#define Unaligned   ((u64)1 << 42)  /* Explicitly unaligned (e.g. MOVDQU) */
#define Avx         ((u64)1 << 43)  /* Advanced Vector Extensions */
#define Fastop      ((u64)1 << 44)  /* Use opcode::u.fastop */
#define NoWrite     ((u64)1 << 45)  /* No writeback */

#define X2(x...) x, x
#define X3(x...) X2(x), x
@@ -1633,6 +1634,9 @@ static int writeback(struct x86_emulate_ctxt *ctxt)
{
	int rc;

	if (ctxt->d & NoWrite)
		return X86EMUL_CONTINUE;

	switch (ctxt->dst.type) {
	case OP_REG:
		write_register_operand(&ctxt->dst);