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