Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Add a new area, SLAREA_HYPV, which indicates the sl...



details:   https://anonhg.NetBSD.org/src/rev/f8833c7ebd1d
branches:  trunk
changeset: 363782:f8833c7ebd1d
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Aug 12 09:05:52 2018 +0000

description:
Add a new area, SLAREA_HYPV, which indicates the slots used by the
hypervisor, in our case Xen.

diffstat:

 sys/arch/amd64/amd64/machdep.c |  13 +++++++++++--
 sys/arch/x86/include/pmap.h    |   7 ++++---
 2 files changed, 15 insertions(+), 5 deletions(-)

diffs (55 lines):

diff -r d96b8b4605e0 -r f8833c7ebd1d sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Sun Aug 12 09:03:42 2018 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Sun Aug 12 09:05:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.310 2018/08/12 08:17:50 maxv Exp $       */
+/*     $NetBSD: machdep.c,v 1.311 2018/08/12 09:05:52 maxv Exp $       */
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.310 2018/08/12 08:17:50 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.311 2018/08/12 09:05:52 maxv Exp $");
 
 #include "opt_modular.h"
 #include "opt_user_ldt.h"
@@ -1635,6 +1635,15 @@
        slotspace.area[SLAREA_DMAP].dropmax = true;
 #endif
 
+#ifdef XEN
+       /* Hypervisor. */
+       slotspace.area[SLAREA_HYPV].sslot = 256;
+       slotspace.area[SLAREA_HYPV].mslot = 16;
+       slotspace.area[SLAREA_HYPV].nslot = 16;
+       slotspace.area[SLAREA_HYPV].active = true;
+       slotspace.area[SLAREA_HYPV].dropmax = false;
+#endif
+
        /* Kernel. */
        slotspace.area[SLAREA_KERN].sslot = L4_SLOT_KERNBASE;
        slotspace.area[SLAREA_KERN].mslot = 1;
diff -r d96b8b4605e0 -r f8833c7ebd1d sys/arch/x86/include/pmap.h
--- a/sys/arch/x86/include/pmap.h       Sun Aug 12 09:03:42 2018 +0000
+++ b/sys/arch/x86/include/pmap.h       Sun Aug 12 09:05:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.h,v 1.81 2018/07/21 06:09:13 maxv Exp $   */
+/*     $NetBSD: pmap.h,v 1.82 2018/08/12 09:05:52 maxv Exp $   */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -160,8 +160,9 @@
 #define SLAREA_MAIN    3
 #define SLAREA_PCPU    4
 #define SLAREA_DMAP    5
-#define SLAREA_KERN    6
-#define SLSPACE_NAREAS 7
+#define SLAREA_HYPV    6
+#define SLAREA_KERN    7
+#define SLSPACE_NAREAS 8
 
 struct slotspace {
        struct {



Home | Main Index | Thread Index | Old Index