Source-Changes-HG archive

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

[src/bouyer-xenpvh]: src/sys/arch/xen/xen If we get an event for another CPU ...



details:   https://anonhg.NetBSD.org/src/rev/740aaf7a934b
branches:  bouyer-xenpvh
changeset: 982949:740aaf7a934b
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Apr 18 20:36:31 2020 +0000

description:
If we get an event for another CPU just ignore it. The hypervisor will
callback on the other CPU anyway.

diffstat:

 sys/arch/xen/xen/evtchn.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (38 lines):

diff -r fbe30fe60113 -r 740aaf7a934b sys/arch/xen/xen/evtchn.c
--- a/sys/arch/xen/xen/evtchn.c Sat Apr 18 20:03:02 2020 +0000
+++ b/sys/arch/xen/xen/evtchn.c Sat Apr 18 20:36:31 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: evtchn.c,v 1.88.2.5 2020/04/18 15:06:18 bouyer Exp $   */
+/*     $NetBSD: evtchn.c,v 1.88.2.6 2020/04/18 20:36:31 bouyer Exp $   */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -54,7 +54,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.88.2.5 2020/04/18 15:06:18 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.88.2.6 2020/04/18 20:36:31 bouyer Exp $");
 
 #include "opt_xen.h"
 #include "isa.h"
@@ -341,15 +341,14 @@
        }
 
        KASSERTMSG(evtsource[evtch] != NULL, "unknown event %d", evtch);
+
+       if (evtsource[evtch]->ev_cpu != ci)
+               return 0;
+
        ci->ci_data.cpu_nintr++;
        evtsource[evtch]->ev_evcnt.ev_count++;
        ilevel = ci->ci_ilevel;
 
-       if (evtsource[evtch]->ev_cpu != ci /* XXX: get stats */) {
-               hypervisor_send_event(evtsource[evtch]->ev_cpu, evtch);
-               return 0;
-       }
-
        if (evtsource[evtch]->ev_maxlevel <= ilevel) {
 #ifdef IRQ_DEBUG
                if (evtch == IRQ_DEBUG)



Home | Main Index | Thread Index | Old Index