Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/nvmm Print the backend name when attaching.



details:   https://anonhg.NetBSD.org/src/rev/1faaed36fca4
branches:  trunk
changeset: 935475:1faaed36fca4
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Jul 03 16:09:54 2020 +0000

description:
Print the backend name when attaching.

diffstat:

 sys/dev/nvmm/nvmm.c             |  9 +++++----
 sys/dev/nvmm/nvmm_internal.h    |  5 +++--
 sys/dev/nvmm/x86/nvmm_x86_svm.c |  5 +++--
 sys/dev/nvmm/x86/nvmm_x86_vmx.c |  5 +++--
 4 files changed, 14 insertions(+), 10 deletions(-)

diffs (105 lines):

diff -r 3ca49c52f829 -r 1faaed36fca4 sys/dev/nvmm/nvmm.c
--- a/sys/dev/nvmm/nvmm.c       Fri Jul 03 16:07:52 2020 +0000
+++ b/sys/dev/nvmm/nvmm.c       Fri Jul 03 16:09:54 2020 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: nvmm.c,v 1.31 2020/06/25 17:01:19 maxv Exp $   */
+/*     $NetBSD: nvmm.c,v 1.32 2020/07/03 16:09:54 maxv Exp $   */
 
 /*
- * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
+ * Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.31 2020/06/25 17:01:19 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.32 2020/07/03 16:09:54 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1209,7 +1209,8 @@
        error = nvmm_init();
        if (error)
                panic("%s: impossible", __func__);
-       aprint_normal_dev(self, "attached\n");
+       aprint_normal_dev(self, "attached, using backend %s\n",
+           nvmm_impl->name);
 }
 
 static int
diff -r 3ca49c52f829 -r 1faaed36fca4 sys/dev/nvmm/nvmm_internal.h
--- a/sys/dev/nvmm/nvmm_internal.h      Fri Jul 03 16:07:52 2020 +0000
+++ b/sys/dev/nvmm/nvmm_internal.h      Fri Jul 03 16:09:54 2020 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: nvmm_internal.h,v 1.15 2020/05/24 08:08:49 maxv Exp $  */
+/*     $NetBSD: nvmm_internal.h,v 1.16 2020/07/03 16:09:54 maxv Exp $  */
 
 /*
- * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
+ * Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -91,6 +91,7 @@
 };
 
 struct nvmm_impl {
+       const char *name;
        bool (*ident)(void);
        void (*init)(void);
        void (*fini)(void);
diff -r 3ca49c52f829 -r 1faaed36fca4 sys/dev/nvmm/x86/nvmm_x86_svm.c
--- a/sys/dev/nvmm/x86/nvmm_x86_svm.c   Fri Jul 03 16:07:52 2020 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_svm.c   Fri Jul 03 16:09:54 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvmm_x86_svm.c,v 1.62 2020/05/24 08:08:49 maxv Exp $   */
+/*     $NetBSD: nvmm_x86_svm.c,v 1.63 2020/07/03 16:09:54 maxv Exp $   */
 
 /*
  * Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.62 2020/05/24 08:08:49 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.63 2020/07/03 16:09:54 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2430,6 +2430,7 @@
 }
 
 const struct nvmm_impl nvmm_x86_svm = {
+       .name = "x86-svm",
        .ident = svm_ident,
        .init = svm_init,
        .fini = svm_fini,
diff -r 3ca49c52f829 -r 1faaed36fca4 sys/dev/nvmm/x86/nvmm_x86_vmx.c
--- a/sys/dev/nvmm/x86/nvmm_x86_vmx.c   Fri Jul 03 16:07:52 2020 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_vmx.c   Fri Jul 03 16:09:54 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvmm_x86_vmx.c,v 1.60 2020/06/18 16:31:15 maxv Exp $   */
+/*     $NetBSD: nvmm_x86_vmx.c,v 1.61 2020/07/03 16:09:54 maxv Exp $   */
 
 /*
  * Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.60 2020/06/18 16:31:15 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.61 2020/07/03 16:09:54 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -3392,6 +3392,7 @@
 }
 
 const struct nvmm_impl nvmm_x86_vmx = {
+       .name = "x86-vmx",
        .ident = vmx_ident,
        .init = vmx_init,
        .fini = vmx_fini,



Home | Main Index | Thread Index | Old Index