Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Apr 2020 21:12:37 -0500
From:      Dustin Marquess <dmarquess@gmail.com>
To:        FreeBSD virtualization <freebsd-virtualization@freebsd.org>
Subject:   bhyve + AMD + PCI passthru
Message-ID:  <CAJpsHY63ULeYuVN8OO3D%2BjmaKig9MyKyvoJ4%2BA=kz3BX39gRyA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I have this weird issue.  I have a PC Engines box with a AMD SoC in it.

I'm trying to pass through the USB 3.0 controller to a Windows VM.  I added:

hw.vmm.amdvi.enable="1"
pptdevs="0/16/0"

to /boot/loader.conf, rebooted, installed Windows, etc.  Everything
works great until I add:

-s 5,passthru,0/16/0

to my bhyve command line.  As soon as I add that (and don't change
anything else), TitanoCore suddenly can't boot from the virtual HD
anymore:

Boot Failed. EFI Hard Drive
.PXE-E18: Server response timeout.
Boot Failed. EFI Network
UEFI Interactive Shell v2.1
EDK II
UEFI v2.40 (BHYVE, 0x00010000)
Mapping table
     BLK0: Alias(s):
          PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0x0,0x0)
Press ESC in 1 seconds to skip startup.nsh or any other key to continue.
Shell>

I take the passthru back out and Windows works fine.

Does this make sense?

My full command line is:

bhyve -A -H -P -w -S -u -c sockets=1,cores=3,threads=1 -m 3G \
-s 0,amd_hostbridge \
-s 3,nvme,/dev/ada0 \
-s 5,passthru,0/16/0 \
-s 10,virtio-net,tap0,mac=4a:ab:0f:25:4c:b7 \
-s 20,virtio-rnd \
-s 31,lpc \
-l com1,/dev/nmdm0A -l
bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd win2019

Changing nvme to ahci-hd doesn't help.  Only difference between the
two is that "Boot Failed. EFI Hard Drive" turns into "Boot Failed. EFI
Misc Device".

This is really strange!

Thanks,
-Dustin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJpsHY63ULeYuVN8OO3D%2BjmaKig9MyKyvoJ4%2BA=kz3BX39gRyA>