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 touch pending flags across vcpus



details:   https://anonhg.NetBSD.org/src/rev/4dc239ae130a
branches:  trunk
changeset: 772270:4dc239ae130a
user:      cherry <cherry%NetBSD.org@localhost>
date:      Tue Dec 27 07:45:41 2011 +0000

description:
Do not touch pending flags across vcpus

diffstat:

 sys/arch/xen/x86/hypervisor_machdep.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r b66e43551094 -r 4dc239ae130a sys/arch/xen/x86/hypervisor_machdep.c
--- a/sys/arch/xen/x86/hypervisor_machdep.c     Tue Dec 27 07:05:53 2011 +0000
+++ b/sys/arch/xen/x86/hypervisor_machdep.c     Tue Dec 27 07:45:41 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hypervisor_machdep.c,v 1.19 2011/12/26 18:27:11 cherry Exp $   */
+/*     $NetBSD: hypervisor_machdep.c,v 1.20 2011/12/27 07:45:41 cherry Exp $   */
 
 /*
  *
@@ -54,7 +54,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.19 2011/12/26 18:27:11 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.20 2011/12/27 07:45:41 cherry Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -295,10 +295,12 @@
 #endif
 
        xen_atomic_set_bit(&s->evtchn_pending[0], ev);
-       xen_atomic_set_bit(&vci->evtchn_pending_sel,
-                          ev >> LONG_SHIFT);
 
-       xen_atomic_set_bit(&vci->evtchn_upcall_pending, 0);
+       if (__predict_true(ci == curcpu())) {
+               xen_atomic_set_bit(&vci->evtchn_pending_sel,
+                   ev >> LONG_SHIFT);
+               xen_atomic_set_bit(&vci->evtchn_upcall_pending, 0);
+       }
 
        xen_atomic_clear_bit(&s->evtchn_mask[0], ev);
 



Home | Main Index | Thread Index | Old Index