render / rpms / libvirt

Forked from rpms/libvirt 11 months ago
Clone
127bba
From ea75f6f6363136f9a0ffe4cc03f09f7f984f9546 Mon Sep 17 00:00:00 2001
127bba
Message-Id: <ea75f6f6363136f9a0ffe4cc03f09f7f984f9546@dist-git>
127bba
From: Laine Stump <laine@laine.org>
127bba
Date: Thu, 27 Oct 2016 12:31:33 -0400
127bba
Subject: [PATCH] qemu: allow 32 slots on pcie-expander-bus, not just 1
127bba
127bba
When I added support for the pcie-expander-bus controller in commit
127bba
bc07251f, I incorrectly thought that it only had a single slot
127bba
available. Actually it has 32 slots, just like the root complex aka
127bba
pcie-root (the part that I *did* get correct is that unlike pcie-root
127bba
a pcie-expander-bus doesn't allow any integrated endpoint devices -
127bba
only pcie-root-ports and dmi-to-pci-controllers are allowed).
127bba
127bba
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1389369
127bba
127bba
(cherry picked from commit 22afd44171a2df74fecb7058d146e83adddaae45)
127bba
---
127bba
 src/conf/domain_addr.c | 4 ++--
127bba
 1 file changed, 2 insertions(+), 2 deletions(-)
127bba
127bba
diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
127bba
index cad1c27..e87fb4b 100644
127bba
--- a/src/conf/domain_addr.c
127bba
+++ b/src/conf/domain_addr.c
127bba
@@ -304,13 +304,13 @@ virDomainPCIAddressBusSetModel(virDomainPCIAddressBusPtr bus,
127bba
         bus->maxSlot = VIR_PCI_ADDRESS_SLOT_LAST;
127bba
         break;
127bba
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS:
127bba
-        /* single slot, no hotplug, only accepts pcie-root-port or
127bba
+        /* 32 slots, no hotplug, only accepts pcie-root-port or
127bba
          * dmi-to-pci-bridge
127bba
          */
127bba
         bus->flags = (VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT |
127bba
                       VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE);
127bba
         bus->minSlot = 0;
127bba
-        bus->maxSlot = 0;
127bba
+        bus->maxSlot = VIR_PCI_ADDRESS_SLOT_LAST;
127bba
         break;
127bba
 
127bba
     default:
127bba
-- 
127bba
2.10.2
127bba