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
This commit is contained in:
Mark Johnston
2026-02-16 14:56:39 +00:00
parent c71354030a
commit 7ab5e3f29a
+7 -2
View File
@@ -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;
}