Page MenuHomeFreeBSD

bhyve: Add CPU pinning diagnostic message
ClosedPublic

Authored by chuck on Jun 17 2026, 5:59 PM.
Tags
None
Referenced Files
F163585678: D57619.diff
Fri, Jul 24, 5:46 PM
Unknown Object (File)
Tue, Jul 21, 1:44 PM
Unknown Object (File)
Sun, Jul 19, 4:43 PM
Unknown Object (File)
Sat, Jul 18, 5:57 PM
Unknown Object (File)
Wed, Jul 15, 7:26 AM
Unknown Object (File)
Wed, Jul 15, 7:26 AM
Unknown Object (File)
Tue, Jul 14, 7:36 PM
Unknown Object (File)
Sat, Jul 11, 9:19 AM

Details

Summary

When pinning a vcpu to a hostcpu fails, print out a diagnostic message
to stderr indicating the failing CPU pair.

MFC after: 1 month

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74022
Build 70905: arc lint + arc unit

Event Timeline

chuck requested review of this revision.Jun 17 2026, 5:59 PM
bnovkov added inline comments.
usr.sbin/bhyve/bhyverun.c
573–583

We don't really end need error after removing the assertion so we can get rid of it.

576

I suggest adding in sterror(errno) to the warning, the extra information will come in handy.

chuck added inline comments.
usr.sbin/bhyve/bhyverun.c
576

My reading of ERR(3) suggests this is what warn(...) does, but perhaps I'm misunderstanding.

The err(), errc(), verr(), verrc(), warn(), warnc(), vwarn(), and vwarnc() functions append an error message obtained from strerror(3) based on a supplied error code value or the global variable errno, preceded by another colon and space unless the fmt argument is NULL.

Update based on review feedback

bnovkov added inline comments.
usr.sbin/bhyve/bhyverun.c
576

ah right, my bad, I always confuse it with warnx.

This revision is now accepted and ready to land.Jun 19 2026, 7:49 PM