pkgsrc/sysutils/xentools42/patches/patch-qemu-xen-traditional_xen-hooks.mak
spz fcf436606c Apply patches for XSA-128 to XSA-140 from upstream
do a patch refresh in xentools42

rather than split the patches for pass-through.c over 5 files, delete
xentools42/patches/patch-CVE-2015-2756 and assemble all in
xentools42/patches/patch-qemu-xen-traditional_hw_pass-through.c
2015-08-23 16:17:12 +00:00

34 lines
932 B
Makefile

$NetBSD: patch-qemu-xen-traditional_xen-hooks.mak,v 1.2 2015/08/23 16:17:12 spz Exp $
enable PCI passthrough when pciutils is present
--- qemu-xen-traditional/xen-hooks.mak.orig 2014-01-09 12:44:42.000000000 +0000
+++ qemu-xen-traditional/xen-hooks.mak
@@ -57,17 +57,25 @@ endif
ifdef CONFIG_STUBDOM
CONFIG_PASSTHROUGH=1
else
- ifeq (,$(wildcard /usr/include/pci))
+ ifeq ($(CONFIG_NetBSD), y)
+CONFIG_PASSTHROUGH=1
+ else
+ ifeq (,$(wildcard /usr/include/pci))
$(warning === pciutils-dev package not found - missing /usr/include/pci)
$(warning === PCI passthrough capability has been disabled)
- else
+ else
CONFIG_PASSTHROUGH=1
+ endif
endif
endif
ifdef CONFIG_PASSTHROUGH
OBJS+= pass-through.o pt-msi.o pt-graphics.o
+ifeq ($(CONFIG_NetBSD), y)
+LIBS += -lpciutils -lpci
+else
LIBS += -lpci
+endif
CFLAGS += -DCONFIG_PASSTHROUGH
$(info === PCI passthrough capability has been enabled ===)
endif