aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-05-02 10:33:43 -0400
committerAvi Kivity <avi@qumranet.com>2007-07-16 05:05:39 -0400
commit707c08743060b6721b08df68f4fd546b106e7510 (patch)
treef36504b4e1696a36bb63b3bb78edfdf152a59c23 /drivers/kvm
parent33ed6329210f3ad0638306bfa46cd3aaf5a5f929 (diff)
KVM: Move some more msr mangling into vmx_save_host_state()
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm')
-rw-r--r--drivers/kvm/vmx.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 677b38c4444a..93c3abfc1e0a 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -290,6 +290,13 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu)
290 vmcs_writel(HOST_FS_BASE, segment_base(hs->fs_sel)); 290 vmcs_writel(HOST_FS_BASE, segment_base(hs->fs_sel));
291 vmcs_writel(HOST_GS_BASE, segment_base(hs->gs_sel)); 291 vmcs_writel(HOST_GS_BASE, segment_base(hs->gs_sel));
292#endif 292#endif
293
294#ifdef CONFIG_X86_64
295 if (is_long_mode(vcpu)) {
296 save_msrs(vcpu->host_msrs + msr_offset_kernel_gs_base, 1);
297 load_msrs(vcpu->guest_msrs, NR_BAD_MSRS);
298 }
299#endif
293} 300}
294 301
295static void vmx_load_host_state(struct kvm_vcpu *vcpu) 302static void vmx_load_host_state(struct kvm_vcpu *vcpu)
@@ -1903,13 +1910,6 @@ preempted:
1903 if (vcpu->guest_debug.enabled) 1910 if (vcpu->guest_debug.enabled)
1904 kvm_guest_debug_pre(vcpu); 1911 kvm_guest_debug_pre(vcpu);
1905 1912
1906#ifdef CONFIG_X86_64
1907 if (is_long_mode(vcpu)) {
1908 save_msrs(vcpu->host_msrs + msr_offset_kernel_gs_base, 1);
1909 load_msrs(vcpu->guest_msrs, NR_BAD_MSRS);
1910 }
1911#endif
1912
1913again: 1913again:
1914 vmx_save_host_state(vcpu); 1914 vmx_save_host_state(vcpu);
1915 kvm_load_guest_fpu(vcpu); 1915 kvm_load_guest_fpu(vcpu);