BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next] bpf,x64: Remove unnecessary check on existence of SSE2
@ 2022-10-03  1:17 Jie Meng
  2022-10-04  1:04 ` KP Singh
  0 siblings, 1 reply; 7+ messages in thread
From: Jie Meng @ 2022-10-03  1:17 UTC (permalink / raw)
  To: bpf, ast, andrii, daniel; +Cc: Jie Meng

SSE2 and hence lfence are architectural in x86-64 and no need to check
whether they're supported in CPU.

Signed-off-by: Jie Meng <jmeng@fb.com>
---
 arch/x86/net/bpf_jit_comp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index d09c54f3d2e0..b2124521305e 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -1289,8 +1289,7 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image, u8 *rw_image
 
 			/* speculation barrier */
 		case BPF_ST | BPF_NOSPEC:
-			if (boot_cpu_has(X86_FEATURE_XMM2))
-				EMIT_LFENCE();
+			EMIT_LFENCE();
 			break;
 
 			/* ST: *(u8*)(dst_reg + off) = imm */
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-07 14:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-03  1:17 [PATCH bpf-next] bpf,x64: Remove unnecessary check on existence of SSE2 Jie Meng
2022-10-04  1:04 ` KP Singh
2022-10-04  3:50   ` Jie Meng
2022-10-05  0:30     ` KP Singh
2022-10-05 17:00       ` [PATCH bpf-next v2] " Jie Meng
2022-10-06  0:58         ` KP Singh
2022-10-07 14:30         ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox