From 50c07460e304e578036e23f00736fb6de0cf29aa Mon Sep 17 00:00:00 2001 From: maxv Date: Thu, 28 Mar 2019 19:00:40 +0000 Subject: [PATCH] Move NVMM in the "any" class, so that it can be enabled in GENERIC. Add missing files in files.nvmm, and add NVMM (commented out) in the amd64 GENERIC. Remove the "caveats" section in the man page. --- share/man/man4/nvmm.4 | 10 ++-------- sys/arch/amd64/conf/GENERIC | 5 +++-- sys/dev/nvmm/files.nvmm | 5 ++++- sys/dev/nvmm/nvmm.c | 6 +++--- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/share/man/man4/nvmm.4 b/share/man/man4/nvmm.4 index 6c456f3e8465..fcd4413559c3 100644 --- a/share/man/man4/nvmm.4 +++ b/share/man/man4/nvmm.4 @@ -1,4 +1,4 @@ -.\" $NetBSD: nvmm.4,v 1.3 2019/02/13 16:06:28 maxv Exp $ +.\" $NetBSD: nvmm.4,v 1.4 2019/03/28 19:00:40 maxv Exp $ .\" .\" Copyright (c) 2018 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 13, 2019 +.Dd March 28, 2019 .Dt NVMM 4 .Os .Sh NAME @@ -60,9 +60,3 @@ The .Nm driver was written by .An Maxime Villard . -.Sh CAVEATS -Currently, -.Nm -cannot be enabled in a kernel configuration, and must rather be -.Xr modload 8 Ns ed -dynamically from the filesystem. diff --git a/sys/arch/amd64/conf/GENERIC b/sys/arch/amd64/conf/GENERIC index a35631624379..ff8ef1748129 100644 --- a/sys/arch/amd64/conf/GENERIC +++ b/sys/arch/amd64/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.520 2019/03/01 12:25:09 nonaka Exp $ +# $NetBSD: GENERIC,v 1.521 2019/03/28 19:00:40 maxv Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.520 $" +#ident "GENERIC-$Revision: 1.521 $" maxusers 64 # estimated number of users @@ -1169,6 +1169,7 @@ pseudo-device ksyms # /dev/ksyms pseudo-device lockstat # lock profiling pseudo-device bcsp # BlueCore Serial Protocol pseudo-device btuart # Bluetooth HCI UART (H4) +#pseudo-device nvmm # NetBSD Virtual Machine Monitor # a pseudo device needed for Coda # also needs CODA (above) pseudo-device vcoda # coda minicache <-> venus comm. diff --git a/sys/dev/nvmm/files.nvmm b/sys/dev/nvmm/files.nvmm index bf103ff1006d..868aa07fb209 100644 --- a/sys/dev/nvmm/files.nvmm +++ b/sys/dev/nvmm/files.nvmm @@ -1,11 +1,14 @@ -# $NetBSD: files.nvmm,v 1.1 2018/11/07 07:43:08 maxv Exp $ +# $NetBSD: files.nvmm,v 1.2 2019/03/28 19:00:40 maxv Exp $ defpseudo nvmm file dev/nvmm/nvmm.c nvmm ifdef amd64 +file dev/nvmm/x86/nvmm_x86.c nvmm file dev/nvmm/x86/nvmm_x86_svm.c nvmm file dev/nvmm/x86/nvmm_x86_svmfunc.S nvmm +file dev/nvmm/x86/nvmm_x86_vmx.c nvmm +file dev/nvmm/x86/nvmm_x86_vmxfunc.S nvmm endif diff --git a/sys/dev/nvmm/nvmm.c b/sys/dev/nvmm/nvmm.c index 10ab48230f40..ed27ba47761d 100644 --- a/sys/dev/nvmm/nvmm.c +++ b/sys/dev/nvmm/nvmm.c @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm.c,v 1.11 2019/03/21 20:21:40 maxv Exp $ */ +/* $NetBSD: nvmm.c,v 1.12 2019/03/28 19:00:40 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.11 2019/03/21 20:21:40 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.12 2019/03/28 19:00:40 maxv Exp $"); #include #include @@ -933,7 +933,7 @@ nvmmattach(int nunits) /* nothing */ } -MODULE(MODULE_CLASS_DRIVER, nvmm, NULL); +MODULE(MODULE_CLASS_ANY, nvmm, NULL); static int nvmm_modcmd(modcmd_t cmd, void *arg)