diff options
author | 2014-12-10 11:19:03 +0200 | |
---|---|---|
committer | 2014-12-10 12:51:28 +0100 | |
commit | bc397a6c914c75d8ae21dad23eba9ae82e34dad3 (patch) | |
tree | 0b7f8fdc82a3a2c084fb618317c96ba91be0f3ce /arch/x86 | |
parent | KVM: x86: Remove prefix flag when GP macro is used (diff) | |
download | linux-bc397a6c914c75d8ae21dad23eba9ae82e34dad3.tar.gz linux-bc397a6c914c75d8ae21dad23eba9ae82e34dad3.tar.bz2 linux-bc397a6c914c75d8ae21dad23eba9ae82e34dad3.zip |
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/emulate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index b4f4201c32c9..c1e71873e0c7 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -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); } |