Skip to content

Instantly share code, notes, and snippets.

@dougvj
Last active July 22, 2025 05:37
Show Gist options
  • Select an option

  • Save dougvj/c6d0957fc695d3e3095768fa17ac95d8 to your computer and use it in GitHub Desktop.

Select an option

Save dougvj/c6d0957fc695d3e3095768fa17ac95d8 to your computer and use it in GitHub Desktop.
QEMU AMD Ryzen 7000/9000 Series iGPU Passthrough (No Libvirt) for looking glass
sudo qemu-system-x86_64 \
-netdev tap,br=br0,id=hostnet0,helper=/usr/lib/qemu/qemu-bridge-helper,vhost=on \
-device virtio-net-pci,netdev=hostnet0,mac=52:54:be:66:77:88,id=net0,mq=on,vectors=18 \
-machine type=q35 \
-m 8G \
-cpu host,-hypervisor,kvm=off,+topoext,hv-vendor-id=0123456789ab,hv-passthrough \
-fw_cfg opt/ovmf/X-PciMmio64Mb,string=65536 \
-smp cores=8,threads=2 \
-enable-kvm \
-display none \
-vga none \
-monitor stdio \
-drive file=./w11.qcow2,if=virtio,aio=native,cache.direct=on \
-global driver=cfi.pflash01,property=secure,value=on\
-drive if=pflash,format=raw,unit=0,file='/usr/share/OVMF/x64/OVMF_CODE.4m.fd',readonly=on\
-drive if=pflash,format=raw,unit=1,file='nvram.fd' \
-device ivshmem-plain,memdev=ivshmem,bus=pcie.0 \
-object memory-backend-file,id=ivshmem,share=on,mem-path=/dev/shm/looking-glass,size=32M \
-device virtio-serial-pci \
-chardev spicevmc,id=vdagent,name=vdagent \
-device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
-device ich9-intel-hda,id=sound0 \
-device virtio-mouse-pci \
-device virtio-keyboard-pci \
-spice port=5900,disable-ticketing \
-device pcie-root-port,id=pcie.1,chassis=1,bus=pcie.0,addr=0x7.0 \
-device pcie-root-port,id=pcie.2,chassis=2,bus=pcie.0,addr=0x8.0 \
-device vfio-pci,host=13:00.0,multifunction=on,romfile=./vbios_1002_164e.bin,bus=pcie.1,addr=0x0.0,x-vga=on \
-device vfio-pci,host=13:00.1,romfile=./AMDGopDriver.rom,bus=pcie.2,addr=0x0.0 \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment