Module Name:    src
Committed By:   riastradh
Date:           Sat Feb 25 00:32:38 UTC 2023

Modified Files:
        src/sys/arch/xen/x86: cpu.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/xen/x86/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/x86/cpu.c
diff -u src/sys/arch/xen/x86/cpu.c:1.143 src/sys/arch/xen/x86/cpu.c:1.144
--- src/sys/arch/xen/x86/cpu.c:1.143	Sat Feb 25 00:31:40 2023
+++ src/sys/arch/xen/x86/cpu.c	Sat Feb 25 00:32:38 2023
@@ -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 @@ xen_init_amd64_vcpuctxt(struct cpu_info 
 	/* 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 @@ xen_init_i386_vcpuctxt(struct cpu_info *
 	/* 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;

Reply via email to