aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/vmx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 5b6f2a86826b..6d53dc33c0b0 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -7694,9 +7694,10 @@ static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12)
7694 ~VM_ENTRY_IA32E_MODE) | 7694 ~VM_ENTRY_IA32E_MODE) |
7695 (vmcs_config.vmentry_ctrl & ~VM_ENTRY_IA32E_MODE)); 7695 (vmcs_config.vmentry_ctrl & ~VM_ENTRY_IA32E_MODE));
7696 7696
7697 if (vmcs12->vm_entry_controls & VM_ENTRY_LOAD_IA32_PAT) 7697 if (vmcs12->vm_entry_controls & VM_ENTRY_LOAD_IA32_PAT) {
7698 vmcs_write64(GUEST_IA32_PAT, vmcs12->guest_ia32_pat); 7698 vmcs_write64(GUEST_IA32_PAT, vmcs12->guest_ia32_pat);
7699 else if (vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_IA32_PAT) 7699 vcpu->arch.pat = vmcs12->guest_ia32_pat;
7700 } else if (vmcs_config.vmentry_ctrl & VM_ENTRY_LOAD_IA32_PAT)
7700 vmcs_write64(GUEST_IA32_PAT, vmx->vcpu.arch.pat); 7701 vmcs_write64(GUEST_IA32_PAT, vmx->vcpu.arch.pat);
7701 7702
7702 7703
@@ -8217,8 +8218,10 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu,
8217 vmcs_writel(GUEST_IDTR_BASE, vmcs12->host_idtr_base); 8218 vmcs_writel(GUEST_IDTR_BASE, vmcs12->host_idtr_base);
8218 vmcs_writel(GUEST_GDTR_BASE, vmcs12->host_gdtr_base); 8219 vmcs_writel(GUEST_GDTR_BASE, vmcs12->host_gdtr_base);
8219 8220
8220 if (vmcs12->vm_exit_controls & VM_EXIT_LOAD_IA32_PAT) 8221 if (vmcs12->vm_exit_controls & VM_EXIT_LOAD_IA32_PAT) {
8221 vmcs_write64(GUEST_IA32_PAT, vmcs12->host_ia32_pat); 8222 vmcs_write64(GUEST_IA32_PAT, vmcs12->host_ia32_pat);
8223 vcpu->arch.pat = vmcs12->host_ia32_pat;
8224 }
8222 if (vmcs12->vm_exit_controls & VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL) 8225 if (vmcs12->vm_exit_controls & VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL)
8223 vmcs_write64(GUEST_IA32_PERF_GLOBAL_CTRL, 8226 vmcs_write64(GUEST_IA32_PERF_GLOBAL_CTRL,
8224 vmcs12->host_ia32_perf_global_ctrl); 8227 vmcs12->host_ia32_perf_global_ctrl);