|
|
a41c76 |
From 2780cb41f7682741be2bbe662d629dd1bd3b4f6e Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <2780cb41f7682741be2bbe662d629dd1bd3b4f6e@dist-git>
|
|
|
a41c76 |
From: Laine Stump <laine@redhat.com>
|
|
|
a41c76 |
Date: Sun, 26 Apr 2020 13:04:10 -0400
|
|
|
a41c76 |
Subject: [PATCH] conf: add new PCI_CONNECT flag AUTOASSIGN
|
|
|
a41c76 |
|
|
|
a41c76 |
This new flag will be set for any controller that we decide can have
|
|
|
a41c76 |
devices assigned to it automatically during PCI device assignment. In
|
|
|
a41c76 |
the past PCI_CONNECT_TYPE_HOTPLUGGABLE was used for this purpose, but
|
|
|
a41c76 |
that is overloading that flag, and no longer technically correct; what
|
|
|
a41c76 |
we *really* want is to auto-assign devices to any pcie-root-port or
|
|
|
a41c76 |
pcie-switch-downstream-port regardless of whether or not that
|
|
|
a41c76 |
controller happens to have hotplug enabled.
|
|
|
a41c76 |
|
|
|
a41c76 |
This patch just adds the flag, but doesn't use it at all. Note that
|
|
|
a41c76 |
the numbering of all the other flags was changed in order to insert
|
|
|
a41c76 |
the new flag near the beginning of the list; that doesn't cause any
|
|
|
a41c76 |
problem because the connect flags aren't stored anywhere between runs
|
|
|
a41c76 |
of libvirtd.
|
|
|
a41c76 |
|
|
|
a41c76 |
Signed-off-by: Laine Stump <laine@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
a41c76 |
(cherry picked from commit c296a846ad7de3066a17404f4f407d3e1b6d7935)
|
|
|
a41c76 |
|
|
|
a41c76 |
https://bugzilla.redhat.com/1802592
|
|
|
a41c76 |
Signed-off-by: Laine Stump <laine@redhat.com>
|
|
|
a41c76 |
Message-Id: <20200426170415.18328-8-laine@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
a41c76 |
---
|
|
|
a41c76 |
src/conf/domain_addr.h | 41 +++++++++++++++++++++--------------------
|
|
|
a41c76 |
1 file changed, 21 insertions(+), 20 deletions(-)
|
|
|
a41c76 |
|
|
|
a41c76 |
diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h
|
|
|
a41c76 |
index dcb90618f8..40738ddb72 100644
|
|
|
a41c76 |
--- a/src/conf/domain_addr.h
|
|
|
a41c76 |
+++ b/src/conf/domain_addr.h
|
|
|
a41c76 |
@@ -32,26 +32,27 @@ typedef enum {
|
|
|
a41c76 |
} virPCIDeviceAddressExtensionFlags;
|
|
|
a41c76 |
|
|
|
a41c76 |
typedef enum {
|
|
|
a41c76 |
- VIR_PCI_CONNECT_HOTPLUGGABLE = 1 << 0, /* is hotplug needed/supported */
|
|
|
a41c76 |
-
|
|
|
a41c76 |
- /* set for devices that can share a single slot in auto-assignment
|
|
|
a41c76 |
- * (by assigning one device to each of the 8 functions on the slot)
|
|
|
a41c76 |
- */
|
|
|
a41c76 |
- VIR_PCI_CONNECT_AGGREGATE_SLOT = 1 << 1,
|
|
|
a41c76 |
-
|
|
|
a41c76 |
- /* kinds of devices as a bitmap so they can be combined (some PCI
|
|
|
a41c76 |
- * controllers permit connecting multiple types of devices)
|
|
|
a41c76 |
- */
|
|
|
a41c76 |
- VIR_PCI_CONNECT_TYPE_PCI_DEVICE = 1 << 2,
|
|
|
a41c76 |
- VIR_PCI_CONNECT_TYPE_PCIE_DEVICE = 1 << 3,
|
|
|
a41c76 |
- VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT = 1 << 4,
|
|
|
a41c76 |
- VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT = 1 << 5,
|
|
|
a41c76 |
- VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT = 1 << 6,
|
|
|
a41c76 |
- VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE = 1 << 7,
|
|
|
a41c76 |
- VIR_PCI_CONNECT_TYPE_PCI_EXPANDER_BUS = 1 << 8,
|
|
|
a41c76 |
- VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS = 1 << 9,
|
|
|
a41c76 |
- VIR_PCI_CONNECT_TYPE_PCI_BRIDGE = 1 << 10,
|
|
|
a41c76 |
- VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE = 1 << 11,
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_AUTOASSIGN = 1 << 0, /* okay to autoassign a device to this controller */
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_HOTPLUGGABLE = 1 << 1, /* is hotplug needed/supported */
|
|
|
a41c76 |
+
|
|
|
a41c76 |
+ /* set for devices that can share a single slot in auto-assignment
|
|
|
a41c76 |
+ * (by assigning one device to each of the 8 functions on the slot)
|
|
|
a41c76 |
+ */
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_AGGREGATE_SLOT = 1 << 2,
|
|
|
a41c76 |
+
|
|
|
a41c76 |
+ /* kinds of devices as a bitmap so they can be combined (some PCI
|
|
|
a41c76 |
+ * controllers permit connecting multiple types of devices)
|
|
|
a41c76 |
+ */
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_TYPE_PCI_DEVICE = 1 << 3,
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_TYPE_PCIE_DEVICE = 1 << 4,
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT = 1 << 5,
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT = 1 << 6,
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT = 1 << 7,
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE = 1 << 8,
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_TYPE_PCI_EXPANDER_BUS = 1 << 9,
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS = 1 << 10,
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_TYPE_PCI_BRIDGE = 1 << 11,
|
|
|
a41c76 |
+ VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE = 1 << 12,
|
|
|
a41c76 |
} virDomainPCIConnectFlags;
|
|
|
a41c76 |
|
|
|
a41c76 |
/* a combination of all bits that describe the type of connections
|
|
|
a41c76 |
--
|
|
|
a41c76 |
2.26.2
|
|
|
a41c76 |
|