QEMU Single GPU passthrough for laptop's integraded graphics?

Does someone knows how to setup a QEMU VM with GPU passthrough when you only have integraded graphics?
I read about regular single GPU passthrough, but all info I found wasn’t suitable if this single gpu is iGPU.
If someone can share a guide or something would be nice.

System:

System:
  Kernel: 5.15.85-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.15-x86_64
    root=UUID=b11151cf-968d-43ca-b20e-de830fdcd43d rw rootflags=subvol=@
    quiet udev.log_priority=3
  Desktop: KDE Plasma v: 5.26.4 tk: Qt v: 5.15.7 info: latte-dock
    wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Acer product: Swift SF314-43 v: V1.04
    serial: <superuser required>
  Mobo: LN model: Sake_CA v: V1.04 serial: <superuser required> UEFI: Insyde
    v: 1.04 date: 07/28/2021
Battery:
  ID-1: BAT1 charge: 38.7 Wh (79.6%) condition: 48.6/53.2 Wh (91.3%)
    volts: 12.3 min: 11.6 model: COSMX AP20CBL type: Li-ion serial: <filter>
    status: N/A
CPU:
  Info: model: AMD Ryzen 5 5500U with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 2 gen: 3 level: v3 note: check built: 2020-22
    process: TSMC n7 (7nm) family: 0x17 (23) model-id: 0x68 (104) stepping: 1
    microcode: 0x8608102
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB L3: 8 MiB
    desc: 2x4 MiB
  Speed (MHz): avg: 1510 high: 1976 min/max: 1400/4056 boost: disabled
    scaling: driver: acpi-cpufreq governor: ondemand cores: 1: 1305 2: 1384
    3: 1357 4: 1440 5: 1812 6: 1495 7: 1976 8: 1812 9: 1424 10: 1436 11: 1397
    12: 1292 bogomips: 50324
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT enabled with STIBP
    protection
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl and seccomp
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, STIBP:
    always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Lucienne vendor: Acer Incorporated ALI driver: amdgpu
    v: kernel arch: GCN-5.1 code: Vega-2 process: TSMC n7 (7nm) built: 2018-21
    pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s
    ports: active: eDP-1 empty: DP-1,HDMI-A-1 bus-ID: 03:00.0
    chip-ID: 1002:164c class-ID: 0300 temp: 40.0 C
  Device-2: Quanta HD User Facing type: USB driver: uvcvideo bus-ID: 1-3:2
    chip-ID: 0408:a094 class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.6 with: Xwayland v: 22.1.7
    compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting
    alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 mapped: eDP model: AU Optronics 0x683d built: 2019
    res: 1920x1080 hz: 60 dpi: 158 gamma: 1.2 size: 309x174mm (12.17x6.85")
    diag: 355mm (14") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: OpenGL v: 4.6 Mesa 22.3.1 renderer: AMD Radeon Graphics (renoir LLVM
    14.0.6 DRM 3.42 5.15.85-1-MANJARO) direct render: Yes
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio
    vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel pcie: gen: 3
    speed: 8 GT/s lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 03:00.1
    chip-ID: 1002:1637 class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor
    vendor: Acer Incorporated ALI driver: snd_rn_pci_acp3x v: kernel
    alternate: snd_pci_acp3x,snd_pci_acp5x pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 03:00.5
    chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Acer Incorporated ALI
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 03:00.6 chip-ID: 1022:15e3
    class-ID: 0403
  Sound API: ALSA v: k5.15.85-1-MANJARO running: yes
  Sound Server-1: JACK v: 1.9.21 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.63 running: yes
Network:
  Device-1: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
    vendor: Lite-On driver: mt7921e v: kernel pcie: gen: 2 speed: 5 GT/s
    lanes: 1 bus-ID: 01:00.0 chip-ID: 14c3:7961 class-ID: 0280
  IF: wlp1s0 state: up mac: <filter>
  IF-ID-1: tap-easytether state: down mac: <filter>
Bluetooth:
  Device-1: Lite-On Wireless_Device type: USB driver: btusb v: 0.8
    bus-ID: 1-4:3 chip-ID: 04ca:3802 class-ID: e001 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 476.94 GiB used: 386.44 GiB (81.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Kingston model: OM8PDP3512B-AA1
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: EDFK0S03 temp: 43.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 456.64 GiB size: 456.64 GiB (100.00%)
    used: 382.43 GiB (83.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 608 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 456.64 GiB size: 456.64 GiB (100.00%)
    used: 382.43 GiB (83.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 456.64 GiB size: 456.64 GiB (100.00%)
    used: 382.43 GiB (83.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 20 GiB used: 4.01 GiB (20.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: 42.1 C mobo: N/A gpu: amdgpu temp: 41.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 410 Uptime: 23h 42m wakeups: 15148 Memory: 14.98 GiB
  used: 8.27 GiB (55.2%) Init: systemd v: 252 default: graphical
  tool: systemctl Compilers: gcc: 12.2.0 clang: 14.0.6 Packages: pm: pacman
  pkgs: 1681 libs: 480 tools: pamac,yay Shell: Zsh v: 5.9 default: Bash
  v: 5.1.16 running-in: yakuake inxi: 3.3.24

Go here and ask? Although I’ve been using GPU passthrough for five years, I have two GPUs.

And I have the impression that the single-GPU passthrough configuration process has been very torturous.

1 Like

I think the iGPU passthrough would still be unusable, especially for a windows guest. If somebody needs to run windows 3D programs and several unix shell scripts at the same time, windows 11 + WSL2 might be a better choice.

In fact, the new Intel iGPU supports SR-IOV, which is basically available now.
Basically, it can realize single GPU pass-through, but it seems that looking-glass cannot be used now.
Unfortunately, OP uses 5500U.

Why will it be unusable? Every article I found says that performance with passthrough near the same. It’s not like Vega 7 is really week, it can run games and emulation. I would understand if my linux desktop was hanging at the same time, but with single passthrough you close it via script.
I mean is there something else to it?