Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jan 2025 02:19:39 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: b09fe08ede8f - main - amd64/vmm: Remove vmm_mem_init()
Message-ID:  <202501070219.5072JddV029185@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=b09fe08ede8f90ab40f09eac49700698dd4d02b3

commit b09fe08ede8f90ab40f09eac49700698dd4d02b3
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-01-07 02:15:51 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-01-07 02:15:51 +0000

    amd64/vmm: Remove vmm_mem_init()
    
    It is a no-op and doesn't exist on other platforms.  As part of some
    work to deduplicate vmm code, just remove it.
    
    No functional change intended.
    
    Reviewed by:    corvink
    Differential Revision:  https://reviews.freebsd.org/D48267
---
 sys/amd64/vmm/vmm.c     | 6 ------
 sys/amd64/vmm/vmm_mem.c | 7 -------
 sys/amd64/vmm/vmm_mem.h | 1 -
 3 files changed, 14 deletions(-)

diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c
index d1f57a717fdf..0e3ab2845d58 100644
--- a/sys/amd64/vmm/vmm.c
+++ b/sys/amd64/vmm/vmm.c
@@ -427,8 +427,6 @@ vm_exitinfo_cpuset(struct vcpu *vcpu)
 static int
 vmm_init(void)
 {
-	int error;
-
 	if (!vmm_is_hw_supported())
 		return (ENXIO);
 
@@ -449,10 +447,6 @@ vmm_init(void)
 	if (vmm_ipinum < 0)
 		vmm_ipinum = IPI_AST;
 
-	error = vmm_mem_init();
-	if (error)
-		return (error);
-
 	vmm_suspend_p = vmmops_modsuspend;
 	vmm_resume_p = vmmops_modresume;
 
diff --git a/sys/amd64/vmm/vmm_mem.c b/sys/amd64/vmm/vmm_mem.c
index 0e953b6af534..e96c9e4bdc66 100644
--- a/sys/amd64/vmm/vmm_mem.c
+++ b/sys/amd64/vmm/vmm_mem.c
@@ -45,13 +45,6 @@
 
 #include "vmm_mem.h"
 
-int
-vmm_mem_init(void)
-{
-
-	return (0);
-}
-
 vm_object_t
 vmm_mmio_alloc(struct vmspace *vmspace, vm_paddr_t gpa, size_t len,
 	       vm_paddr_t hpa)
diff --git a/sys/amd64/vmm/vmm_mem.h b/sys/amd64/vmm/vmm_mem.h
index b237e08ccc05..41b9bf07c4fc 100644
--- a/sys/amd64/vmm/vmm_mem.h
+++ b/sys/amd64/vmm/vmm_mem.h
@@ -32,7 +32,6 @@
 struct vmspace;
 struct vm_object;
 
-int		vmm_mem_init(void);
 struct vm_object *vmm_mmio_alloc(struct vmspace *, vm_paddr_t gpa, size_t len,
 				 vm_paddr_t hpa);
 void		vmm_mmio_free(struct vmspace *, vm_paddr_t gpa, size_t size);



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