Module Name:    src
Committed By:   maxv
Date:           Sat Aug  1 08:18:37 UTC 2020

Modified Files:
        src/sys/dev/nvmm: nvmm.c nvmm.h nvmm_internal.h

Log Message:
Put the few x86-specific structures under #ifdef __x86_64__, for clarity.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/nvmm/nvmm.c
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/nvmm/nvmm.h
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/nvmm/nvmm_internal.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/dev/nvmm/nvmm.c
diff -u src/sys/dev/nvmm/nvmm.c:1.32 src/sys/dev/nvmm/nvmm.c:1.33
--- src/sys/dev/nvmm/nvmm.c:1.32	Fri Jul  3 16:09:54 2020
+++ src/sys/dev/nvmm/nvmm.c	Sat Aug  1 08:18:36 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm.c,v 1.32 2020/07/03 16:09:54 maxv Exp $	*/
+/*	$NetBSD: nvmm.c,v 1.33 2020/08/01 08:18:36 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.32 2020/07/03 16:09:54 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm.c,v 1.33 2020/08/01 08:18:36 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -59,8 +59,10 @@ static struct nvmm_machine machines[NVMM
 static volatile unsigned int nmachines __cacheline_aligned;
 
 static const struct nvmm_impl *nvmm_impl_list[] = {
+#if defined(__x86_64__)
 	&nvmm_x86_svm,	/* x86 AMD SVM */
 	&nvmm_x86_vmx	/* x86 Intel VMX */
+#endif
 };
 
 static const struct nvmm_impl *nvmm_impl = NULL;

Index: src/sys/dev/nvmm/nvmm.h
diff -u src/sys/dev/nvmm/nvmm.h:1.12 src/sys/dev/nvmm/nvmm.h:1.13
--- src/sys/dev/nvmm/nvmm.h:1.12	Mon Oct 28 08:30:49 2019
+++ src/sys/dev/nvmm/nvmm.h	Sat Aug  1 08:18:36 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: nvmm.h,v 1.12 2019/10/28 08:30:49 maxv Exp $	*/
+/*	$NetBSD: nvmm.h,v 1.13 2020/08/01 08:18:36 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
@@ -44,7 +44,7 @@ typedef uint64_t	gvaddr_t;
 typedef uint32_t	nvmm_machid_t;
 typedef uint32_t	nvmm_cpuid_t;
 
-#ifdef __x86_64__
+#if defined(__x86_64__)
 #include <dev/nvmm/x86/nvmm_x86.h>
 #endif
 

Index: src/sys/dev/nvmm/nvmm_internal.h
diff -u src/sys/dev/nvmm/nvmm_internal.h:1.16 src/sys/dev/nvmm/nvmm_internal.h:1.17
--- src/sys/dev/nvmm/nvmm_internal.h:1.16	Fri Jul  3 16:09:54 2020
+++ src/sys/dev/nvmm/nvmm_internal.h	Sat Aug  1 08:18:36 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvmm_internal.h,v 1.16 2020/07/03 16:09:54 maxv Exp $	*/
+/*	$NetBSD: nvmm_internal.h,v 1.17 2020/08/01 08:18:36 maxv Exp $	*/
 
 /*
  * Copyright (c) 2018-2020 The NetBSD Foundation, Inc.
@@ -119,8 +119,10 @@ struct nvmm_impl {
 	    struct nvmm_vcpu_exit *);
 };
 
+#if defined(__x86_64__)
 extern const struct nvmm_impl nvmm_x86_svm;
 extern const struct nvmm_impl nvmm_x86_vmx;
+#endif
 
 static inline bool
 nvmm_return_needed(void)

Reply via email to