git: c945c9ddca8d - main - amd64/vmm: Rename vm_get_vmspace() to vm_vmspace()

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 07 Jan 2025 02:19:40 UTC
The branch main has been updated by markj:

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

commit c945c9ddca8d6db162334127a43ef8a0be1d3db1
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-01-07 02:16:04 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-01-07 02:16:04 +0000

    amd64/vmm: Rename vm_get_vmspace() to vm_vmspace()
    
    For consistency with other vm accessors.
    
    No functional change intended.
    
    Reviewed by:    corvink
    Differential Revision:  https://reviews.freebsd.org/D48268
---
 sys/amd64/include/vmm.h         | 2 +-
 sys/amd64/vmm/vmm.c             | 3 +--
 sys/amd64/vmm/vmm_dev_machdep.c | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h
index dd8e76962caf..6501baa455da 100644
--- a/sys/amd64/include/vmm.h
+++ b/sys/amd64/include/vmm.h
@@ -401,7 +401,7 @@ vcpu_should_yield(struct vcpu *vcpu)
 
 void *vcpu_stats(struct vcpu *vcpu);
 void vcpu_notify_event(struct vcpu *vcpu, bool lapic_intr);
-struct vmspace *vm_get_vmspace(struct vm *vm);
+struct vmspace *vm_vmspace(struct vm *vm);
 struct vatpic *vm_atpic(struct vm *vm);
 struct vatpit *vm_atpit(struct vm *vm);
 struct vpmtmr *vm_pmtmr(struct vm *vm);
diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c
index 0e3ab2845d58..d05d979a531a 100644
--- a/sys/amd64/vmm/vmm.c
+++ b/sys/amd64/vmm/vmm.c
@@ -2677,9 +2677,8 @@ vcpu_notify_event(struct vcpu *vcpu, bool lapic_intr)
 }
 
 struct vmspace *
-vm_get_vmspace(struct vm *vm)
+vm_vmspace(struct vm *vm)
 {
-
 	return (vm->vmspace);
 }
 
diff --git a/sys/amd64/vmm/vmm_dev_machdep.c b/sys/amd64/vmm/vmm_dev_machdep.c
index 2d0ceadaedfe..d8d2b460404c 100644
--- a/sys/amd64/vmm/vmm_dev_machdep.c
+++ b/sys/amd64/vmm/vmm_dev_machdep.c
@@ -441,7 +441,7 @@ vmmdev_machdep_ioctl(struct vm *vm, struct vcpu *vcpu, u_long cmd, caddr_t data,
 		break;
 	case VM_GET_GPA_PMAP:
 		gpapte = (struct vm_gpa_pte *)data;
-		pmap_get_mapping(vmspace_pmap(vm_get_vmspace(vm)),
+		pmap_get_mapping(vmspace_pmap(vm_vmspace(vm)),
 				 gpapte->gpa, gpapte->pte, &gpapte->ptenum);
 		error = 0;
 		break;