git: f5f29d3c1303 - stable/14 - vmm: Rename the amdiommu driver to amdviiommu

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Sat, 09 Nov 2024 20:19:17 UTC
The branch stable/14 has been updated by kib:

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

commit f5f29d3c1303a5558a2bc0c135d4877dba8f7dbf
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-11-04 14:44:19 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-11-09 19:31:28 +0000

    vmm: Rename the amdiommu driver to amdviiommu
    
    (cherry picked from commit f95acbd89d594b5932197679d94d2ba23c1d0331)
---
 sys/amd64/vmm/amd/{amdiommu.c => amdviiommu.c} | 38 +++++++++++++-------------
 sys/modules/vmm/Makefile                       |  2 +-
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/sys/amd64/vmm/amd/amdiommu.c b/sys/amd64/vmm/amd/amdviiommu.c
similarity index 85%
rename from sys/amd64/vmm/amd/amdiommu.c
rename to sys/amd64/vmm/amd/amdviiommu.c
index 559a7bc7d953..e9b2dfc3dcbd 100644
--- a/sys/amd64/vmm/amd/amdiommu.c
+++ b/sys/amd64/vmm/amd/amdviiommu.c
@@ -41,36 +41,36 @@
 #include "amdvi_priv.h"
 #include "ivhd_if.h"
 
-struct amdiommu_softc {
+struct amdviiommu_softc {
 	struct resource *event_res;	/* Event interrupt resource. */
 	void   		*event_tag;	/* Event interrupt tag. */
 	int		event_rid;
 };
 
-static int	amdiommu_probe(device_t);
-static int	amdiommu_attach(device_t);
-static int	amdiommu_detach(device_t);
+static int	amdviiommu_probe(device_t);
+static int	amdviiommu_attach(device_t);
+static int	amdviiommu_detach(device_t);
 static int	ivhd_setup_intr(device_t, driver_intr_t, void *,
 		    const char *);
 static int	ivhd_teardown_intr(device_t);
 
-static device_method_t amdiommu_methods[] = {
+static device_method_t amdviiommu_methods[] = {
 	/* device interface */
-	DEVMETHOD(device_probe,			amdiommu_probe),
-	DEVMETHOD(device_attach,		amdiommu_attach),
-	DEVMETHOD(device_detach,		amdiommu_detach),
+	DEVMETHOD(device_probe,			amdviiommu_probe),
+	DEVMETHOD(device_attach,		amdviiommu_attach),
+	DEVMETHOD(device_detach,		amdviiommu_detach),
 	DEVMETHOD(ivhd_setup_intr,		ivhd_setup_intr),
 	DEVMETHOD(ivhd_teardown_intr,		ivhd_teardown_intr),
 	DEVMETHOD_END
 };
-static driver_t amdiommu_driver = {
-	"amdiommu",
-	amdiommu_methods,
-	sizeof(struct amdiommu_softc),
+static driver_t amdviiommu_driver = {
+	"amdviiommu",
+	amdviiommu_methods,
+	sizeof(struct amdviiommu_softc),
 };
 
 static int
-amdiommu_probe(device_t dev)
+amdviiommu_probe(device_t dev)
 {
 	int error;
 	int capoff;
@@ -100,7 +100,7 @@ amdiommu_probe(device_t dev)
 }
 
 static int
-amdiommu_attach(device_t dev)
+amdviiommu_attach(device_t dev)
 {
 
 	device_set_desc(dev, "AMD-Vi/IOMMU PCI function");
@@ -108,7 +108,7 @@ amdiommu_attach(device_t dev)
 }
 
 static int
-amdiommu_detach(device_t dev)
+amdviiommu_detach(device_t dev)
 {
 
 	return (0);
@@ -118,7 +118,7 @@ static int
 ivhd_setup_intr(device_t dev, driver_intr_t handler, void *arg,
     const char *desc)
 {
-	struct amdiommu_softc *sc;
+	struct amdviiommu_softc *sc;
 	int error, msicnt;
 
 	sc = device_get_softc(dev);
@@ -159,7 +159,7 @@ fail:
 static int
 ivhd_teardown_intr(device_t dev)
 {
-	struct amdiommu_softc *sc;
+	struct amdviiommu_softc *sc;
 
 	sc = device_get_softc(dev);
 
@@ -177,5 +177,5 @@ ivhd_teardown_intr(device_t dev)
 }
 
 /* This driver has to be loaded before ivhd */
-DRIVER_MODULE(amdiommu, pci, amdiommu_driver, 0, 0);
-MODULE_DEPEND(amdiommu, pci, 1, 1, 1);
+DRIVER_MODULE(amdviiommu, pci, amdviiommu_driver, 0, 0);
+MODULE_DEPEND(amdviiommu, pci, 1, 1, 1);
diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile
index 6bb78d055580..48a7dd851032 100644
--- a/sys/modules/vmm/Makefile
+++ b/sys/modules/vmm/Makefile
@@ -50,7 +50,7 @@ SRCS+=	ept.c		\
 # amd-specific files
 .PATH: ${SRCTOP}/sys/amd64/vmm/amd
 SRCS+=	vmcb.c		\
-	amdiommu.c	\
+	amdviiommu.c	\
 	ivhd_if.c	\
 	ivhd_if.h	\
 	svm.c		\