Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2024 18:58:29 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 3ccb02334bf5 - main - vmm: Move vmm_ktr.h to a common directory
Message-ID:  <202408261858.47QIwTrx027499@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=3ccb02334bf5aee49a66dcff4b9229220bd0184b

commit 3ccb02334bf5aee49a66dcff4b9229220bd0184b
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-08-26 18:41:05 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-08-26 18:41:05 +0000

    vmm: Move vmm_ktr.h to a common directory
    
    No functional change intended.
    
    Reviewed by:    corvink, jhb, emaste
    Differential Revision:  https://reviews.freebsd.org/D46429
---
 sys/amd64/vmm/amd/svm.c          |  3 +-
 sys/amd64/vmm/amd/vmcb.c         |  2 +-
 sys/amd64/vmm/intel/vmx.c        |  3 +-
 sys/amd64/vmm/io/ppt.c           |  4 +--
 sys/amd64/vmm/io/vatpic.c        |  6 ++--
 sys/amd64/vmm/io/vatpit.c        |  3 +-
 sys/amd64/vmm/io/vhpet.c         |  7 ++--
 sys/amd64/vmm/io/vioapic.c       |  3 +-
 sys/amd64/vmm/io/vlapic.c        |  4 +--
 sys/amd64/vmm/io/vrtc.c          |  3 +-
 sys/amd64/vmm/vmm.c              |  3 +-
 sys/amd64/vmm/vmm_ioport.c       |  3 +-
 sys/amd64/vmm/vmm_lapic.c        |  3 +-
 sys/amd64/vmm/x86.c              |  4 +--
 sys/arm64/vmm/vmm.c              |  2 +-
 sys/arm64/vmm/vmm_ktr.h          | 69 ----------------------------------------
 sys/{amd64 => dev}/vmm/vmm_ktr.h |  0
 17 files changed, 30 insertions(+), 92 deletions(-)

diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c
index b35cf53be080..1015b04ee161 100644
--- a/sys/amd64/vmm/amd/svm.c
+++ b/sys/amd64/vmm/amd/svm.c
@@ -54,9 +54,10 @@
 #include <machine/vmm_instruction_emul.h>
 #include <machine/vmm_snapshot.h>
 
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vmm_lapic.h"
 #include "vmm_stat.h"
-#include "vmm_ktr.h"
 #include "vmm_ioport.h"
 #include "vatpic.h"
 #include "vlapic.h"
diff --git a/sys/amd64/vmm/amd/vmcb.c b/sys/amd64/vmm/amd/vmcb.c
index 4bd2fae9f821..9a1008fa495c 100644
--- a/sys/amd64/vmm/amd/vmcb.c
+++ b/sys/amd64/vmm/amd/vmcb.c
@@ -37,7 +37,7 @@
 #include <machine/vmm.h>
 #include <machine/vmm_snapshot.h>
 
-#include "vmm_ktr.h"
+#include <dev/vmm/vmm_ktr.h>
 
 #include "vlapic.h"
 #include "vmcb.h"
diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c
index 31ca9256b527..63b0cf3d2ff9 100644
--- a/sys/amd64/vmm/intel/vmx.c
+++ b/sys/amd64/vmm/intel/vmx.c
@@ -58,10 +58,11 @@
 #include <machine/vmm_instruction_emul.h>
 #include <machine/vmm_snapshot.h>
 
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vmm_lapic.h"
 #include "vmm_host.h"
 #include "vmm_ioport.h"
-#include "vmm_ktr.h"
 #include "vmm_stat.h"
 #include "vatpic.h"
 #include "vlapic.h"
diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c
index 9fcfdc7cb441..109707dbcbd5 100644
--- a/sys/amd64/vmm/io/ppt.c
+++ b/sys/amd64/vmm/io/ppt.c
@@ -41,12 +41,12 @@
 #include <dev/pci/pcireg.h>
 
 #include <machine/resource.h>
-
 #include <machine/vmm.h>
 #include <machine/vmm_dev.h>
 
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vmm_lapic.h"
-#include "vmm_ktr.h"
 
 #include "iommu.h"
 #include "ppt.h"
diff --git a/sys/amd64/vmm/io/vatpic.c b/sys/amd64/vmm/io/vatpic.c
index 788fcec9ceb3..a003cd7e8c07 100644
--- a/sys/amd64/vmm/io/vatpic.c
+++ b/sys/amd64/vmm/io/vatpic.c
@@ -39,12 +39,12 @@
 #include <sys/systm.h>
 
 #include <x86/apicreg.h>
-#include <dev/ic/i8259.h>
-
 #include <machine/vmm.h>
 #include <machine/vmm_snapshot.h>
 
-#include "vmm_ktr.h"
+#include <dev/ic/i8259.h>
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vmm_lapic.h"
 #include "vioapic.h"
 #include "vatpic.h"
diff --git a/sys/amd64/vmm/io/vatpit.c b/sys/amd64/vmm/io/vatpit.c
index e7bf74dd7e94..31b6c2ad0f89 100644
--- a/sys/amd64/vmm/io/vatpit.c
+++ b/sys/amd64/vmm/io/vatpit.c
@@ -41,7 +41,8 @@
 #include <machine/vmm.h>
 #include <machine/vmm_snapshot.h>
 
-#include "vmm_ktr.h"
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vatpic.h"
 #include "vioapic.h"
 #include "vatpit.h"
diff --git a/sys/amd64/vmm/io/vhpet.c b/sys/amd64/vmm/io/vhpet.c
index daa85bccf14f..a1dfc7ba731f 100644
--- a/sys/amd64/vmm/io/vhpet.c
+++ b/sys/amd64/vmm/io/vhpet.c
@@ -37,19 +37,18 @@
 #include <sys/malloc.h>
 #include <sys/systm.h>
 
-#include <dev/acpica/acpi_hpet.h>
-
 #include <machine/vmm.h>
 #include <machine/vmm_dev.h>
 #include <machine/vmm_snapshot.h>
 
+#include <dev/acpica/acpi_hpet.h>
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vmm_lapic.h"
 #include "vatpic.h"
 #include "vioapic.h"
 #include "vhpet.h"
 
-#include "vmm_ktr.h"
-
 static MALLOC_DEFINE(M_VHPET, "vhpet", "bhyve virtual hpet");
 
 #define	HPET_FREQ	16777216		/* 16.7 (2^24) Mhz */
diff --git a/sys/amd64/vmm/io/vioapic.c b/sys/amd64/vmm/io/vioapic.c
index e1503b6a699b..8869dc1383e6 100644
--- a/sys/amd64/vmm/io/vioapic.c
+++ b/sys/amd64/vmm/io/vioapic.c
@@ -42,7 +42,8 @@
 #include <machine/vmm.h>
 #include <machine/vmm_snapshot.h>
 
-#include "vmm_ktr.h"
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vmm_lapic.h"
 #include "vlapic.h"
 #include "vioapic.h"
diff --git a/sys/amd64/vmm/io/vlapic.c b/sys/amd64/vmm/io/vlapic.c
index 7c29cca4d907..dce7528ac773 100644
--- a/sys/amd64/vmm/io/vlapic.c
+++ b/sys/amd64/vmm/io/vlapic.c
@@ -43,12 +43,12 @@
 
 #include <machine/clock.h>
 #include <machine/smp.h>
-
 #include <machine/vmm.h>
 #include <machine/vmm_snapshot.h>
 
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vmm_lapic.h"
-#include "vmm_ktr.h"
 #include "vmm_stat.h"
 
 #include "vlapic.h"
diff --git a/sys/amd64/vmm/io/vrtc.c b/sys/amd64/vmm/io/vrtc.c
index 0840f8e88d5c..7dc651a7b883 100644
--- a/sys/amd64/vmm/io/vrtc.c
+++ b/sys/amd64/vmm/io/vrtc.c
@@ -44,7 +44,8 @@
 
 #include <isa/rtc.h>
 
-#include "vmm_ktr.h"
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vatpic.h"
 #include "vioapic.h"
 #include "vrtc.h"
diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c
index f399f876717d..b0465ea84fcb 100644
--- a/sys/amd64/vmm/vmm.c
+++ b/sys/amd64/vmm/vmm.c
@@ -71,8 +71,9 @@
 #include <machine/vmm_instruction_emul.h>
 #include <machine/vmm_snapshot.h>
 
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vmm_ioport.h"
-#include "vmm_ktr.h"
 #include "vmm_host.h"
 #include "vmm_mem.h"
 #include "vmm_util.h"
diff --git a/sys/amd64/vmm/vmm_ioport.c b/sys/amd64/vmm/vmm_ioport.c
index ac14e54dc4a5..f036841f4e10 100644
--- a/sys/amd64/vmm/vmm_ioport.c
+++ b/sys/amd64/vmm/vmm_ioport.c
@@ -32,12 +32,13 @@
 #include <machine/vmm.h>
 #include <machine/vmm_instruction_emul.h>
 
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vatpic.h"
 #include "vatpit.h"
 #include "vpmtmr.h"
 #include "vrtc.h"
 #include "vmm_ioport.h"
-#include "vmm_ktr.h"
 
 #define	MAX_IOPORTS		1280
 
diff --git a/sys/amd64/vmm/vmm_lapic.c b/sys/amd64/vmm/vmm_lapic.c
index bafd839afe64..fd511733492e 100644
--- a/sys/amd64/vmm/vmm_lapic.c
+++ b/sys/amd64/vmm/vmm_lapic.c
@@ -33,8 +33,9 @@
 #include <x86/specialreg.h>
 #include <x86/apicreg.h>
 
+#include <dev/vmm/vmm_ktr.h>
+
 #include <machine/vmm.h>
-#include "vmm_ktr.h"
 #include "vmm_lapic.h"
 #include "vlapic.h"
 
diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c
index 1167652d88ea..a833b61786e7 100644
--- a/sys/amd64/vmm/x86.c
+++ b/sys/amd64/vmm/x86.c
@@ -36,11 +36,11 @@
 #include <machine/md_var.h>
 #include <machine/segments.h>
 #include <machine/specialreg.h>
-
 #include <machine/vmm.h>
 
+#include <dev/vmm/vmm_ktr.h>
+
 #include "vmm_host.h"
-#include "vmm_ktr.h"
 #include "vmm_util.h"
 #include "x86.h"
 
diff --git a/sys/arm64/vmm/vmm.c b/sys/arm64/vmm/vmm.c
index c6a49ebc4b03..f5173c4152bd 100644
--- a/sys/arm64/vmm/vmm.c
+++ b/sys/arm64/vmm/vmm.c
@@ -64,8 +64,8 @@
 #include <machine/vmm_instruction_emul.h>
 
 #include <dev/pci/pcireg.h>
+#include <dev/vmm/vmm_ktr.h>
 
-#include "vmm_ktr.h"
 #include "vmm_stat.h"
 #include "arm64.h"
 #include "mmu.h"
diff --git a/sys/arm64/vmm/vmm_ktr.h b/sys/arm64/vmm/vmm_ktr.h
deleted file mode 100644
index 965f440ae874..000000000000
--- a/sys/arm64/vmm/vmm_ktr.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
- *
- * Copyright (c) 2011 NetApp, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _VMM_KTR_H_
-#define	_VMM_KTR_H_
-
-#include <sys/ktr.h>
-#include <sys/pcpu.h>
-
-#ifndef KTR_VMM
-#define	KTR_VMM	KTR_GEN
-#endif
-
-#define	VCPU_CTR0(vm, vcpuid, format)					\
-CTR2(KTR_VMM, "vm %s[%d]: " format, vm_name((vm)), (vcpuid))
-
-#define	VCPU_CTR1(vm, vcpuid, format, p1)				\
-CTR3(KTR_VMM, "vm %s[%d]: " format, vm_name((vm)), (vcpuid), (p1))
-
-#define	VCPU_CTR2(vm, vcpuid, format, p1, p2)				\
-CTR4(KTR_VMM, "vm %s[%d]: " format, vm_name((vm)), (vcpuid), (p1), (p2))
-
-#define	VCPU_CTR3(vm, vcpuid, format, p1, p2, p3)			\
-CTR5(KTR_VMM, "vm %s[%d]: " format, vm_name((vm)), (vcpuid), (p1), (p2), (p3))
-
-#define	VCPU_CTR4(vm, vcpuid, format, p1, p2, p3, p4)			\
-CTR6(KTR_VMM, "vm %s[%d]: " format, vm_name((vm)), (vcpuid),		\
-    (p1), (p2), (p3), (p4))
-
-#define	VM_CTR0(vm, format)						\
-CTR1(KTR_VMM, "vm %s: " format, vm_name((vm)))
-
-#define	VM_CTR1(vm, format, p1)						\
-CTR2(KTR_VMM, "vm %s: " format, vm_name((vm)), (p1))
-
-#define	VM_CTR2(vm, format, p1, p2)					\
-CTR3(KTR_VMM, "vm %s: " format, vm_name((vm)), (p1), (p2))
-
-#define	VM_CTR3(vm, format, p1, p2, p3)					\
-CTR4(KTR_VMM, "vm %s: " format, vm_name((vm)), (p1), (p2), (p3))
-
-#define	VM_CTR4(vm, format, p1, p2, p3, p4)				\
-CTR5(KTR_VMM, "vm %s: " format, vm_name((vm)), (p1), (p2), (p3), (p4))
-#endif
diff --git a/sys/amd64/vmm/vmm_ktr.h b/sys/dev/vmm/vmm_ktr.h
similarity index 100%
rename from sys/amd64/vmm/vmm_ktr.h
rename to sys/dev/vmm/vmm_ktr.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202408261858.47QIwTrx027499>