Skip to content

Commit 7a0d13e

Browse files
James Morsegregkh
authored andcommitted
arm64: kvm: Fix copy-and-paste error in bhb templates for v5.10 stable
KVM's infrastructure for spectre mitigations in the vectors in v5.10 and earlier is different, it uses templates which are used to build a set of vectors at runtime. There are two copy-and-paste errors in the templates: __spectre_bhb_loop_k24 should loop 24 times and __spectre_bhb_loop_k32 32. Fix these. Reported-by: Pavel Machek <pavel@denx.de> Link: https://lore.kernel.org/all/20220310234858.GB16308@amd/ Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent dc11632 commit 7a0d13e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/arm64/kvm/hyp/smccc_wa.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ SYM_DATA_START(__spectre_bhb_loop_k24)
6868
esb
6969
sub sp, sp, #(8 * 2)
7070
stp x0, x1, [sp, #(8 * 0)]
71-
mov x0, #8
71+
mov x0, #24
7272
2: b . + 4
7373
subs x0, x0, #1
7474
b.ne 2b
@@ -85,7 +85,7 @@ SYM_DATA_START(__spectre_bhb_loop_k32)
8585
esb
8686
sub sp, sp, #(8 * 2)
8787
stp x0, x1, [sp, #(8 * 0)]
88-
mov x0, #8
88+
mov x0, #32
8989
2: b . + 4
9090
subs x0, x0, #1
9191
b.ne 2b

0 commit comments

Comments
 (0)