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 Do not fiddle with the event masks of non-l...
details: https://anonhg.NetBSD.org/src/rev/f225393cbac2
branches: trunk
changeset: 772254:f225393cbac2
user: cherry <cherry%NetBSD.org@localhost>
date: Mon Dec 26 18:27:11 2011 +0000
description:
Do not fiddle with the event masks of non-local vcpus when unmasking events across vcpus
diffstat:
sys/arch/xen/x86/hypervisor_machdep.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (33 lines):
diff -r 652e9537a288 -r f225393cbac2 sys/arch/xen/x86/hypervisor_machdep.c
--- a/sys/arch/xen/x86/hypervisor_machdep.c Mon Dec 26 17:59:07 2011 +0000
+++ b/sys/arch/xen/x86/hypervisor_machdep.c Mon Dec 26 18:27:11 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor_machdep.c,v 1.18 2011/12/03 22:41:40 bouyer Exp $ */
+/* $NetBSD: hypervisor_machdep.c,v 1.19 2011/12/26 18:27:11 cherry Exp $ */
/*
*
@@ -54,7 +54,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.18 2011/12/03 22:41:40 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.19 2011/12/26 18:27:11 cherry Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -338,9 +338,11 @@
if (!xen_atomic_test_bit(&ci->ci_evtmask[0], ev))
continue;
vci = ci->ci_vcpu;
- if (!xen_atomic_test_and_set_bit(&vci->evtchn_pending_sel,
- ev>>LONG_SHIFT))
- xen_atomic_set_bit(&vci->evtchn_upcall_pending, 0);
+ if (__predict_true(ci == curcpu())) {
+ if (!xen_atomic_test_and_set_bit(&vci->evtchn_pending_sel,
+ ev>>LONG_SHIFT))
+ xen_atomic_set_bit(&vci->evtchn_upcall_pending, 0);
+ }
if (!vci->evtchn_upcall_mask) {
if (__predict_true(ci == curcpu())) {
hypervisor_force_callback();
Home |
Main Index |
Thread Index |
Old Index