From: Avi Kivity Date: Thu, 8 Apr 2010 15:19:35 +0000 (+0300) Subject: KVM: VMX: Save/restore rflags.vm correctly in real mode X-Git-Tag: v2.6.34-rc6~78^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78ac8b47c566dd6177a3b9b291b756ccb70670b7;p=pandora-kernel.git KVM: VMX: Save/restore rflags.vm correctly in real mode 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 Signed-off-by: Marcelo Tosatti --- Reading git-diff-tree failed