summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm/svm.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-14 22:22:31 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-14 22:22:31 +0200
commitbbb9e06d2c6435af9c62074ad7048910eeb2e7bc (patch)
tree17d152543a602d65c749efaaaaafde24d5fec46c /arch/x86/kvm/svm/svm.c
parentUSB: gadget: f_mass_storage: Fix unused variable warning (diff)
parentLinux 6.5-rc6 (diff)
downloadlinux-bbb9e06d2c6435af9c62074ad7048910eeb2e7bc.tar.xz
linux-bbb9e06d2c6435af9c62074ad7048910eeb2e7bc.zip
Merge 6.5-rc6 into usb-next
We need the USB and Thunderbolt fixes in here to build on. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/kvm/svm/svm.c')
-rw-r--r--arch/x86/kvm/svm/svm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 956726d867aa..03e852dedcc1 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -1498,7 +1498,9 @@ static void svm_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
if (sd->current_vmcb != svm->vmcb) {
sd->current_vmcb = svm->vmcb;
- indirect_branch_prediction_barrier();
+
+ if (!cpu_feature_enabled(X86_FEATURE_IBPB_ON_VMEXIT))
+ indirect_branch_prediction_barrier();
}
if (kvm_vcpu_apicv_active(vcpu))
avic_vcpu_load(vcpu, cpu);