mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-06 01:29:24 +07:00
KVM: Move some more msr mangling into vmx_save_host_state()
Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
parent
33ed632921
commit
707c087430
@ -290,6 +290,13 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu)
|
|||||||
vmcs_writel(HOST_FS_BASE, segment_base(hs->fs_sel));
|
vmcs_writel(HOST_FS_BASE, segment_base(hs->fs_sel));
|
||||||
vmcs_writel(HOST_GS_BASE, segment_base(hs->gs_sel));
|
vmcs_writel(HOST_GS_BASE, segment_base(hs->gs_sel));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_64
|
||||||
|
if (is_long_mode(vcpu)) {
|
||||||
|
save_msrs(vcpu->host_msrs + msr_offset_kernel_gs_base, 1);
|
||||||
|
load_msrs(vcpu->guest_msrs, NR_BAD_MSRS);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vmx_load_host_state(struct kvm_vcpu *vcpu)
|
static void vmx_load_host_state(struct kvm_vcpu *vcpu)
|
||||||
@ -1903,13 +1910,6 @@ static int vmx_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
|
|||||||
if (vcpu->guest_debug.enabled)
|
if (vcpu->guest_debug.enabled)
|
||||||
kvm_guest_debug_pre(vcpu);
|
kvm_guest_debug_pre(vcpu);
|
||||||
|
|
||||||
#ifdef CONFIG_X86_64
|
|
||||||
if (is_long_mode(vcpu)) {
|
|
||||||
save_msrs(vcpu->host_msrs + msr_offset_kernel_gs_base, 1);
|
|
||||||
load_msrs(vcpu->guest_msrs, NR_BAD_MSRS);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
again:
|
again:
|
||||||
vmx_save_host_state(vcpu);
|
vmx_save_host_state(vcpu);
|
||||||
kvm_load_guest_fpu(vcpu);
|
kvm_load_guest_fpu(vcpu);
|
||||||
|
Loading…
Reference in New Issue
Block a user