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

Commit bc397a6c authored by Nadav Amit's avatar Nadav Amit Committed by Paolo Bonzini
Browse files

KVM: x86: Do not push eflags.vm on pushf



The pushf instruction does not push eflags.VM, so emulation should not do so as
well.  Although eflags.RF should not be pushed as well, it is already cleared
by the time pushf is executed.

Signed-off-by: default avatarNadav Amit <namit@cs.technion.ac.il>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 53bb4f78
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1861,7 +1861,7 @@ static int em_pusha(struct x86_emulate_ctxt *ctxt)

static int em_pushf(struct x86_emulate_ctxt *ctxt)
{
	ctxt->src.val =  (unsigned long)ctxt->eflags;
	ctxt->src.val = (unsigned long)ctxt->eflags & ~EFLG_VM;
	return em_push(ctxt);
}