diff options
author | Avi Kivity <avi@redhat.com> | 2010-04-08 18:19:35 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-26 07:48:05 -0700 |
commit | 01b0fb7b85b4b8a3027e5cc7663ae8b2193b1104 (patch) | |
tree | d3ceb1eb0b57c4a68f280c0d051c9ca05e573be4 /lib/string_helpers.c | |
parent | ec861e75183fa0049917cbfa44d8a17e7ece7b4f (diff) |
KVM: VMX: Save/restore rflags.vm correctly in real mode
(Cherry-picked from commit 78ac8b47c566dd6177a3b9b291b756ccb70670b7)
Currently we set eflags.vm unconditionally when entering real mode emulation
through virtual-8086 mode, and clear it unconditionally when we enter protected
mode. The means that the following sequence
KVM_SET_REGS (rflags.vm=1)
KVM_SET_SREGS (cr0.pe=1)
Ends up with rflags.vm clear due to KVM_SET_SREGS triggering enter_pmode().
Fix by shadowing rflags.vm (and rflags.iopl) correctly while in real mode:
reads and writes to those bits access a shadow register instead of the actual
register.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions