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: Need kpreempt_disable/enable aroun...
details: https://anonhg.NetBSD.org/src/rev/eda2058c9a06
branches: trunk
changeset: 373785:eda2058c9a06
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Mar 01 08:13:44 2023 +0000
description:
xen/x86: Need kpreempt_disable/enable around curcpu() access.
This is called with `hardware' interrupts enabled (between sti and
cli), so presumably preemption is possible here.
XXX pullup-8
XXX pullup-9
XXX pullup-10
diffstat:
sys/arch/xen/x86/hypervisor_machdep.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 4a2159ea07dd -r eda2058c9a06 sys/arch/xen/x86/hypervisor_machdep.c
--- a/sys/arch/xen/x86/hypervisor_machdep.c Wed Mar 01 04:04:54 2023 +0000
+++ b/sys/arch/xen/x86/hypervisor_machdep.c Wed Mar 01 08:13:44 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor_machdep.c,v 1.45 2022/09/07 00:40:19 knakahara Exp $ */
+/* $NetBSD: hypervisor_machdep.c,v 1.46 2023/03/01 08:13:44 riastradh Exp $ */
/*
*
@@ -54,7 +54,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.45 2022/09/07 00:40:19 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.46 2023/03/01 08:13:44 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -192,6 +192,8 @@
volatile struct vcpu_info *vci;
int ret;
+ kpreempt_disable();
+
ret = 0;
ci = curcpu();
vci = ci->ci_vcpu;
@@ -227,6 +229,8 @@
x86_enable_intr();
}
+ kpreempt_enable();
+
return (ret);
}
Home |
Main Index |
Thread Index |
Old Index