"80203",
"80211")
-VIR_ENUM_IMPL(virPCIELinkSpeed, VIR_PCIE_LINK_SPEED_LAST,
- "", "2.5", "5", "8")
-
static int
virNodeDevCapsDefParseString(const char *xpath,
xmlXPathContextPtr ctxt,
/*
* node_device_conf.h: config handling for node devices
*
- * Copyright (C) 2009-2013 Red Hat, Inc.
+ * Copyright (C) 2009-2014 Red Hat, Inc.
* Copyright (C) 2008 Virtual Iron Software, Inc.
* Copyright (C) 2008 David F. Lively
*
VIR_NODE_DEV_CAP_FLAG_PCIE = (1 << 2),
} virNodeDevPCICapFlags;
-typedef enum {
- VIR_PCIE_LINK_SPEED_NA = 0,
- VIR_PCIE_LINK_SPEED_25,
- VIR_PCIE_LINK_SPEED_5,
- VIR_PCIE_LINK_SPEED_8,
- VIR_PCIE_LINK_SPEED_LAST
-} virPCIELinkSpeed;
-
-VIR_ENUM_DECL(virPCIELinkSpeed)
-
-typedef struct _virPCIELink virPCIELink;
-typedef virPCIELink *virPCIELinkPtr;
-struct _virPCIELink {
- int port;
- virPCIELinkSpeed speed;
- unsigned int width;
-};
-
-typedef struct _virPCIEDeviceInfo virPCIEDeviceInfo;
-typedef virPCIEDeviceInfo *virPCIEDeviceInfoPtr;
-struct _virPCIEDeviceInfo {
- /* Not all PCI Express devices has link. For example this 'Root Complex
- * Integrated Endpoint' and 'Root Complex Event Collector' don't have it. */
- virPCIELink *link_cap; /* PCIe device link capabilities */
- virPCIELink *link_sta; /* Actually negotiated capabilities */
-};
-
typedef struct _virNodeDevCapsDef virNodeDevCapsDef;
typedef virNodeDevCapsDef *virNodeDevCapsDefPtr;
struct _virNodeDevCapsDef {
#define PCI_ID_LEN 10 /* "XXXX XXXX" */
#define PCI_ADDR_LEN 13 /* "XXXX:XX:XX.X" */
+VIR_ENUM_IMPL(virPCIELinkSpeed, VIR_PCIE_LINK_SPEED_LAST,
+ "", "2.5", "5", "8")
+
struct _virPCIDevice {
unsigned int domain;
unsigned int bus;
/*
* virpci.h: helper APIs for managing host PCI devices
*
- * Copyright (C) 2009, 2011-2013 Red Hat, Inc.
+ * Copyright (C) 2009, 2011-2014 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
# include "internal.h"
# include "virobject.h"
+# include "virutil.h"
typedef struct _virPCIDevice virPCIDevice;
typedef virPCIDevice *virPCIDevicePtr;
unsigned int function;
};
+typedef enum {
+ VIR_PCIE_LINK_SPEED_NA = 0,
+ VIR_PCIE_LINK_SPEED_25,
+ VIR_PCIE_LINK_SPEED_5,
+ VIR_PCIE_LINK_SPEED_8,
+ VIR_PCIE_LINK_SPEED_LAST
+} virPCIELinkSpeed;
+
+VIR_ENUM_DECL(virPCIELinkSpeed)
+
+typedef struct _virPCIELink virPCIELink;
+typedef virPCIELink *virPCIELinkPtr;
+struct _virPCIELink {
+ int port;
+ virPCIELinkSpeed speed;
+ unsigned int width;
+};
+
+typedef struct _virPCIEDeviceInfo virPCIEDeviceInfo;
+typedef virPCIEDeviceInfo *virPCIEDeviceInfoPtr;
+struct _virPCIEDeviceInfo {
+ /* Not all PCI Express devices have link. For example this 'Root Complex
+ * Integrated Endpoint' and 'Root Complex Event Collector' don't have it. */
+ virPCIELink *link_cap; /* PCIe device link capabilities */
+ virPCIELink *link_sta; /* Actually negotiated capabilities */
+};
+
virPCIDevicePtr virPCIDeviceNew(unsigned int domain,
unsigned int bus,
unsigned int slot,