Skip to content

Instantly share code, notes, and snippets.

View gnif's full-sized avatar
🏠
Working from home

Geoffrey McRae gnif

🏠
Working from home
View GitHub Profile
@gnif
gnif / qemu-pcie-nasty.patch
Created October 7, 2018 00:11
Nasty/hacky QEMU patch to enable PCIe x 16 Gen 3.0 for Qemu VFIO
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 6c91bd44a0..f3c7b9d328 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -39,6 +39,166 @@
#define PCIE_DEV_PRINTF(dev, fmt, ...) \
PCIE_DPRINTF("%s:%x "fmt, (dev)->name, (dev)->devfn, ## __VA_ARGS__)
+static uint16_t pcie_link_max_width(PCIDevice *dev)
+{