KVM: x86 emulator: Fix popf emulation
authorGleb Natapov <gleb@redhat.com>
Wed, 10 Feb 2010 12:21:34 +0000 (14:21 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 1 Mar 2010 15:36:11 +0000 (12:36 -0300)
commitd4c6a1549c056f1d817e8f6f2f97d8b44933472f
tree0187b92c17284b598934fcdc147b08e4f71c9708
parentf850e2e603bf5a05b0aee7901857cf85715aa694
KVM: x86 emulator: Fix popf emulation

POPF behaves differently depending on current CPU mode. Emulate correct
logic to prevent guest from changing flags that it can't change otherwise.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/emulate.c