This started out over at the GTA V ON LINUX article where i was talking with @WastelandSamurai about why my VM's UEFI is not booting any ISO file.
TL;DR of what is and isn't working is at the end of the post.
Before This Started
Before i got to this point on setting up my VM, i had to set up VFIO and everything else needed to pass through a GPU to QEMU, and that was a pain, but with the current QEMU config I have both USB and the target GPU being passed through to QEMU and all seems well on that end. So, lets talk about the full details of this particular machine before we continue.
Critical System Specs
CPU: Intel i7 5820k
Motherboard: MSI X99S-SLI-PLUS (Supports IOMMU by the looks of things)
GPU1: ASUS Radeon HD 5850 (Host Machine's GPU)
GPU2: EVGA GeForce GTX 780 (VM's Target GPU for passthrough)
RAM: 16GB Corsair Vengeance LPX DD4 2133MHz
OS: Arch Linux w/ GNOME3
Boot Parameters
in arch.conf
...
options root=/dev/sdb3 i915.preliminary_hw_support=1 intel_iommu=on pcie_acs_override=downstream intremap=no_x2apic_optout
...
Im not sure if i need the i915 flag or not,but im fairly certain this config needs the acs override.
Script for VM
Next is the current script that I use for this particular build.
configfile=/etc/vfio-pci1.cfg
vfiobind() {
dev="$1"
vendor=$(cat /sys/bus/pci/devices/$dev/vendor)
device=$(cat /sys/bus/pci/devices/$dev/device)
if [ -e /sys/bus/pci/devices/$dev/driver ]; then
echo $dev > /sys/bus/pci/devices/$dev/driver/unbind
fi
echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id}
modprobe vfio-pci
cat $configfile | while read line;do
echo $line | grep ^# >/dev/null 2>&1 && continue
vfiobind $line
donecp /usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd /tmp/my_vars.fd
qemu-system-x86_64 \
-enable-kvm \
-m 12288 \
-cpu host,kvm=off \
-vga qxl \
-smp 4,sockets=1,cores=4,threads=1 \
-device ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=03:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=03:00.1,bus=root.1,addr=00.1 \
-device vfio-pci,host=08:00.0,bus=pci.0 \
-drive if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd \
-drive if=pflash,format=raw,file=/tmp/my_vars.fd
-drive file=/home/navihawk/windows1.img,id=disk,format=raw -device ide-hd,bus=ide.0,drive=disk \
-drive file=/home/navihawk/win81.iso,id=isocd -device ide-cd,bus=ide.1,drive=isocd \exit 0
Again, the issue comes into play when loading just the ISO file, same goes with the RAW IMG file if it were added.
Also, the "vga qxl" parameter is temporary so that i can use MKB without switching ports for the moment. I'll be switching it back to "vga none" if and when i need to.
the UEFI im using is the EDKII UEFI since im trying to stay away from SeaBIOS on this one.
What Works
- GPU Passthrough Is Working (At least i can get an image on an external monitor)
- USB Passthrough Is Working (Can Boot into a bootable install of Linux and also use any prehipherals plugged into the assigned USB 3.0 bus.
What Is Broken
Cannot load Installation ISOs
Cannot detect VM image? (possible)
GLib-Warning: gmem.c:482: custom memory allocation vtable not supported
Any and all help is appreciated!