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 xpq_queue_* use per-cpu queue; splvm() is e...



details:   https://anonhg.NetBSD.org/src/rev/78a9428b3eb9
branches:  trunk
changeset: 932404:78a9428b3eb9
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed May 06 19:47:05 2020 +0000

description:
xpq_queue_* use per-cpu queue; splvm() is enough to protect them.
remove the XXX SMP comments.

diffstat:

 sys/arch/xen/x86/x86_xpmap.c |  10 +++++-----
 sys/arch/xen/x86/xenfunc.c   |   8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (80 lines):

diff -r a9e14dc73bd2 -r 78a9428b3eb9 sys/arch/xen/x86/x86_xpmap.c
--- a/sys/arch/xen/x86/x86_xpmap.c      Wed May 06 19:45:39 2020 +0000
+++ b/sys/arch/xen/x86/x86_xpmap.c      Wed May 06 19:47:05 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: x86_xpmap.c,v 1.87 2020/05/06 17:28:26 bouyer Exp $    */
+/*     $NetBSD: x86_xpmap.c,v 1.88 2020/05/06 19:47:05 bouyer Exp $    */
 
 /*
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.87 2020/05/06 17:28:26 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.88 2020/05/06 19:47:05 bouyer Exp $");
 
 #include "opt_xen.h"
 #include "opt_ddb.h"
@@ -182,7 +182,7 @@
                ptp = kvtopte(va);
                pmap_pte_clearbits(ptp, PTE_W);
        }
-       s = splvm(); /* XXXSMP */
+       s = splvm();
        xpq_queue_set_ldt(base, entries);
        splx(s);
 }
@@ -938,14 +938,14 @@
 xen_set_user_pgd(paddr_t page)
 {
        struct mmuext_op op;
-       int s = splvm(); /* XXXSMP */
 
+       int s = splvm();
        xpq_flush_queue();
+       splx(s);
        op.cmd = MMUEXT_NEW_USER_BASEPTR;
        op.arg1.mfn = xpmap_ptom_masked(page) >> PAGE_SHIFT;
        if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0)
                panic("xen_set_user_pgd: failed to install new user page"
                        " directory %#" PRIxPADDR, page);
-       splx(s);
 }
 #endif /* __x86_64__ */
diff -r a9e14dc73bd2 -r 78a9428b3eb9 sys/arch/xen/x86/xenfunc.c
--- a/sys/arch/xen/x86/xenfunc.c        Wed May 06 19:45:39 2020 +0000
+++ b/sys/arch/xen/x86/xenfunc.c        Wed May 06 19:47:05 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xenfunc.c,v 1.27 2020/04/25 15:26:17 bouyer Exp $      */
+/*     $NetBSD: xenfunc.c,v 1.28 2020/05/06 19:47:05 bouyer Exp $      */
 
 /*
  * Copyright (c) 2004 Christian Limpach.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xenfunc.c,v 1.27 2020/04/25 15:26:17 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xenfunc.c,v 1.28 2020/05/06 19:47:05 bouyer Exp $");
 
 #include <sys/param.h>
 
@@ -144,7 +144,7 @@
 void
 lcr3(register_t val)
 {
-       int s = splvm(); /* XXXSMP */
+       int s = splvm();
        xpq_queue_pt_switch(xpmap_ptom_masked(val));
        splx(s);
 }
@@ -153,7 +153,7 @@
 void
 tlbflush(void)
 {
-       int s = splvm(); /* XXXSMP */
+       int s = splvm();
        xpq_queue_tlb_flush();
        splx(s);
 }



Home | Main Index | Thread Index | Old Index