Quellcode durchsuchen

KVM: x86 emulator: fix popf emulation

Set operand type and size to get correct writeback behavior.

Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity vor 16 Jahren
Ursprung
Commit
2b48cc75b2
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  1. 2 0
      arch/x86/kvm/x86_emulate.c

+ 2 - 0
arch/x86/kvm/x86_emulate.c

@@ -1552,7 +1552,9 @@ special_insn:
 		emulate_push(ctxt);
 		break;
 	case 0x9d: /* popf */
+		c->dst.type = OP_REG;
 		c->dst.ptr = (unsigned long *) &ctxt->eflags;
+		c->dst.bytes = c->op_bytes;
 		goto pop_instruction;
 	case 0xa0 ... 0xa1:	/* mov */
 		c->dst.ptr = (unsigned long *)&c->regs[VCPU_REGS_RAX];