Commit 2923fc7
committed
x86/bugs: KVM: Add support for SRSO_MSR_FIX
JIRA: https://issues.redhat.com/browse/RHEL-80398
Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
commit 8442df2
Author: Borislav Petkov <bp@alien8.de>
Date: Tue, 18 Feb 2025 12:13:33 +0100
x86/bugs: KVM: Add support for SRSO_MSR_FIX
Add support for
CPUID Fn8000_0021_EAX[31] (SRSO_MSR_FIX). If this bit is 1, it
indicates that software may use MSR BP_CFG[BpSpecReduce] to mitigate
SRSO.
Enable BpSpecReduce to mitigate SRSO across guest/host boundaries.
Switch back to enabling the bit when virtualization is enabled and to
clear the bit when virtualization is disabled because using a MSR slot
would clear the bit when the guest is exited and any training the guest
has done, would potentially influence the host kernel when execution
enters the kernel and hasn't VMRUN the guest yet.
More detail on the public thread in Link below.
Co-developed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20241202120416.6054-1-bp@kernel.org
Signed-off-by: Waiman Long <longman@redhat.com>1 parent 9ffd198 commit 2923fc7
File tree
6 files changed
+46
-4
lines changed- Documentation/admin-guide/hw-vuln
- arch/x86
- include/asm
- kernel/cpu
- kvm/svm
- lib
6 files changed
+46
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
108 | 121 | | |
109 | 122 | | |
110 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
468 | 472 | | |
469 | 473 | | |
470 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
717 | 717 | | |
718 | 718 | | |
719 | 719 | | |
| 720 | + | |
720 | 721 | | |
721 | 722 | | |
722 | 723 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2522 | 2522 | | |
2523 | 2523 | | |
2524 | 2524 | | |
| 2525 | + | |
2525 | 2526 | | |
2526 | 2527 | | |
2527 | 2528 | | |
| |||
2539 | 2540 | | |
2540 | 2541 | | |
2541 | 2542 | | |
2542 | | - | |
| 2543 | + | |
| 2544 | + | |
2543 | 2545 | | |
2544 | 2546 | | |
2545 | 2547 | | |
| |||
2578 | 2580 | | |
2579 | 2581 | | |
2580 | 2582 | | |
2581 | | - | |
| 2583 | + | |
2582 | 2584 | | |
2583 | 2585 | | |
2584 | 2586 | | |
| |||
2590 | 2592 | | |
2591 | 2593 | | |
2592 | 2594 | | |
2593 | | - | |
| 2595 | + | |
2594 | 2596 | | |
2595 | 2597 | | |
2596 | 2598 | | |
| |||
2670 | 2672 | | |
2671 | 2673 | | |
2672 | 2674 | | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
2673 | 2681 | | |
2674 | 2682 | | |
2675 | 2683 | | |
| |||
2691 | 2699 | | |
2692 | 2700 | | |
2693 | 2701 | | |
2694 | | - | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
2695 | 2711 | | |
2696 | 2712 | | |
2697 | 2713 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
611 | 614 | | |
612 | 615 | | |
613 | 616 | | |
| |||
685 | 688 | | |
686 | 689 | | |
687 | 690 | | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
688 | 694 | | |
689 | 695 | | |
690 | 696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| |||
0 commit comments