* [PATCH] libxl: NetBSD PCI passthrough support
@ 2012-10-25 14:12 Christoph Egger
2012-10-25 16:13 ` Ian Jackson
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Egger @ 2012-10-25 14:12 UTC (permalink / raw)
To: xen-devel@lists.xen.org
[-- Attachment #1: Type: text/plain, Size: 354 bytes --]
Add PCI passthrough support for HVM guests.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
[-- Attachment #2: libxl_pci_netbsd.diff --]
[-- Type: text/plain, Size: 1418 bytes --]
NetBSD PCI passthrough support
diff -r 0149ba2b0ce8 -r a4baabcd7d56 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -373,8 +373,6 @@ typedef struct {
#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f)
#define PCI_FUNC(devfn) ((devfn) & 0x07)
#define AUTO_PHP_SLOT 0x100
-#define SYSFS_PCI_DEV "/sys/bus/pci/devices"
-#define SYSFS_PCIBACK_DRIVER "/sys/bus/pci/drivers/pciback"
#define XENSTORE_PID_FILE "/var/run/xenstored.pid"
#define PROC_PCI_NUM_RESOURCES 7
diff -r 0149ba2b0ce8 -r a4baabcd7d56 tools/libxl/libxl_osdeps.h
--- a/tools/libxl/libxl_osdeps.h
+++ b/tools/libxl/libxl_osdeps.h
@@ -23,14 +23,27 @@
#define _GNU_SOURCE
-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__)
+#define SYSFS_PCI_DEV "/sys/bus/pci/devices"
+#define SYSFS_PCIBACK_DRIVER "/kern/xen/pci"
+#include <util.h>
+#elif defined(__OpenBSD__)
#include <util.h>
#elif defined(__linux__)
+#define SYSFS_PCI_DEV "/sys/bus/pci/devices"
+#define SYSFS_PCIBACK_DRIVER "/sys/bus/pci/drivers/pciback"
#include <pty.h>
#elif defined(__sun__)
#include <stropts.h>
#endif
+#ifndef SYSFS_PCIBACK_DRIVER
+#error define SYSFS_PCIBACK_DRIVER for your platform
+#endif
+#ifndef SYSFS_PCI_DEV
+#error define SYSFS_PCI_DEV for your platform
+#endif
+
#ifdef NEED_OWN_ASPRINTF
#include <stdarg.h>
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libxl: NetBSD PCI passthrough support
2012-10-25 14:12 [PATCH] libxl: NetBSD PCI passthrough support Christoph Egger
@ 2012-10-25 16:13 ` Ian Jackson
0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2012-10-25 16:13 UTC (permalink / raw)
To: Christoph Egger; +Cc: xen-devel@lists.xen.org
Christoph Egger writes ("[Xen-devel] [PATCH] libxl: NetBSD PCI passthrough support"):
>
> Add PCI passthrough support for HVM guests.
Thanks.
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-25 16:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-25 14:12 [PATCH] libxl: NetBSD PCI passthrough support Christoph Egger
2012-10-25 16:13 ` Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.