Some results:
7000 series AMD CPU with AMD-VI.
I'm not sure if there are security concerns with giving out a motherboard model, so omitting that.
Monitor is a TV from around 2007 or so. I'm using one monitor.
This is on 13.1, and I think I'm up-to-date.
On the Host FreeBSD Machine:
in
/boot/loader.conf
Code:
#Reserve device for Bhyve passthrough
hw.vmm.amdvi.enable=1
vmm_load="YES"
pptdevs="3/0/0"
Code:
ppt0@pci0:3:0:0: class=0x030000 rev=0xc7 hdr=0x00 vendor=0x1002 device=0x73ff subv>
vendor = 'Advanced Micro Devices, Inc. [AMD/ATI]'
device = 'Navi 23 [Radeon RX 6600/6600 XT/6600M]'
class = display
subclass = VGA
I set this up for Linux Mint beforehand by following the Handbook.
I'm not sure what the differences are between the uefi-firmware files, but I saw this one mentioned.
/path/to/initialize/bhyve.sh
Code:
#! /bin/sh
bhyve -AHPS \
-s 0:0,hostbridge \
-s 1:0,lpc \
-s 2:0,virtio-net,tap0 \
-s 3:0,passthru,3/0/0 \
-s 5:0,virtio-blk,./mint.img \
-s 6:0,hda,play=/dev/dsp,rec=/dev/dsp \
-s 30,xhci,tablet \
-s 29,fbuf,tcp=0.0.0.0:5900,wait \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd \
-c 8 \
-m 8G linuxguest
On the linux guest:
In the file
/etc/X11/xorg.conf
Code:
Section "Device"
Identifier "AMD Card"
Driver "amdgpu"
BusID "PCI:0:3:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "AMD Card"
EndSection
Boot host, log in, and start X.
Start two terminal emulators.
Running the above script in a terminal emulator in the foreground gives a short response about the framebuffer being active.
The next few lines prevent me from going back to the FreeBSD host without a reboot.
Run remmina in the unused terminal (VNC viewer), select VM -> it crashes on the first run, creating a core file.
This next line is the point of no return.
Run remmina again, select the VM. -> this time it succeeds.
Without GPU passthrough - it creates a window and Linux will show up normally.
With GPU passthrough - The Display gets captured.
If the xorg.conf file does not exist or used PCI:3:0:0 instead of PCI:0:3:0, I get a black screen.
Audio on the host still works, but the host is now unreachable.
Using 14-CURRENT, and without running X, I would get the Linux Mint log-in screen, without a usable mouse or keyboard. X's log mentions PCI:0:3:0.
If the file used "PCI:0:3:0" :
At this point the Display goes black, with a thin green line at the bottom of the monitor.
The Linux Mint logo comes up, followed by the login screen.
The mouse pointer: works on the guest.
The keyboard: works on the guest.
Audio: works on the guest.
At this point I attempted to install some programs to test it.
GlxGears: works on the guest, and reports the GPU as being a 6600.
radeontop: works on the guest.
Steam: works on the guest, as I can play Factorio. This fixes some minor screen tearing.
Getting machine learning running seems to be fiddly.
Add the user to the render and video groups.
Install packages.
In python:
Code:
import torch; torch.cuda.is_available() returns True.
clinfo runs.
rocminfo runs.
I haven't gone much further.