git: e1390215af4e - main - bhyve: Remove special no-op handling for I/O port 0x488

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Thu, 15 Jun 2023 16:39:43 UTC
The branch main has been updated by markj:

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

commit e1390215af4ed975b43ccc41b75c30bdc0995d06
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-06-15 16:12:25 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-06-15 16:39:27 +0000

    bhyve: Remove special no-op handling for I/O port 0x488
    
    This appears to have been reserved for some kind of debug hook, but it's
    not implemented and appears never to have been used.
    
    Reviewed by:    corvink, jhb
    MFC after:      1 week
    Sponsored by:   Innovate UK
    Differential Revision:  https://reviews.freebsd.org/D40555
---
 usr.sbin/bhyve/bhyverun.c | 23 +----------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index d56a1575e65d..052657a50dbf 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -112,8 +112,6 @@ __FBSDID("$FreeBSD$");
 #include "rtc.h"
 #include "vmgenc.h"
 
-#define GUEST_NIO_PORT		0x488	/* guest upcalls via i/o port */
-
 #define MB		(1024UL * 1024)
 #define GB		(1024UL * MB)
 
@@ -564,36 +562,17 @@ fbsdrun_deletecpu(int vcpu)
 	return (CPU_EMPTY(&cpumask));
 }
 
-static int
-vmexit_handle_notify(struct vmctx *ctx __unused, struct vcpu *vcpu __unused,
-    struct vm_exit *vme __unused, uint32_t eax __unused)
-{
-#if BHYVE_DEBUG
-	/*
-	 * put guest-driven debug here
-	 */
-#endif
-	return (VMEXIT_CONTINUE);
-}
-
 static int
 vmexit_inout(struct vmctx *ctx, struct vcpu *vcpu, struct vm_run *vmrun)
 {
 	struct vm_exit *vme;
 	int error;
-	int bytes, port, in, out;
+	int bytes, port, in;
 
 	vme = vmrun->vm_exit;
 	port = vme->u.inout.port;
 	bytes = vme->u.inout.bytes;
 	in = vme->u.inout.in;
-	out = !in;
-
-        /* Extra-special case of host notifications */
-        if (out && port == GUEST_NIO_PORT) {
-                error = vmexit_handle_notify(ctx, vcpu, vme, vme->u.inout.eax);
-		return (error);
-	}
 
 	error = emulate_inout(ctx, vcpu, vme);
 	if (error) {