linux-stable/arch/x86/kvm/svm
Tom Lendacky 916e3e5f26 KVM: SVM: Do not use user return MSR support for virtualized TSC_AUX
When the TSC_AUX MSR is virtualized, the TSC_AUX value is swap type "B"
within the VMSA. This means that the guest value is loaded on VMRUN and
the host value is restored from the host save area on #VMEXIT.

Since the value is restored on #VMEXIT, the KVM user return MSR support
for TSC_AUX can be replaced by populating the host save area with the
current host value of TSC_AUX. And, since TSC_AUX is not changed by Linux
post-boot, the host save area can be set once in svm_hardware_enable().
This eliminates the two WRMSR instructions associated with the user return
MSR support.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <d381de38eb0ab6c9c93dda8503b72b72546053d7.1694811272.git.thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-09-23 05:35:49 -04:00
..
avic.c KVM: SVM: Set target pCPU during IRTE update if target vCPU is running 2023-08-17 11:32:07 -07:00
hyperv.c KVM: nSVM: hyper-v: Enable L2 TLB flush 2022-11-18 12:59:18 -05:00
hyperv.h KVM: nSVM: hyper-v: Enable L2 TLB flush 2022-11-18 12:59:18 -05:00
nested.c KVM: nSVM: Use KVM-governed feature framework to track "vGIF enabled" 2023-08-17 11:43:31 -07:00
pmu.c KVM: x86/svm/pmu: Add AMD PerfMonV2 support 2023-06-06 17:31:44 -07:00
sev.c KVM: SVM: Fix TSC_AUX virtualization setup 2023-09-23 05:35:49 -04:00
svm.c KVM: SVM: Do not use user return MSR support for virtualized TSC_AUX 2023-09-23 05:35:49 -04:00
svm.h KVM: SVM: Fix TSC_AUX virtualization setup 2023-09-23 05:35:49 -04:00
svm_onhyperv.c KVM: x86: Unify pr_fmt to use module name for all KVM modules 2022-12-29 15:47:35 -05:00
svm_onhyperv.h s390: 2023-05-01 12:06:20 -07:00
svm_ops.h KVM: SVM: restore host save area from assembly 2022-11-09 12:25:33 -05:00
vmenter.S x86/cpu/kvm: Provide UNTRAIN_RET_VM 2023-08-16 21:58:59 +02:00