pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/xentools41 Add support for PCI pass-through f...
details: https://anonhg.NetBSD.org/pkgsrc/rev/93829b88d521
branches: trunk
changeset: 604343:93829b88d521
user: bouyer <bouyer%pkgsrc.org@localhost>
date: Tue May 29 15:01:34 2012 +0000
description:
Add support for PCI pass-through for HVM guests, based on patch sent by
dukzcry <lomka%gero.in@localhost> on netbsd-users@ on may 14. This supports
only HVM guests, and only with the xl tool.
bump pkgrevision.
diffstat:
sysutils/xentools41/Makefile | 5 +-
sysutils/xentools41/distinfo | 9 ++-
sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.c | 13 +++
sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.h | 18 +++++
sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-graphics.c | 13 +++
sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.c | 15 ++++
sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.h | 12 +++
sysutils/xentools41/patches/patch-ioemu-qemu-xen_xen-hooks.mak | 34 ++++++++++
sysutils/xentools41/patches/patch-libxl_libxl_internal.h | 16 ++++
9 files changed, 132 insertions(+), 3 deletions(-)
diffs (197 lines):
diff -r b1d7ebc06e82 -r 93829b88d521 sysutils/xentools41/Makefile
--- a/sysutils/xentools41/Makefile Tue May 29 14:58:14 2012 +0000
+++ b/sysutils/xentools41/Makefile Tue May 29 15:01:34 2012 +0000
@@ -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 @@
.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 -r b1d7ebc06e82 -r 93829b88d521 sysutils/xentools41/distinfo
--- a/sysutils/xentools41/distinfo Tue May 29 14:58:14 2012 +0000
+++ b/sysutils/xentools41/distinfo Tue May 29 15:01:34 2012 +0000
@@ -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-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 -r b1d7ebc06e82 -r 93829b88d521 sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.c Tue May 29 15:01:34 2012 +0000
@@ -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 -r b1d7ebc06e82 -r 93829b88d521 sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.h Tue May 29 15:01:34 2012 +0000
@@ -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 -r b1d7ebc06e82 -r 93829b88d521 sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-graphics.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-graphics.c Tue May 29 15:01:34 2012 +0000
@@ -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 -r b1d7ebc06e82 -r 93829b88d521 sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.c Tue May 29 15:01:34 2012 +0000
@@ -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 -r b1d7ebc06e82 -r 93829b88d521 sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.h Tue May 29 15:01:34 2012 +0000
@@ -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 -r b1d7ebc06e82 -r 93829b88d521 sysutils/xentools41/patches/patch-ioemu-qemu-xen_xen-hooks.mak
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_xen-hooks.mak Tue May 29 15:01:34 2012 +0000
@@ -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 -r b1d7ebc06e82 -r 93829b88d521 sysutils/xentools41/patches/patch-libxl_libxl_internal.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xentools41/patches/patch-libxl_libxl_internal.h Tue May 29 15:01:34 2012 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index