[Bug 274389] bhyve in 15-CURRENT unable to boot OpenBSD anymore

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 14 Oct 2023 17:33:09 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274389

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markj@FreeBSD.org

--- Comment #1 from Mark Johnston <markj@FreeBSD.org> ---
> This has worked up until about a month ago.

Can you convert this into a pair of known-good and known-bad revisions?  That
is, what is the last revision where this worked, and what is the first revision
where it doesn't?

When I try booting the OpenBSD 7.3 installer, I hit an assertion failure in
modify_bar_registration():

 697         assert(error == 0);

(gdb) bt
#0  thr_kill () at thr_kill.S:4
#1  0x00000008016f83b4 in __raise (s=s@entry=6) at
/root/freebsd/lib/libc/gen/raise.c:50
#2  0x00000008017aa4c9 in abort () at /root/freebsd/lib/libc/stdlib/abort.c:65
#3  0x00000008016db741 in __assert (func=<optimized out>, file=<optimized out>,
line=line@entry=703, failedexpr=<optimized out>)
    at /root/freebsd/lib/libc/gen/assert.c:49
#4  0x0000000001059205 in modify_bar_registration (pi=0x801e32600, idx=0,
registration=registration@entry=1)
    at /usr/home/markj/src/freebsd/usr.sbin/bhyve/pci_emul.c:703
#5  0x0000000001058ceb in register_bar (pi=0xb6df6, idx=6) at
/usr/home/markj/src/freebsd/usr.sbin/bhyve/pci_emul.c:720
#6  0x0000000001058af9 in pci_cfgrw (in=<optimized out>, bus=<optimized out>,
slot=<optimized out>, func=<optimized out>, coff=<optimized out>, 
    bytes=<optimized out>, valp=0x7fffdeff5d0c) at
/usr/home/markj/src/freebsd/usr.sbin/bhyve/pci_emul.c:2375
#7  0x0000000001059614 in pci_emul_cfgdata (ctx=<optimized out>, in=749046,
port=<optimized out>, bytes=0, eax=<optimized out>, arg=<optimized out>)
    at /usr/home/markj/src/freebsd/usr.sbin/bhyve/pci_emul.c:2451
#8  0x000000000106e1b9 in emulate_inout (ctx=0x801e19500, vcpu=0x801e1b070,
vmexit=vmexit@entry=0x7fffdeff5ec8)
    at /usr/home/markj/src/freebsd/usr.sbin/bhyve/amd64/inout.c:223
#9  0x000000000106b9f0 in vmexit_inout (ctx=0xb6df6, vcpu=0x6, vmrun=<optimized
out>) at /usr/home/markj/src/freebsd/usr.sbin/bhyve/amd64/vmexit.c:84
#10 0x000000000104b610 in vm_loop (ctx=0x801e19500, vcpu=0x801e1b070) at
/usr/home/markj/src/freebsd/usr.sbin/bhyve/bhyverun.c:523
#11 0x000000000104a217 in fbsdrun_start_thread (param=0x801e25030) at
/usr/home/markj/src/freebsd/usr.sbin/bhyve/bhyverun.c:434
#12 0x000000080162aac5 in thread_start (curthread=0x801e15f00) at
/root/freebsd/lib/libthr/thread/thr_create.c:290
#13 0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffdeff6000
(gdb) frame 4
#4  0x0000000001059205 in modify_bar_registration (pi=0x801e32600, idx=0,
registration=registration@entry=1)
    at /usr/home/markj/src/freebsd/usr.sbin/bhyve/pci_emul.c:703
703             assert(error == 0);
(gdb) p pi
$2 = (struct pci_devinst *) 0x801e32600
(gdb) p pi->pi_bar[0]
$3 = {type = PCIBAR_IO, size = 128, addr = 0, lobits = 1 '\001'}
(gdb) frame 9
#9  0x000000000106b9f0 in vmexit_inout (ctx=0xb6fa6, vcpu=0x6, vmrun=<optimized
out>) at /usr/home/markj/src/freebsd/usr.sbin/bhyve/amd64/vmexit.c:84
84              error = emulate_inout(ctx, vcpu, vme)
(gdb) p vme->u.inout
$3 = {bytes = 4, in = 0, string = 0, rep = 0, port = 3324, eax = 0}

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