[Bug 290098] bhyve crashes when trying to boot or run a 9front VM and other OSes

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 20 Oct 2026 22:07:23 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290098

--- Comment #26 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

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

commit 6f051f0e56feba19731adfa6f6bd2a098b5091de
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-10-20 15:41:21 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-10-20 22:04:55 +0000

    bhyve: Treat BAR registration failures as non-fatal

    Some guest operating systems (at least 9front) will leave device I/O
    space decoding enabled while probing BAR sizes.  In this case, a
    sufficiently large 32-bit BAR can overlap with the HPET MMIO region
    fixed at 0xfed00000.  This results in an assertion failure in
    modify_bar_registration(), even though the collision is transient, i.e.,
    the guest will promptly map the BAR elsewhere.

    Tolerate such overlaps.  Keep track of a BAR's registration state and
    make sure that modify_bar_registration() doesn't try to unregister an
    I/O space if registration failed.

    This fixes a problem where a 32MB framebuffer ends up overlapping with
    the HPET MMIO region, causing some guests to crash with an assertion
    failure when probing BARs during boot.

    PR:             290098
    Reviewed by:    bnovkov
    MFC after:      2 weeks
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D60748

 usr.sbin/bhyve/pci_emul.c | 46 +++++++++++++++++++++++++++++++---------------
 usr.sbin/bhyve/pci_emul.h |  2 ++
 2 files changed, 33 insertions(+), 15 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.