Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/arch Pull up following revision(s) (requested by khor...



details:   https://anonhg.NetBSD.org/src/rev/51287493f5c2
branches:  netbsd-7
changeset: 800182:51287493f5c2
user:      snj <snj%NetBSD.org@localhost>
date:      Mon Apr 17 06:02:05 2017 +0000

description:
Pull up following revision(s) (requested by khorben in ticket #1367):
        sys/arch/amd64/conf/XEN3_DOM0: revision 1.126
        sys/arch/i386/conf/XEN3_DOM0: revision 1.104
        sys/arch/xen/x86/xen_pmap.c: revision 1.25
In the MP case,
do not attempt to pmap_tlb_shootdown() after a pmap_kenter_ma() during
boot. pmap_tlb_shootdown() assumes post boot. Instead invalidate the
entry on the local CPU only.
XXX: to DTRT, probably this assumption needs re-examination.
XXX: The tradeoff is a (predicted) single word size comparison
      penalty, so perhaps a decision needs performance stats.
xen dom0 SMP is now bootable again.
--
add the 'options MULTIPROCESSOR' in respective configs, but mark them
experimental - and thus disabled by default.

diffstat:

 sys/arch/amd64/conf/XEN3_DOM0 |   4 +++-
 sys/arch/i386/conf/XEN3_DOM0  |   4 +++-
 sys/arch/xen/x86/xen_pmap.c   |  14 +++++++++-----
 3 files changed, 15 insertions(+), 7 deletions(-)

diffs (65 lines):

diff -r 6249b19f8090 -r 51287493f5c2 sys/arch/amd64/conf/XEN3_DOM0
--- a/sys/arch/amd64/conf/XEN3_DOM0     Mon Apr 17 05:23:00 2017 +0000
+++ b/sys/arch/amd64/conf/XEN3_DOM0     Mon Apr 17 06:02:05 2017 +0000
@@ -1,7 +1,9 @@
-# $NetBSD: XEN3_DOM0,v 1.103.2.5 2016/12/09 05:10:45 snj Exp $
+# $NetBSD: XEN3_DOM0,v 1.103.2.6 2017/04/17 06:02:05 snj Exp $
 
 include        "arch/amd64/conf/std.xen"
 
+#options       MULTIPROCESSOR  # (experimental)
+
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
 #options       UVMHIST
diff -r 6249b19f8090 -r 51287493f5c2 sys/arch/i386/conf/XEN3_DOM0
--- a/sys/arch/i386/conf/XEN3_DOM0      Mon Apr 17 05:23:00 2017 +0000
+++ b/sys/arch/i386/conf/XEN3_DOM0      Mon Apr 17 06:02:05 2017 +0000
@@ -1,9 +1,11 @@
-#      $NetBSD: XEN3_DOM0,v 1.85.2.6 2016/12/09 05:10:45 snj Exp $
+#      $NetBSD: XEN3_DOM0,v 1.85.2.7 2017/04/17 06:02:05 snj Exp $
 #
 #      XEN3_0: Xen 3.0 domain0 kernel
 
 include        "arch/xen/conf/std.xen"
 
+#options       MULTIPROCESSOR  # (experimental)
+
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
 #options       UVMHIST
diff -r 6249b19f8090 -r 51287493f5c2 sys/arch/xen/x86/xen_pmap.c
--- a/sys/arch/xen/x86/xen_pmap.c       Mon Apr 17 05:23:00 2017 +0000
+++ b/sys/arch/xen/x86/xen_pmap.c       Mon Apr 17 06:02:05 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen_pmap.c,v 1.22 2012/06/24 18:31:53 jym Exp $        */
+/*     $NetBSD: xen_pmap.c,v 1.22.14.1 2017/04/17 06:02:05 snj Exp $   */
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.22 2012/06/24 18:31:53 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_pmap.c,v 1.22.14.1 2017/04/17 06:02:05 snj Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -192,9 +192,13 @@
 
        if (pmap_valid_entry(opte)) {
 #if defined(MULTIPROCESSOR)
-               kpreempt_disable();
-               pmap_tlb_shootdown(pmap_kernel(), va, opte, TLBSHOOT_KENTER);
-               kpreempt_enable();
+               if (__predict_false(x86_mp_online == false)) {
+                       pmap_update_pg(va);
+               } else {
+                       kpreempt_disable();
+                       pmap_tlb_shootdown(pmap_kernel(), va, opte, TLBSHOOT_KENTER);
+                       kpreempt_enable();
+               }
 #else
                /* Don't bother deferring in the single CPU case. */
                pmap_update_pg(va);



Home | Main Index | Thread Index | Old Index