]> git.karo-electronics.de Git - linux-beck.git/commit
KVM: VMX: Separate saving pre-realmode state from setting segments
authorAvi Kivity <avi@redhat.com>
Tue, 21 Aug 2012 14:06:58 +0000 (17:06 +0300)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 27 Aug 2012 23:02:19 +0000 (20:02 -0300)
commitbaa7e81e325bbb6ddebd7680ac1068859244b61d
tree6112cb18cfe6a8c06bdcaf5f30dbc5f3dfe69f96
parentdd856efafe6097a5c9104725c2bca74430423db8
KVM: VMX: Separate saving pre-realmode state from setting segments

Commit b246dd5df139 ("KVM: VMX: Fix KVM_SET_SREGS with big real mode
segments") moved fix_rmode_seg() to vmx_set_segment(), so that it is
applied not just on transitions to real mode, but also on KVM_SET_SREGS
(migration).  However fix_rmode_seg() not only munges the vmcs segments,
it also sets up the save area for us to restore when returning to
protected mode or to return in vmx_get_segment().

Move saving the segment into a new function, save_rmode_seg(), and
call it just during the transition.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/vmx.c