diff options
author | 2020-11-28 18:40:01 +0000 | |
---|---|---|
committer | 2020-11-28 18:40:01 +0000 | |
commit | a6eb3dd24820a0dc69eee41e424555078b7dc97b (patch) | |
tree | b10e3110719b6e0016f91d2ebd8280fcaee7177b | |
parent | ICC_DIR, used to deactive interrupts, is only needed when running in (diff) | |
download | wireguard-openbsd-a6eb3dd24820a0dc69eee41e424555078b7dc97b.tar.xz wireguard-openbsd-a6eb3dd24820a0dc69eee41e424555078b7dc97b.zip |
Since our IPI broadcast functions exclude the CPU doing the broadcast, we
need to explicitly call wbinvd() in wbinvd_on_all_cpus().
ok jsg@, deraadt@
-rw-r--r-- | sys/arch/amd64/amd64/cpu.c | 3 | ||||
-rw-r--r-- | sys/arch/i386/i386/cpu.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c index c52b737883d..122d8018551 100644 --- a/sys/arch/amd64/amd64/cpu.c +++ b/sys/arch/amd64/amd64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.151 2020/11/24 13:52:40 mpi Exp $ */ +/* $OpenBSD: cpu.c,v 1.152 2020/11/28 18:40:01 kettenis Exp $ */ /* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /*- @@ -1289,6 +1289,7 @@ int wbinvd_on_all_cpus(void) { x86_broadcast_ipi(X86_IPI_WBINVD); + wbinvd(); return 0; } #endif diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c index 592eeb1862a..6908f5e81c9 100644 --- a/sys/arch/i386/i386/cpu.c +++ b/sys/arch/i386/i386/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.105 2020/09/13 11:53:16 jsg Exp $ */ +/* $OpenBSD: cpu.c,v 1.106 2020/11/28 18:40:01 kettenis Exp $ */ /* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */ /*- @@ -926,6 +926,7 @@ int wbinvd_on_all_cpus(void) { i386_broadcast_ipi(I386_IPI_WBINVD); + wbinvd(); return 0; } #endif |