Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/xen/x86 xen/x86/cpu.c: Membar audit.



details:   https://anonhg.NetBSD.org/src/rev/63a0ec8467d4
branches:  trunk
changeset: 373711:63a0ec8467d4
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Feb 25 00:32:38 2023 +0000

description:
xen/x86/cpu.c: Membar audit.

I see no reason for store-before-load ordering here; as far as I'm
aware, evtchn_upcall_mask is only shared between a (v)CPU and its
(hypervisor) interrupts, not other (v)CPUs.

diffstat:

 sys/arch/xen/x86/cpu.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r c892267a6d86 -r 63a0ec8467d4 sys/arch/xen/x86/cpu.c
--- a/sys/arch/xen/x86/cpu.c    Sat Feb 25 00:32:26 2023 +0000
+++ b/sys/arch/xen/x86/cpu.c    Sat Feb 25 00:32:38 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.143 2023/02/25 00:31:40 riastradh Exp $      */
+/*     $NetBSD: cpu.c,v 1.144 2023/02/25 00:32:38 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.143 2023/02/25 00:31:40 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.144 2023/02/25 00:32:38 riastradh Exp $");
 
 #include "opt_ddb.h"
 #include "opt_multiprocessor.h"
@@ -848,7 +848,7 @@
        /* resume with interrupts off */
        vci = ci->ci_vcpu;
        vci->evtchn_upcall_mask = 1;
-       xen_mb();
+       __insn_barrier();
 
        /* resume in kernel-mode */
        initctx->flags = VGCF_in_kernel | VGCF_online;
@@ -945,7 +945,7 @@
        /* resume with interrupts off */
        vci = ci->ci_vcpu;
        vci->evtchn_upcall_mask = 1;
-       xen_mb();
+       __insn_barrier();
 
        /* resume in kernel-mode */
        initctx->flags = VGCF_in_kernel | VGCF_online;



Home | Main Index | Thread Index | Old Index