diff options
author | Kim Phillips <kim.phillips@amd.com> | 2023-01-24 10:33:19 -0600 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2023-01-25 17:21:40 +0100 |
commit | 8c19b6f257fa71ed3a7a9df6ce466c6be31ca04c (patch) | |
tree | 96793126145310ca3a474b9032e63c3c0495edd8 /arch/x86/kvm/svm | |
parent | e7862eda309ecfccc36bb5558d937ed3ace07f3f (diff) | |
download | linux-8c19b6f257fa71ed3a7a9df6ce466c6be31ca04c.tar.gz linux-8c19b6f257fa71ed3a7a9df6ce466c6be31ca04c.tar.bz2 linux-8c19b6f257fa71ed3a7a9df6ce466c6be31ca04c.zip |
KVM: x86: Propagate the AMD Automatic IBRS feature to the guest
Add the AMD Automatic IBRS feature bit to those being propagated to the guest,
and enable the guest EFER bit.
Signed-off-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20230124163319.2277355-9-kim.phillips@amd.com
Diffstat (limited to 'arch/x86/kvm/svm')
-rw-r--r-- | arch/x86/kvm/svm/svm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 9a194aa1a75a..60c7c880266b 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -4969,6 +4969,9 @@ static __init int svm_hardware_setup(void) tsc_aux_uret_slot = kvm_add_user_return_msr(MSR_TSC_AUX); + if (boot_cpu_has(X86_FEATURE_AUTOIBRS)) + kvm_enable_efer_bits(EFER_AUTOIBRS); + /* Check for pause filtering support */ if (!boot_cpu_has(X86_FEATURE_PAUSEFILTER)) { pause_filter_count = 0; |