From: Avi Kivity Date: Tue, 21 Aug 2012 14:06:58 +0000 (+0300) Subject: KVM: VMX: Separate saving pre-realmode state from setting segments X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~15^2~39 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=baa7e81e325bbb6ddebd7680ac1068859244b61d;p=pandora-kernel.git 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 Signed-off-by: Marcelo Tosatti --- Reading git-diff-tree failed