git: f703dc0ef0e1 - main - bhyve: Put the prototype for vmexit_task_switch() in a header

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Sun, 23 Oct 2022 15:18:43 UTC
The branch main has been updated by markj:

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

commit f703dc0ef0e1d6ac1697cb8d6662870bd5e0fba6
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-10-23 14:21:50 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-10-23 15:11:33 +0000

    bhyve: Put the prototype for vmexit_task_switch() in a header
    
    No functional change intended.
    
    MFC after:      1 week
---
 usr.sbin/bhyve/bhyverun.c | 1 -
 usr.sbin/bhyve/bhyverun.h | 6 +++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index 348e7ab40196..6e7eed747e97 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -183,7 +183,6 @@ static const char * const vmx_exit_reason_desc[] = {
 };
 
 typedef int (*vmexit_handler_t)(struct vmctx *, struct vm_exit *, int *vcpu);
-extern int vmexit_task_switch(struct vmctx *, struct vm_exit *, int *vcpu);
 
 int guest_ncpus;
 uint16_t cores, maxcpus, sockets, threads;
diff --git a/usr.sbin/bhyve/bhyverun.h b/usr.sbin/bhyve/bhyverun.h
index 3ca252a8ffc2..e68b68fe5483 100644
--- a/usr.sbin/bhyve/bhyverun.h
+++ b/usr.sbin/bhyve/bhyverun.h
@@ -34,10 +34,12 @@
 #define	VMEXIT_CONTINUE		(0)
 #define	VMEXIT_ABORT		(-1)
 
-struct vmctx;
 extern int guest_ncpus;
 extern uint16_t cores, sockets, threads;
 
+struct vmctx;
+struct vm_exit;
+
 void *paddr_guest2host(struct vmctx *ctx, uintptr_t addr, size_t len);
 #ifdef BHYVE_SNAPSHOT
 uintptr_t paddr_host2guest(struct vmctx *ctx, void *addr);
@@ -46,4 +48,6 @@ uintptr_t paddr_host2guest(struct vmctx *ctx, void *addr);
 void fbsdrun_set_capabilities(struct vmctx *ctx, int cpu);
 int  fbsdrun_virtio_msix(void);
 
+int vmexit_task_switch(struct vmctx *, struct vm_exit *, int *vcpu);
+
 #endif