Commit 16dc3c6
pkg/xen-tools: rework QEMU vfio-igd for q35/UEFI iGPU passthrough
Replace the old Revert^2 stolen-memory patch with four targeted patches
for QEMU's hw/vfio/igd.c enabling Intel iGPU passthrough on q35/UEFI:
Patch 08 — backport upstream igd_gen() with Gen7-Gen12 device ID
detection. The old function returned 8 for all unrecognised IDs,
making generation-specific checks (BDSM offset, GMS encoding)
ineffective on Gen9+ hardware.
Patch 09 — restructure vfio_probe_igd_bar4_quirk() for q35/UEFI:
- Move GMCH/BDSM emulation and etc/igd-bdsm-size fw_cfg write before
the BDF/LPC bridge checks (q35 "Sorry Q35" exits early without it)
- Emulate BDSM at 0xC0 (64-bit) for Gen11+, 0x5C (32-bit) for older
- Preserve GMS in emulated GMCH (guest driver needs stolen memory size)
- Clear stale GTT entries from host POST to prevent IOMMU faults
- Fix GMS encoding for Gen9+ Atom SKUs (0xf0-0xff, 4 MB granularity)
Patch 10 — add BAR0 BDSM MMIO mirror quirk (backported from upstream).
The GPU reads BDSM through BAR0 at offset 0x1080C0 as well as PCI
config space; without the mirror the MMIO read returns the host PA
while PCI config returns the emulated guest PA, crashing the driver.
Patch 11 — temporary diagnostic logging for BDSM/GMCH/GTT/BAR0 mirror.
Also ship igd.rom in xen-tools (where QEMU runs on the host rootfs)
and update the eve-uefi reference.
Co-authored-by: Sergio Santos <sergioliveirasantos@gmail.com>
Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>1 parent 3d0b5f8 commit 16dc3c6
File tree
6 files changed
+660
-126
lines changed- pkg/xen-tools
- patches-4.19.0/x86_64
6 files changed
+660
-126
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
Lines changed: 0 additions & 124 deletions
This file was deleted.
Lines changed: 112 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
0 commit comments