Module Name:    src
Committed By:   maxv
Date:           Sun Aug 12 09:05:52 UTC 2018

Modified Files:
        src/sys/arch/amd64/amd64: machdep.c
        src/sys/arch/x86/include: pmap.h

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


To generate a diff of this commit:
cvs rdiff -u -r1.310 -r1.311 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/x86/include/pmap.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.310 src/sys/arch/amd64/amd64/machdep.c:1.311
--- src/sys/arch/amd64/amd64/machdep.c:1.310	Sun Aug 12 08:17:50 2018
+++ src/sys/arch/amd64/amd64/machdep.c	Sun Aug 12 09:05:52 2018
@@ -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 @@ init_slotspace(void)
 	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;

Index: src/sys/arch/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.81 src/sys/arch/x86/include/pmap.h:1.82
--- src/sys/arch/x86/include/pmap.h:1.81	Sat Jul 21 06:09:13 2018
+++ src/sys/arch/x86/include/pmap.h	Sun Aug 12 09:05:52 2018
@@ -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 @@ struct bootspace {
 #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 {

Reply via email to