From da7408e105d605596ac926dd990d2c2e7aee2bc8 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Wed, 8 Aug 2012 02:33:06 +0400 Subject: [PATCH] xen: Support PCI passthrough. Previous commit reverted Xen back to 4.0.3 because xend from 4.1.* and newer hangs for unknown reasons. The new "xl" toolstack from 4.1.* and unstable works, yet PCI passthrough is not supported by xl in 4.1.* and is broken in the unstable. With this patch I was able to passthrough ATI Radeon HD 6950 without 3D acceleration, though, to both Linux and Windows guests. Which is the best archived result with Xen PCI passthrough on NixOS after trying out all possible Xen versions. Same VGA card works fine if passed through into a guest with KVM (acceleration, GPGPU, everything works). I should have tried KVM from the start. --- pkgs/applications/virtualization/xen/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/virtualization/xen/default.nix b/pkgs/applications/virtualization/xen/default.nix index ce799242e12..3cb16a6b442 100644 --- a/pkgs/applications/virtualization/xen/default.nix +++ b/pkgs/applications/virtualization/xen/default.nix @@ -79,6 +79,9 @@ stdenv.mkDerivation { substituteInPlace tools/xenstat/Makefile \ --replace /usr/include/curses.h ${ncurses}/include/curses.h + substituteInPlace tools/ioemu-qemu-xen/xen-hooks.mak \ + --replace /usr/include/pci ${pciutils}/include/pci + # Work around a bug in our GCC wrapper: `gcc -MF foo -v' doesn't # print the GCC version number properly. substituteInPlace xen/Makefile \