summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2012-05-29 15:01:34 +0000
committerbouyer <bouyer@pkgsrc.org>2012-05-29 15:01:34 +0000
commit3ca8160195f8f596beaa5bae02a5f66a8b3fb73f (patch)
tree8c40e4d100bcb12b697bb88b5f19221ad62f9fc2 /sysutils
parentcb4563def4811d595174cf4c2e1501be6f16c319 (diff)
downloadpkgsrc-3ca8160195f8f596beaa5bae02a5f66a8b3fb73f.tar.gz
Add support for PCI pass-through for HVM guests, based on patch sent by
dukzcry <lomka@gero.in> on netbsd-users@ on may 14. This supports only HVM guests, and only with the xl tool. bump pkgrevision.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xentools41/Makefile5
-rw-r--r--sysutils/xentools41/distinfo9
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.c13
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.h18
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-graphics.c13
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.c15
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.h12
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_xen-hooks.mak34
-rw-r--r--sysutils/xentools41/patches/patch-libxl_libxl_internal.h16
9 files changed, 132 insertions, 3 deletions
diff --git a/sysutils/xentools41/Makefile b/sysutils/xentools41/Makefile
index 1f9b6cef2fe..40cb8a25e75 100644
--- a/sysutils/xentools41/Makefile
+++ b/sysutils/xentools41/Makefile
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.17 2012/05/10 16:07:36 abs Exp $
+# $NetBSD: Makefile,v 1.18 2012/05/29 15:01:34 bouyer Exp $
#
# VERSION is set in version.mk as it is shared with other packages
.include "version.mk"
DISTNAME= xen-${VERSION}
PKGNAME= xentools41-${VERSION}
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= sysutils
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
@@ -174,5 +174,6 @@ CPPFLAGS+= -Dshm_open=open -Dshm_unlink=unlink
.include "../../devel/ncurses/buildlink3.mk"
#.include "../../devel/SDL/buildlink3.mk"
.include "../../lang/ocaml/buildlink3.mk"
+.include "../../sysutils/pciutils/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xentools41/distinfo b/sysutils/xentools41/distinfo
index 919d6130bb6..bbbccbb4469 100644
--- a/sysutils/xentools41/distinfo
+++ b/sysutils/xentools41/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2012/05/10 16:07:36 abs Exp $
+$NetBSD: distinfo,v 1.19 2012/05/29 15:01:34 bouyer Exp $
SHA1 (ipxe-git-v1.0.0.tar.gz) = da052c8de5f3485fe0253c19cf52ed6d72528485
RMD160 (ipxe-git-v1.0.0.tar.gz) = dcd9b6eaafa1ce05c1ebf2a15f2f73ad7a8c5547
@@ -36,7 +36,14 @@ SHA1 (patch-dc) = d860fe3725978227278d58f09e7d5157001e463e
SHA1 (patch-dd) = e66d9cc0028ba922b050fc142862b4095cd018f3
SHA1 (patch-de) = fae94b61a430a1a7dd98c9a6a04e4513824c6d8d
SHA1 (patch-df) = d20bf9d3fd05f5334f77c9154bf0fb9944c1292c
+SHA1 (patch-ioemu-qemu-xen_hw_pass-through.c) = 7e295a7342e0fc7332fee9a516cebdffaa21766e
+SHA1 (patch-ioemu-qemu-xen_hw_pass-through.h) = 98c26798d1ad99d3eee8b33deb08f747c958c886
+SHA1 (patch-ioemu-qemu-xen_hw_pt-graphics.c) = 3c03404f1d711c667559a1332e717a5f1b5ceda8
+SHA1 (patch-ioemu-qemu-xen_hw_pt-msi.c) = 2dcebc65f591988bb95dea74c3b21f7066154a9f
+SHA1 (patch-ioemu-qemu-xen_hw_pt-msi.h) = d1bb1a8ad90d6577056f11df96f5469ffe74a3b0
+SHA1 (patch-ioemu-qemu-xen_xen-hooks.mak) = a00d9a9fd0fbb9fd89788b9dfaf5b389a28d47e2
SHA1 (patch-libxl_libxl_create.c) = 02b661ca684609939c6ef762c0ddd1c5e62ad4d0
+SHA1 (patch-libxl_libxl_internal.h) = e126e5e998117903f0c66cc370d350c504ed33d9
SHA1 (patch-ocaml-include-path) = 959df25b0aae78d525b25f223190203d3c1185a6
SHA1 (patch-qemu-e1000-CVSE-2012-0029) = 064ba74795e7a1ceb863d1f7bc171f3841c81b8a
SHA1 (patch-qemu-phy-devices) = fef90e50ef0a58db2f2b49b6c23218f371791de5
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.c b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.c
new file mode 100644
index 00000000000..126b631a0d3
--- /dev/null
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-ioemu-qemu-xen_hw_pass-through.c,v 1.1 2012/05/29 15:01:34 bouyer Exp $
+
+--- /home/bouyer/pkgsrc/sysutils/xentools41/work/xen-4.1.2/tools/ioemu-qemu-xen/hw/pass-through.c.orig 2012-05-24 16:05:23.000000000 +0200
++++ /home/bouyer/pkgsrc/sysutils/xentools41/work/xen-4.1.2/tools/ioemu-qemu-xen/hw/pass-through.c 2012-05-24 16:06:19.000000000 +0200
+@@ -84,8 +84,6 @@
+ */
+
+ #include "pass-through.h"
+-#include "pci/header.h"
+-#include "pci/pci.h"
+ #include "pt-msi.h"
+ #include "qemu-xen.h"
+ #include "iomulti.h"
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.h b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.h
new file mode 100644
index 00000000000..265f4dc8a25
--- /dev/null
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.h
@@ -0,0 +1,18 @@
+$NetBSD: patch-ioemu-qemu-xen_hw_pass-through.h,v 1.1 2012/05/29 15:01:34 bouyer Exp $
+
+--- ioemu-qemu-xen/hw/pass-through.h.orig 2012-05-24 15:57:12.000000000 +0200
++++ ioemu-qemu-xen/hw/pass-through.h 2012-05-24 15:58:46.000000000 +0200
+@@ -20,8 +20,13 @@
+
+ #include "hw.h"
+ #include "pci.h"
++#ifdef __NetBSD__
++#include "pciutils/header.h"
++#include "pciutils/pci.h"
++#else
+ #include "pci/header.h"
+ #include "pci/pci.h"
++#endif
+ #include "exec-all.h"
+ #include "sys-queue.h"
+ #include "qemu-timer.h"
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-graphics.c b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-graphics.c
new file mode 100644
index 00000000000..9ef4c7fe9c0
--- /dev/null
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-graphics.c
@@ -0,0 +1,13 @@
+$NetBSD: patch-ioemu-qemu-xen_hw_pt-graphics.c,v 1.1 2012/05/29 15:01:34 bouyer Exp $
+
+--- ioemu-qemu-xen/hw/pt-graphics.c.orig 2012-05-24 16:16:49.000000000 +0200
++++ ioemu-qemu-xen/hw/pt-graphics.c 2012-05-24 16:16:55.000000000 +0200
+@@ -3,8 +3,6 @@
+ */
+
+ #include "pass-through.h"
+-#include "pci/header.h"
+-#include "pci/pci.h"
+
+ #include <unistd.h>
+ #include <sys/ioctl.h>
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.c b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.c
new file mode 100644
index 00000000000..16a062bf7c9
--- /dev/null
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-ioemu-qemu-xen_hw_pt-msi.c,v 1.1 2012/05/29 15:01:34 bouyer Exp $
+
+--- ioemu-qemu-xen/hw/pt-msi.c.orig 2012-05-24 13:27:50.000000000 +0200
++++ ioemu-qemu-xen/hw/pt-msi.c 2012-05-24 13:28:42.000000000 +0200
+@@ -22,6 +22,10 @@
+ #include "pt-msi.h"
+ #include <sys/mman.h>
+
++#ifdef __NetBSD__
++#define MAP_LOCKED MAP_WIRED
++#endif
++
+ void msi_set_enable(struct pt_dev *dev, int en)
+ {
+ uint16_t val = 0;
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.h b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.h
new file mode 100644
index 00000000000..bad2a3451c5
--- /dev/null
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.h
@@ -0,0 +1,12 @@
+$NetBSD: patch-ioemu-qemu-xen_hw_pt-msi.h,v 1.1 2012/05/29 15:01:34 bouyer Exp $
+
+--- ioemu-qemu-xen/hw/pt-msi.h.orig 2012-05-24 16:09:24.000000000 +0200
++++ ioemu-qemu-xen/hw/pt-msi.h 2012-05-24 16:15:19.000000000 +0200
+@@ -1,7 +1,6 @@
+ #ifndef _PT_MSI_H
+ #define _PT_MSI_H
+
+-#include "pci/pci.h"
+ #include "pass-through.h"
+
+ #define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_xen-hooks.mak b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_xen-hooks.mak
new file mode 100644
index 00000000000..81bfc32a0e1
--- /dev/null
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_xen-hooks.mak
@@ -0,0 +1,34 @@
+$NetBSD: patch-ioemu-qemu-xen_xen-hooks.mak,v 1.1 2012/05/29 15:01:34 bouyer Exp $
+
+enable PCI passthrough when pciutils is present
+
+--- ioemu-qemu-xen/xen-hooks.mak.orig 2012-05-24 15:41:11.000000000 +0200
++++ ioemu-qemu-xen/xen-hooks.mak 2012-05-24 15:46:21.000000000 +0200
+@@ -55,17 +55,25 @@
+ 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
diff --git a/sysutils/xentools41/patches/patch-libxl_libxl_internal.h b/sysutils/xentools41/patches/patch-libxl_libxl_internal.h
new file mode 100644
index 00000000000..6173ba379c8
--- /dev/null
+++ b/sysutils/xentools41/patches/patch-libxl_libxl_internal.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-libxl_libxl_internal.h,v 1.1 2012/05/29 15:01:34 bouyer Exp $
+
+--- libxl/libxl_internal.h.orig 2012-05-24 13:31:11.000000000 +0200
++++ libxl/libxl_internal.h 2012-05-24 13:31:14.000000000 +0200
+@@ -109,7 +109,11 @@
+ #define XC_PCI_BDF "0x%x, 0x%x, 0x%x, 0x%x"
+ #define AUTO_PHP_SLOT 0x100
+ #define SYSFS_PCI_DEV "/sys/bus/pci/devices"
++#ifdef __NetBSD__
++#define SYSFS_PCIBACK_DRIVER "/kern/xen/pci"
++#else
+ #define SYSFS_PCIBACK_DRIVER "/sys/bus/pci/drivers/pciback"
++#endif
+ #define XENSTORE_PID_FILE "/var/run/xenstored.pid"
+
+ #define PROC_PCI_NUM_RESOURCES 7