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 Move xen_ipi.c to XENPV only.



details:   https://anonhg.NetBSD.org/src/rev/20abfff03abe
branches:  bouyer-xenpvh
changeset: 982952:20abfff03abe
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Apr 19 20:29:30 2020 +0000

description:
Move xen_ipi.c to XENPV only.
Make sure we don't need to send events to remote CPUs (outside of IPIs)

diffstat:

 sys/arch/xen/conf/files.xen           |  3 +--
 sys/arch/xen/conf/files.xen.pv        |  4 +++-
 sys/arch/xen/x86/hypervisor_machdep.c |  9 +++++++--
 sys/arch/xen/xen/evtchn.c             |  7 +++++--
 4 files changed, 16 insertions(+), 7 deletions(-)

diffs (120 lines):

diff -r 43bac5c5d6e3 -r 20abfff03abe sys/arch/xen/conf/files.xen
--- a/sys/arch/xen/conf/files.xen       Sun Apr 19 19:39:10 2020 +0000
+++ b/sys/arch/xen/conf/files.xen       Sun Apr 19 20:29:30 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.xen,v 1.180.2.4 2020/04/16 19:23:50 bouyer Exp $
+#      $NetBSD: files.xen,v 1.180.2.5 2020/04/19 20:29:30 bouyer Exp $
 
 defflag        opt_xen.h                       XEN XENPVH XENPVHVM
 
@@ -7,7 +7,6 @@
 file   arch/xen/xen/xen_machdep.c              xen
 file   arch/xen/xen/evtchn.c                   xen
 file   arch/xen/xen/xengnt.c                   xen
-file   arch/xen/x86/xen_ipi.c                  multiprocessor & xen
 file   arch/xen/x86/xen_mainbus.c              xen
 file   arch/xen/xen/xen_clock.c                xen
 
diff -r 43bac5c5d6e3 -r 20abfff03abe sys/arch/xen/conf/files.xen.pv
--- a/sys/arch/xen/conf/files.xen.pv    Sun Apr 19 19:39:10 2020 +0000
+++ b/sys/arch/xen/conf/files.xen.pv    Sun Apr 19 20:29:30 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.xen.pv,v 1.1.2.2 2020/04/16 19:23:50 bouyer Exp $
+#      $NetBSD: files.xen.pv,v 1.1.2.3 2020/04/19 20:29:30 bouyer Exp $
 
 file   arch/xen/x86/autoconf.c         xenpv
 file   arch/xen/x86/x86_xpmap.c        xenpv
@@ -10,6 +10,8 @@
 file   arch/xen/x86/consinit.c         machdep & xenpv
 file   arch/xen/x86/pintr.c            machdep & dom0ops & xenpv
 
+file   arch/xen/x86/xen_ipi.c                  multiprocessor & xenpv
+
 #
 # System bus types
 #
diff -r 43bac5c5d6e3 -r 20abfff03abe sys/arch/xen/x86/hypervisor_machdep.c
--- a/sys/arch/xen/x86/hypervisor_machdep.c     Sun Apr 19 19:39:10 2020 +0000
+++ b/sys/arch/xen/x86/hypervisor_machdep.c     Sun Apr 19 20:29:30 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hypervisor_machdep.c,v 1.36.8.4 2020/04/18 15:06:18 bouyer Exp $       */
+/*     $NetBSD: hypervisor_machdep.c,v 1.36.8.5 2020/04/19 20:29:30 bouyer Exp $       */
 
 /*
  *
@@ -54,7 +54,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.36.8.4 2020/04/18 15:06:18 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.36.8.5 2020/04/19 20:29:30 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -291,6 +291,7 @@
 #endif
 }
 
+#if 0
 void
 hypervisor_send_event(struct cpu_info *ci, unsigned int ev)
 {
@@ -323,6 +324,7 @@
                }
        }
 }
+#endif
 
 void
 hypervisor_unmask_event(unsigned int ev)
@@ -422,6 +424,8 @@
        KASSERT(ci->ci_isources[sir] != NULL);
        ci->ci_isources[sir]->ipl_evt_mask1 |= 1UL << l1;
        ci->ci_isources[sir]->ipl_evt_mask2[l1] |= 1UL << l2;
+       KASSERT(ci == curcpu());
+#if 0
        if (__predict_false(ci != curcpu())) {
                if (xen_send_ipi(ci, XEN_IPI_HVCB)) {
                        panic("hypervisor_set_ipending: "
@@ -429,6 +433,7 @@
                            (int) ci->ci_cpuid, ci->ci_vcpuid);
                }
        }
+#endif
 }
 
 void
diff -r 43bac5c5d6e3 -r 20abfff03abe sys/arch/xen/xen/evtchn.c
--- a/sys/arch/xen/xen/evtchn.c Sun Apr 19 19:39:10 2020 +0000
+++ b/sys/arch/xen/xen/evtchn.c Sun Apr 19 20:29:30 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: evtchn.c,v 1.88.2.8 2020/04/19 19:39:11 bouyer Exp $   */
+/*     $NetBSD: evtchn.c,v 1.88.2.9 2020/04/19 20:29:30 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.8 2020/04/19 19:39:11 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.88.2.9 2020/04/19 20:29:30 bouyer Exp $");
 
 #include "opt_xen.h"
 #include "isa.h"
@@ -376,12 +376,15 @@
        mutex_spin_enter(&evtlock[evtch]);
        ih = evtsource[evtch]->ev_handlers;
        while (ih != NULL) {
+               KASSERT(ih->ih_cpu == ci);
+#if 0
                if (ih->ih_cpu != ci) {
                        hypervisor_send_event(ih->ih_cpu, evtch);
                        iplmask &= ~(1 << XEN_IPL2SIR(ih->ih_level));
                        ih = ih->ih_evt_next;
                        continue;
                }
+#endif
                if (ih->ih_level <= ilevel) {
 #ifdef IRQ_DEBUG
                if (evtch == IRQ_DEBUG)



Home | Main Index | Thread Index | Old Index