git: d730cdea2ab3 - main - arm64/vmm: Avoid unnecessary indirection in vmmops_modinit()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Jun 2024 01:21:21 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d730cdea2ab32750e45955dd2e570152b6f81def commit d730cdea2ab32750e45955dd2e570152b6f81def Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-06-14 00:16:57 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-06-14 01:19:00 +0000 arm64/vmm: Avoid unnecessary indirection in vmmops_modinit() Most of vmm.h is machine-independent. Simplify merging amd64 and arm64 vmm code by removing this machine-dependent routine from arm64's vmm.h. No functional change intended. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D45557 --- sys/arm64/include/vmm.h | 7 ------- sys/arm64/vmm/vmm_arm64.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/arm64/include/vmm.h b/sys/arm64/include/vmm.h index cf00dd60a43f..05b013557c06 100644 --- a/sys/arm64/include/vmm.h +++ b/sys/arm64/include/vmm.h @@ -201,13 +201,6 @@ cpuset_t vm_active_cpus(struct vm *vm); cpuset_t vm_debug_cpus(struct vm *vm); cpuset_t vm_suspended_cpus(struct vm *vm); -static __inline bool -virt_enabled(void) -{ - - return (has_hyp()); -} - static __inline int vcpu_rendezvous_pending(struct vm_eventinfo *info) { diff --git a/sys/arm64/vmm/vmm_arm64.c b/sys/arm64/vmm/vmm_arm64.c index 6b058a993cdd..1b61871014a7 100644 --- a/sys/arm64/vmm/vmm_arm64.c +++ b/sys/arm64/vmm/vmm_arm64.c @@ -239,7 +239,7 @@ vmmops_modinit(int ipinum) int cpu, i; bool rv __diagused; - if (!virt_enabled()) { + if (!has_hyp()) { printf( "vmm: Processor doesn't have support for virtualization\n"); return (ENXIO);