#!/bin/sh

echo "full notation PCI address from USB controller" > /sys/bus/pci/devices/<full notation PCI address from USB controller>/driver/unbind
echo 0x<vendor ID prefix> 0x<vendor ID suffix> > /sys/bus/pci/drivers/vfio-pci/new_id

qemu-kvm \
	-rtc base=localtime,clock=host \
	-name windows \
	-enable-kvm \
	-bios /usr/share/edk2/ovmf/OVMF_CODE.fd -vga none \
	-m 8192 \
	-cpu host,kvm=off,check \
	-smp sockets=1,cores=2,threads=2 \
	-device vfio-pci,host=<PCI Address from GPU, usually 01:00.0>,multifunction=on \
	-device vfio-pci,host=<PCI Address from GPU Audio, usually 01:00.1>,multifunction=on \
	-device vfio-pci,host=<PCI address from USB controller>,multifunction=on \
	-hda /home/<username>/VMs/win10.img \
	-cdrom <full path to the win10 iso downloaded earlier>  \
	-nographic \
	;
