Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Nov 2020 09:26:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        virtualization@FreeBSD.org
Subject:   [Bug 250802] bhyve exited with status 134 when GPU PCI passthrough
Message-ID:  <bug-250802-27103-Y4HVDhqlNg@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-250802-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-250802-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250802

--- Comment #31 from mr.xanto@gmail.com ---
(In reply to Konstantin Belousov from comment #30)

# /usr/local/bin/gdb /usr/sbin/bhyve
GNU gdb (GDB) 9.2 [GDB v9.2 for FreeBSD]

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/bhyve...
(gdb) set args -c 1 -m 3G -Hwl
bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -U
00dad61d-0d2e-11eb-936d-70f3951447ea -S -s 0,hostbridge -s 31,lpc -s
4:0,ahci,hd:/mnt/Data/vm/win10/disk0.img -s
5:0,virtio-net,tap0,mac=3D58:9c:fc:01:00:a8 -s 6:0,passthru,1/0/0 -s
6:1,passthru,1/0/1 win10
(gdb) run
Assertion failed: (pi->pi_bar[baridx].type =3D=3D PCIBAR_IO), function
passthru_write, file /usr/src/usr.sbin/bhyve/pci_passthru.c, line 916.

Thread 11 "vcpu 0" received signal SIGABRT, Aborted.
[Switching to LWP 101424 of process 52943]
0x000000080080aafa in thr_kill () from /lib/libc.so.7
(gdb) backtrace
#0  0x000000080080aafa in thr_kill () from /lib/libc.so.7
#1  0x0000000800808f54 in raise () from /lib/libc.so.7
#2  0x000000080077f259 in abort () from /lib/libc.so.7
#3  0x00000008007f9161 in __assert () from /lib/libc.so.7
#4  0x000000000023d9e4 in passthru_write (ctx=3D0x800299080, vcpu=3D0,
pi=3D0x800ad4780, baridx=3D1, offset=3D242044928, size=3D4, value=3D0)
    at /usr/src/usr.sbin/bhyve/pci_passthru.c:916
#5  0x000000000023685f in pci_emul_mem_handler (ctx=3D0x800299080, vcpu=3D6,
dir=3D<optimized out>, addr=3D<optimized out>, size=3D<optimized out>,
val=3D0x7fffdedf4d60,
    arg1=3D0x800ad4780, arg2=3D1) at /usr/src/usr.sbin/bhyve/pci_emul.c:411
#6  0x0000000000228c15 in mem_write (ctx=3D0x18c30, vcpu=3D6, gpa=3D3436817=
0778,
wval=3D0, size=3D0, arg=3D0x0) at /usr/src/usr.sbin/bhyve/mem.c:162
#7  0x000000000024ebb6 in emulate_mov (vm=3D<optimized out>, vcpuid=3D<opti=
mized
out>, gpa=3D<optimized out>, vie=3D<optimized out>, memread=3D<optimized ou=
t>,
    memwrite=3D0x228be0 <mem_write>, arg=3D0x800b76100) at
/usr/src/sys/amd64/vmm/vmm_instruction_emul.c:600
#8  vmm_emulate_instruction (vm=3D<optimized out>, vcpuid=3D<optimized out>,
gpa=3D<optimized out>, vie=3D<optimized out>, paging=3D<optimized out>,
memread=3D<optimized out>,
    memwrite=3D0x228be0 <mem_write>, memarg=3D0x800b76100) at
/usr/src/sys/amd64/vmm/vmm_instruction_emul.c:1697
#9  0x000000000022859f in emulate_mem_cb (ctx=3D0x18c30, vcpu=3D6, paddr=3D=
0, mr=3D0x0,
arg=3D<optimized out>) at /usr/src/usr.sbin/bhyve/mem.c:238
#10 0x00000000002284c4 in access_memory (ctx=3D0x800299080, vcpu=3D0,
paddr=3D3731705856, cb=3D0x228580 <emulate_mem_cb>, arg=3D0x7fffdedf4ee8)
    at /usr/src/usr.sbin/bhyve/mem.c:215
#11 0x00000000002283e9 in emulate_mem (ctx=3D0x18c30, vcpu=3D6, paddr=3D0,
vie=3D<optimized out>, paging=3D<optimized out>) at
/usr/src/usr.sbin/bhyve/mem.c:251
#12 0x000000000021e845 in vmexit_inst_emul (ctx=3D0x18c30, vmexit=3D0x256140
<vmexit>, pvcpu=3D<optimized out>) at /usr/src/usr.sbin/bhyve/bhyverun.c:716
#13 0x000000000021e29c in vm_loop (ctx=3D0x800299080, vcpu=3D0, startrip=3D=
65520) at
/usr/src/usr.sbin/bhyve/bhyverun.c:853
#14 0x000000000021d5a3 in fbsdrun_start_thread (param=3D0x2569c0 <mt_vmm_in=
fo>)
at /usr/src/usr.sbin/bhyve/bhyverun.c:427
#15 0x0000000800635fac in ?? () from /lib/libthr.so.3
#16 0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffdedf5000
(gdb) f 4
#4  0x000000000023d9e4 in passthru_write (ctx=3D0x800299080, vcpu=3D0,
pi=3D0x800ad4780, baridx=3D1, offset=3D242044928, size=3D4, value=3D0)
    at /usr/src/usr.sbin/bhyve/pci_passthru.c:916
916                     assert(pi->pi_bar[baridx].type =3D=3D PCIBAR_IO);
(gdb) p/x pi->pi_bar
$1 =3D {{type =3D 0x2, size =3D 0x1000000, addr =3D 0xc1000000}, {type =3D =
0x3, size =3D
0x10000000, addr =3D 0xd0000000}, {type =3D 0x4, size =3D 0x0, addr =3D 0x0=
}, {type =3D
0x3,
    size =3D 0x2000000, addr =3D 0xc2000000}, {type =3D 0x4, size =3D 0x0, =
addr =3D 0x0},
{type =3D 0x1, size =3D 0x80, addr =3D 0x2080}}
(gdb)

bhyvectl --get-all: https://pastebin.com/u1exMRin

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250802-27103-Y4HVDhqlNg>