Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen Further restrict the scope of XENPV to relevant...



details:   https://anonhg.NetBSD.org/src/rev/94d27fed3c22
branches:  trunk
changeset: 448900:94d27fed3c22
user:      cherry <cherry%NetBSD.org@localhost>
date:      Wed Feb 13 06:52:43 2019 +0000

description:
Further restrict the scope of XENPV to relevant parts.

diffstat:

 sys/arch/xen/include/xenpmap.h |   5 ++++-
 sys/arch/xen/xen/evtchn.c      |   8 ++++++--
 sys/arch/xen/xen/hypervisor.c  |  10 ++++++----
 sys/arch/xen/xen/xen_machdep.c |   6 ++++--
 4 files changed, 20 insertions(+), 9 deletions(-)

diffs (150 lines):

diff -r 8cb173c6cb11 -r 94d27fed3c22 sys/arch/xen/include/xenpmap.h
--- a/sys/arch/xen/include/xenpmap.h    Wed Feb 13 06:32:45 2019 +0000
+++ b/sys/arch/xen/include/xenpmap.h    Wed Feb 13 06:52:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xenpmap.h,v 1.40 2018/07/26 17:20:08 maxv Exp $        */
+/*     $NetBSD: xenpmap.h,v 1.41 2019/02/13 06:52:43 cherry Exp $      */
 
 /*
  *
@@ -72,6 +72,7 @@
 #define xpq_queue_pin_l4_table(pa)     \
        xpq_queue_pin_table(pa, MMUEXT_PIN_L4_TABLE)
 
+#ifdef XENPV
 extern unsigned long *xpmap_phys_to_machine_mapping;
 
 static __inline paddr_t
@@ -121,6 +122,8 @@
            != INVALID_P2M_ENTRY);
 }
 
+#endif /* XENPV */
+
 static inline void
 MULTI_update_va_mapping(
        multicall_entry_t *mcl, vaddr_t va,
diff -r 8cb173c6cb11 -r 94d27fed3c22 sys/arch/xen/xen/evtchn.c
--- a/sys/arch/xen/xen/evtchn.c Wed Feb 13 06:32:45 2019 +0000
+++ b/sys/arch/xen/xen/evtchn.c Wed Feb 13 06:52:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: evtchn.c,v 1.84 2019/02/13 05:01:58 cherry Exp $       */
+/*     $NetBSD: evtchn.c,v 1.85 2019/02/13 06:52:43 cherry Exp $       */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -54,7 +54,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.84 2019/02/13 05:01:58 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.85 2019/02/13 06:52:43 cherry Exp $");
 
 #include "opt_xen.h"
 #include "isa.h"
@@ -256,6 +256,7 @@
 events_init(void)
 {
        mutex_init(&evtchn_lock, MUTEX_DEFAULT, IPL_NONE);
+#ifdef XENPV
        debug_port = bind_virq_to_evtch(VIRQ_DEBUG);
 
        KASSERT(debug_port != -1);
@@ -273,6 +274,7 @@
 #if NPCI > 0 || NISA > 0
        hypervisor_ack_pirq_event(debug_port);
 #endif /* NPCI > 0 || NISA > 0 */
+#endif /* XENPV */
        x86_enable_intr();              /* at long last... */
 }
 
@@ -1080,6 +1082,7 @@
        return 0;
 }
 
+#ifdef XENPV
 static struct evtsource *
 event_get_handler(const char *intrid)
 {
@@ -1207,3 +1210,4 @@
 
        return ii_handler;
 }
+#endif /* XENPV */
diff -r 8cb173c6cb11 -r 94d27fed3c22 sys/arch/xen/xen/hypervisor.c
--- a/sys/arch/xen/xen/hypervisor.c     Wed Feb 13 06:32:45 2019 +0000
+++ b/sys/arch/xen/xen/hypervisor.c     Wed Feb 13 06:52:43 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.70 2019/02/02 12:32:55 cherry Exp $ */
+/* $NetBSD: hypervisor.c,v 1.71 2019/02/13 06:52:43 cherry Exp $ */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -53,7 +53,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.70 2019/02/02 12:32:55 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.71 2019/02/13 06:52:43 cherry Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -373,20 +373,22 @@
 static bool
 hypervisor_suspend(device_t dev, const pmf_qual_t *qual)
 {
+#ifdef XENPV
        events_suspend();
        xengnt_suspend();
-
+#endif
        return true;
 }
 
 static bool
 hypervisor_resume(device_t dev, const pmf_qual_t *qual)
 {
+#ifdef XENPV
        hypervisor_machdep_resume();
 
        xengnt_resume();
        events_resume();
-
+#endif
        return true;
 }
 
diff -r 8cb173c6cb11 -r 94d27fed3c22 sys/arch/xen/xen/xen_machdep.c
--- a/sys/arch/xen/xen/xen_machdep.c    Wed Feb 13 06:32:45 2019 +0000
+++ b/sys/arch/xen/xen/xen_machdep.c    Wed Feb 13 06:52:43 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen_machdep.c,v 1.20 2019/02/02 12:32:55 cherry Exp $  */
+/*     $NetBSD: xen_machdep.c,v 1.21 2019/02/13 06:52:43 cherry Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -53,7 +53,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.20 2019/02/02 12:32:55 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.21 2019/02/13 06:52:43 cherry Exp $");
 
 #include "opt_xen.h"
 
@@ -80,6 +80,7 @@
 
 bool xen_suspend_allow;
 
+#ifdef XENPV
 extern uint64_t tsc_freq;      /* XXX */
 
 static int sysctl_xen_suspend(SYSCTLFN_ARGS);
@@ -419,6 +420,7 @@
        aprint_verbose("domain resumed\n");
 
 }
+#endif /* XENPV */
 
 #define PRINTK_BUFSIZE 1024
 void



Home | Main Index | Thread Index | Old Index