diff options
| author | Amit Shah <[email protected]> | 2024-08-07 12:35:31 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2024-09-10 17:27:53 +0000 |
| commit | 4440337af4d415c8abf8b9b0e10c79b7518e6e3c (patch) | |
| tree | 807619e193e4acffa6fe526eb2966527b27a042f /lib/crypto/mpi/mpi-mul.c | |
| parent | KVM: SVM: Track the per-CPU host save area as a VMCB pointer (diff) | |
| download | kernel-4440337af4d415c8abf8b9b0e10c79b7518e6e3c.tar.gz kernel-4440337af4d415c8abf8b9b0e10c79b7518e6e3c.zip | |
KVM: SVM: let alternatives handle the cases when RSB filling is required
Remove superfluous RSB filling after a VMEXIT when the CPU already has
flushed the RSB after a VMEXIT when AutoIBRS is enabled.
The initial implementation for adding RETPOLINES added an ALTERNATIVES
implementation for filling the RSB after a VMEXIT in commit 117cc7a908c8
("x86/retpoline: Fill return stack buffer on vmexit").
Later, X86_FEATURE_RSB_VMEXIT was added in commit 9756bba28470
("x86/speculation: Fill RSB on vmexit for IBRS") to handle stuffing the
RSB if RETPOLINE=y *or* KERNEL_IBRS=y, i.e. to also stuff the RSB if the
kernel is configured to do IBRS mitigations on entry/exit.
The AutoIBRS (on AMD) feature implementation added in commit e7862eda309e
("x86/cpu: Support AMD Automatic IBRS") used the already-implemented logic
for EIBRS in spectre_v2_determine_rsb_fill_type_on_vmexit() -- but did not
update the code at VMEXIT to act on the mode selected in that function --
resulting in VMEXITs continuing to clear the RSB when RETPOLINES are
enabled, despite the presence of AutoIBRS.
Signed-off-by: Amit Shah <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[sean: massage changeloge, drop comment about AMD not needing RSB_VMEXIT_LITE]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions
