[Bug 205549] bhyve pci passthru stops working after guest is restarted

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jun 16 20:18:01 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205549

julien M <julien.mstr320 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |julien.mstr320 at gmail.com

--- Comment #9 from julien M <julien.mstr320 at gmail.com> ---
Having the same issue here with: FreeBSD 12.0-STABLE r349117 GENERIC  amd64
(Generic kernel WITH xhci support)

I patched stable with revisions 348778 and 348779 + D20623.

FIRST TRY (vm create + vm install):
BEFORE installing Ubuntu 18.04 on Bhyve:
$ pciconf -r ppt4 0x3f

145c1022 00100007 0c033000 00800010
d9b00004 00000000 00000000 00000000
00000000 00000000 00000000 50071458
00000000 00000048 00000000 00000325

AFTER REBOOT:
$ pciconf -r ppt4 0x3f

145c1022 00100407 0c033000 00800010
d9b00004 00000000 00000000 00000000
00000000 00000000 00000000 50071458
00000000 00000048 00000000 00000325

CHANGES: 00100007 => 00100407

SECOND TRY (vm destroy, vm create, vm install):
AFTER issuing: vm install linux linux.iso (while ubuntu is installing):
$ pciconf -r ppt4 0x3f

145c1022 10100407 0c033000 00800010
d9b00004 00000000 00000000 00000000
00000000 00000000 00000000 50071458
00000000 00000048 00000000 00000325

CHANGES: 00100407 => 10100407

THIRD TRY (vm destroy, vm create, vm install):
AFTER issuing: vm install ...:
$ pciconf -r ppt4 0x3f

145c1022 10100407 0c033000 00800010
d9b00004 00000000 00000000 00000000
00000000 00000000 00000000 50071458
00000000 00000048 00000000 00000325

CHANGES: NONE

It seems that the FIRST install is breaking everything by changing 00100007 to
00100407. After a FreeBSD reboot, the 00100007 is back and passthrough is
working when installing for the FIRST time linux in bhyve.


This is the device to be passed:
ppt2 at pci0:8:0:0:        class=0x130000 card=0x145a1022 chip=0x145a1022 rev=0x00
hdr=0x00
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Zeppelin/Raven/Raven2 PCIe Dummy Function'
    class      = non-essential instrumentation
ppt3 at pci0:8:0:2:        class=0x108000 card=0x14561022 chip=0x14561022 rev=0x00
hdr=0x00
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Family 17h (Models 00h-0fh) Platform Security Processor'
    class      = encrypt/decrypt
ppt4 at pci0:8:0:3:        class=0x0c0330 card=0x50071458 chip=0x145c1022 rev=0x00
hdr=0x00
    vendor     = 'Advanced Micro Devices, Inc. [AMD]'
    device     = 'Family 17h (Models 00h-0fh) USB 3.0 Host Controller'
    class      = serial bus
    subclass   = USB

Configuration for bhyve-vm:
...
passthru0="8/0/0"
passthru1="8/0/2"
passthru2="8/0/3"
...

I might be able to test this configuration in FreeBSD-CURRENT if that's of any
help? (compile times are low on a threadripper 1950x).

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


More information about the freebsd-virtualization mailing list