[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: NetBSD PCI passthrough support
# HG changeset patch # User Christoph Egger <Christoph.Egger@xxxxxxx> # Date 1351181575 -3600 # Node ID c26e1a79fe77735410d5712348a612fa4b1e377f # Parent e9b8bf4656b99de0b0650a6ed7736a9eb80a5ae3 libxl: NetBSD PCI passthrough support Add PCI passthrough support for HVM guests. Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx> Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- diff -r e9b8bf4656b9 -r c26e1a79fe77 tools/libxl/libxl_internal.h --- a/tools/libxl/libxl_internal.h Thu Oct 25 17:05:29 2012 +0100 +++ b/tools/libxl/libxl_internal.h Thu Oct 25 17:12:55 2012 +0100 @@ -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 e9b8bf4656b9 -r c26e1a79fe77 tools/libxl/libxl_osdeps.h --- a/tools/libxl/libxl_osdeps.h Thu Oct 25 17:05:29 2012 +0100 +++ b/tools/libxl/libxl_osdeps.h Thu Oct 25 17:12:55 2012 +0100 @@ -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> _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |