mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-21 18:14:48 +08:00
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: Nadav Amit <namit@cs.technion.ac.il> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
53bb4f789a
commit
bc397a6c91
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user