libxl: NetBSD PCI passthrough support
PATCH 1/1 libxl: NetBSD PCI passthrough support
Add PCI passthrough support for HVM guests.
Signed-off-by Christoph Egger <[email protected]>
Signature · 6 lines
---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
NetBSD PCI passthrough support
tools/libxl/libxl_internal.h +0 -2
@@ -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
tools/libxl/libxl_osdeps.h +14 -1
@@ -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-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Christoph Egger writes ("[Xen-devel] [PATCH] libxl: NetBSD PCI passthrough support"):
Quoted 2 lines
Add PCI passthrough support for HVM guests.
Thanks.
Committed-by Ian Jackson <[email protected]>