git: 1befa93683a3 - stable/15 - bhyve: Fix a misleading error message
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Mar 2026 15:59:02 UTC
The branch stable/15 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=1befa93683a362f75722db1fd5d2adc589fb70ca
commit 1befa93683a362f75722db1fd5d2adc589fb70ca
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-02-16 14:56:39 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-03-31 15:57:29 +0000
bhyve: Fix a misleading error message
The ioctl might fail because it's run in a jail which doesn't have
permission to invoke ppt ioctls.
Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D55070
(cherry picked from commit 7ab5e3f29a50bc9294a139cc0e8e661a7c036ba3)
---
usr.sbin/bhyve/pci_passthru.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c
index 662390413dbc..e38dc327fdff 100644
--- a/usr.sbin/bhyve/pci_passthru.c
+++ b/usr.sbin/bhyve/pci_passthru.c
@@ -987,8 +987,13 @@ passthru_init(struct pci_devinst *pi, nvlist_t *nvl)
}
if (vm_assign_pptdev(pi->pi_vmctx, bus, slot, func) != 0) {
- warnx("PCI device at %d/%d/%d is not using the ppt(4) driver",
- bus, slot, func);
+ if (errno == ENOENT) {
+ EPRINTLN(
+ "PCI device at %d/%d/%d is not using the ppt driver",
+ bus, slot, func);
+ } else {
+ EPRINTLN("vm_assign_pptdev: %s", strerror(errno));
+ }
goto done;
}