Skip to content

Commit

Permalink
KVM: x86: Do not push eflags.vm on pushf
Browse files Browse the repository at this point in the history
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: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Nadav Amit authored and Paolo Bonzini committed Dec 10, 2014
1 parent 53bb4f7 commit bc397a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit bc397a6

Please sign in to comment.