mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
Revert "KVM: nVMX: reset cache/shadows when switching loaded VMCS"
This reverts commit9fe573d539which is commitb7031fd40fupstream. It should not have been selected for a stable kernel as it breaks the nVMX regression tests. Reported-by: Jack Wang <jack.wang.usish@gmail.com> Reported-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Jim Mattson <jmattson@google.com> Cc: Sean Christopherson <sean.j.christopherson@intel.com> Cc: Jim Mattson <jmattson@google.com> Cc: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
279bbd2277
commit
1865538d5d
|
|
@ -11013,10 +11013,6 @@ static void vmx_switch_vmcs(struct kvm_vcpu *vcpu, struct loaded_vmcs *vmcs)
|
|||
vmx->loaded_vmcs = vmcs;
|
||||
vmx_vcpu_load(vcpu, cpu);
|
||||
put_cpu();
|
||||
|
||||
vm_entry_controls_reset_shadow(vmx);
|
||||
vm_exit_controls_reset_shadow(vmx);
|
||||
vmx_segment_cache_clear(vmx);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -12706,6 +12702,7 @@ static int enter_vmx_non_root_mode(struct kvm_vcpu *vcpu, u32 *exit_qual)
|
|||
vmx->nested.vmcs01_guest_bndcfgs = vmcs_read64(GUEST_BNDCFGS);
|
||||
|
||||
vmx_switch_vmcs(vcpu, &vmx->nested.vmcs02);
|
||||
vmx_segment_cache_clear(vmx);
|
||||
|
||||
if (vmcs12->cpu_based_vm_exec_control & CPU_BASED_USE_TSC_OFFSETING)
|
||||
vcpu->arch.tsc_offset += vmcs12->tsc_offset;
|
||||
|
|
@ -13529,6 +13526,9 @@ static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
|
|||
}
|
||||
|
||||
vmx_switch_vmcs(vcpu, &vmx->vmcs01);
|
||||
vm_entry_controls_reset_shadow(vmx);
|
||||
vm_exit_controls_reset_shadow(vmx);
|
||||
vmx_segment_cache_clear(vmx);
|
||||
|
||||
/* Update any VMCS fields that might have changed while L2 ran */
|
||||
vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, vmx->msr_autoload.host.nr);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user