]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: new pci controller model pci-expander-bus
authorLaine Stump <laine@laine.org>
Fri, 4 Mar 2016 15:26:23 +0000 (10:26 -0500)
committerLaine Stump <laine@laine.org>
Thu, 14 Apr 2016 18:00:34 +0000 (14:00 -0400)
This is a standard PCI root bus (not a bridge) that can be added to a
440fx-based domain. Although it uses a PCI slot, this is *not* how it
is connected into the PCI bus hierarchy, but is only used for
control. Each pci-expander-bus provides 32 slots (0-31) that can
accept hotplug of standard PCI devices.

The usefulness of pci-expander-bus relative to a pci-bridge is that
the NUMA node of the bus can be specified with the <node> subelement
of <target>. This gives guest-side visibility to the NUMA node of
attached devices (presuming that management apps only assign a device
to a bus that has a NUMA node number matching the node number of the
device on the host).

Each pci-expander-bus also has a "busNr" attribute. The expander-bus
itself will take the busNr specified, and all buses that are connected
to this bus (including the pci-bridge that is automatically added to
any expander bus of model "pxb" (see the next commit)) will use
busNr+1, busNr+2, etc, and the pci-root (or the expander-bus with next
lower busNr) will use bus numbers lower than busNr.

docs/formatdomain.html.in
docs/schemas/domaincommon.rng
src/conf/domain_addr.c
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_domain_address.c
tests/qemuxml2argvdata/qemuxml2argv-pci-expander-bus.xml [new file with mode: 0644]
tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-expander-bus.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c

index e3307eb0496bb2b0cc8806eb403a508b6e5fff4c..43102c8d111a02f71a48651d997c0985bc107892 100644 (file)
       PCI controllers have an optional <code>model</code> attribute with
       possible values <code>pci-root</code>, <code>pcie-root</code>,
       <code>pcie-root-port</code>, <code>pci-bridge</code>,
-      <code>dmi-to-pci-bridge</code>, <code>pcie-switch-upstream-port</code>, or
-      <code>pcie-switch-downstream-port</code>.
+      <code>dmi-to-pci-bridge</code>, <code>pcie-switch-upstream-port</code>,
+      <code>pcie-switch-downstream-port</code>, or <code>pci-expander-bus</code>.
       (pci-root and pci-bridge <span class="since">since 1.0.5</span>,
       pcie-root and dmi-to-pci-bridge <span class="since">since
-      1.1.2</span>, pcie-root-port, pcie-switch-upstream-port, and
-      pcie-switch-downstream-port <span class="since">since 1.2.19</span>)
+      1.1.2</span>, pcie-root-port, pcie-switch-upstream-port,
+      pcie-switch-downstream-port <span class="since">since 1.2.19</span>,
+      and pci-expander-bus <span class="since">since 1.3.4</span>)
       The root controllers (<code>pci-root</code> and <code>pcie-root</code>)
       have an optional <code>pcihole64</code> element specifying how big
       (in kilobytes, or in the unit specified by <code>pcihole64</code>'s
     </p>
     <p>
       PCI controllers also have an optional
-      subelement <code>&lt;target&gt;</code> with the attributes
-      listed below. These are configurable items that 1) are visible
-      to the guest OS so must be preserved for guest ABI
+      subelement <code>&lt;target&gt;</code> with the attributes and
+      subelements listed below. These are configurable items that 1)
+      are visible to the guest OS so must be preserved for guest ABI
       compatibility, and 2) are usually left to default values or
       derived automatically by libvirt. In almost all cases, you
       should not manually add a <code>&lt;target&gt;</code> subelement
         which is visible to the virtual machine. If set, port must be
         between 0 and 255.
       </dd>
+      <dt><code>busNr</code></dt>
+      <dd>
+        pci-expander-bus controllers can have an
+        optional <code>busNr</code> attribute (1-254). This will be
+        the bus number of the new bus; All bus numbers between that
+        specified and 255 will be available only for assignment to
+        PCI/PCIe controllers plugged into the hierarchy starting with
+        this expander bus, and bus numbers less than the specified
+        value will be available to the next lower expander-bus (or the
+        root-bus if there are no lower expander buses). If you do not
+        specify a busNumber, libvirt will find the lowest existing
+        busNumber in all other expander buses (or use 256 if there are
+        no others) and auto-assign the busNr of that found bus - 2,
+        which provides one bus number for the pci-expander-bus and one
+        for the pci-bridge that is automatically attached to it (if
+        you plan on adding more pci-bridges to the hierarchy of the
+        bus, you should manually set busNr to a lower value).
+      </dd>
+      <dt><code>&lt;node&gt;</code></dt>
+      <dd>
+        pci-expander-bus controllers can have an
+        optional <code>&lt;node&gt;</code> subelement within
+        the <code>&lt;target&gt;</code> subelement, which is used to
+        set the NUMA node reported to the guest OS for that bus - the
+        guest OS will then know that all devices on that bus are a
+        part of the specified NUMA node (it is up to the user of the
+        libvirt API to attach host devices to the correct
+        pci-expander-bus when assigning them to the domain).
+      </dd>
     </dl>
     <p>
       For machine types which provide an implicit PCI bus, the pci-root
index c6cdc81556129d377eade45ccd38f7c8a31e21fb..c181713355394bc380a3e8c4cdeb5acdd9e9fee9 100644 (file)
                     <value>x3130-upstream</value>
                     <!-- implementations of 'pcie-switch-downstream-port' -->
                     <value>xio3130-downstream</value>
+                    <!-- implementations of 'pci-expander-bus' -->
+                    <value>pxb</value>
                   </choice>
                 </attribute>
                 <empty/>
                     <ref name='uint8'/>
                   </attribute>
                 </optional>
-                <empty/>
+                <optional>
+                  <attribute name='busNr'>
+                    <ref name='uint8'/>
+                  </attribute>
+                </optional>
+                <optional>
+                  <element name='node'>
+                    <ref name='unsignedInt'/>
+                  </element>
+                </optional>
               </element>
             </optional>
             <!-- *-root controllers have an optional element "pcihole64"-->
                     <value>pcie-root-port</value>
                     <value>pcie-switch-upstream-port</value>
                     <value>pcie-switch-downstream-port</value>
+                    <value>pci-expander-bus</value>
                   </choice>
                 </attribute>
               </group>
index 7ee893f675f08cbf112d29a988f2f99bf300f363..b8f897f1737ef5d2e7024cf09216fe7e035bcb80 100644 (file)
@@ -51,7 +51,11 @@ virDomainPCIControllerModelToConnectType(virDomainControllerModelPCI model)
         return 0;
 
     case VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE:
-        /* pci-bridge is treated like a standard PCI endpoint device, */
+    case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS:
+        /* pci-bridge and pci-expander-bus are treated like a standard
+         * PCI endpoint device, because they can plug into any
+         * standard PCI slot.
+         */
         return VIR_PCI_CONNECT_TYPE_PCI_DEVICE;
 
     case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE:
@@ -231,6 +235,13 @@ virDomainPCIAddressBusSetModel(virDomainPCIAddressBusPtr bus,
         bus->minSlot = 1;
         bus->maxSlot = VIR_PCI_ADDRESS_SLOT_LAST;
         break;
+    case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS:
+        bus->flags = (VIR_PCI_CONNECT_HOTPLUGGABLE |
+                      VIR_PCI_CONNECT_TYPE_PCI_DEVICE);
+        bus->minSlot = 0;
+        bus->maxSlot = VIR_PCI_ADDRESS_SLOT_LAST;
+        break;
+
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT:
         /* slots 1 - 31, no hotplug, PCIe endpoint device or
          * pcie-root-port only, unless the address was specified in
index 12a3a509ee6b71a07c71b84a1b1087cb80822fb8..b541b270fe3b061ca1a8995f8f8b2841dd4c3635 100644 (file)
@@ -320,7 +320,8 @@ VIR_ENUM_IMPL(virDomainControllerModelPCI, VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST,
               "dmi-to-pci-bridge",
               "pcie-root-port",
               "pcie-switch-upstream-port",
-              "pcie-switch-downstream-port")
+              "pcie-switch-downstream-port",
+              "pci-expander-bus")
 
 VIR_ENUM_IMPL(virDomainControllerPCIModelName,
               VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST,
@@ -329,7 +330,8 @@ VIR_ENUM_IMPL(virDomainControllerPCIModelName,
               "i82801b11-bridge",
               "ioh3420",
               "x3130-upstream",
-              "xio3130-downstream")
+              "xio3130-downstream",
+              "pxb")
 
 VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST,
               "auto",
@@ -1654,6 +1656,8 @@ virDomainControllerDefNew(virDomainControllerType type)
         def->opts.pciopts.chassisNr = -1;
         def->opts.pciopts.chassis = -1;
         def->opts.pciopts.port = -1;
+        def->opts.pciopts.busNr = -1;
+        def->opts.pciopts.numaNode = -1;
         break;
     case VIR_DOMAIN_CONTROLLER_TYPE_IDE:
     case VIR_DOMAIN_CONTROLLER_TYPE_FDC:
@@ -7830,6 +7834,8 @@ virDomainControllerDefParseXML(xmlNodePtr node,
     char *chassisNr = NULL;
     char *chassis = NULL;
     char *port = NULL;
+    char *busNr = NULL;
+    int numaNode = -1;
     char *ioeventfd = NULL;
     xmlNodePtr saved = ctxt->node;
     int rc;
@@ -7894,12 +7900,23 @@ virDomainControllerDefParseXML(xmlNodePtr node,
                 chassisNr = virXMLPropString(cur, "chassisNr");
                 chassis = virXMLPropString(cur, "chassis");
                 port = virXMLPropString(cur, "port");
+                busNr = virXMLPropString(cur, "busNr");
                 processedTarget = true;
             }
         }
         cur = cur->next;
     }
 
+    /* node is parsed differently from target attributes because
+     * someone thought it should be a subelement instead...
+     */
+    rc = virXPathInt("string(./target/node)", ctxt, &numaNode);
+    if (rc == -2 || (rc == 0 && numaNode < 0)) {
+        virReportError(VIR_ERR_XML_ERROR, "%s",
+                       _("invalid NUMA node in target"));
+        goto error;
+    }
+
     if (queues && virStrToLong_ui(queues, NULL, 10, &def->queues) < 0) {
         virReportError(VIR_ERR_XML_ERROR,
                        _("Malformed 'queues' value '%s'"), queues);
@@ -8069,6 +8086,25 @@ virDomainControllerDefParseXML(xmlNodePtr node,
                 goto error;
             }
         }
+        if (busNr) {
+            if (virStrToLong_i(busNr, NULL, 0,
+                               &def->opts.pciopts.busNr) < 0) {
+                virReportError(VIR_ERR_XML_ERROR,
+                               _("Invalid busNr '%s' in PCI controller"),
+                               busNr);
+                goto error;
+            }
+            if (def->opts.pciopts.busNr < 0 ||
+                def->opts.pciopts.busNr > 254) {
+                virReportError(VIR_ERR_XML_ERROR,
+                               _("PCI controller busNr '%s' out of range "
+                                 "- must be 0-254"),
+                               busNr);
+                goto error;
+            }
+        }
+        if (numaNode >= 0)
+            def->opts.pciopts.numaNode = numaNode;
         break;
 
     default:
@@ -8087,6 +8123,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
     VIR_FREE(chassisNr);
     VIR_FREE(chassis);
     VIR_FREE(port);
+    VIR_FREE(busNr);
     VIR_FREE(ioeventfd);
 
     return def;
@@ -19420,7 +19457,9 @@ virDomainControllerDefFormat(virBufferPtr buf,
             pciModel = true;
         if (def->opts.pciopts.chassisNr != -1 ||
             def->opts.pciopts.chassis != -1 ||
-            def->opts.pciopts.port != -1)
+            def->opts.pciopts.port != -1 ||
+            def->opts.pciopts.busNr != -1 ||
+            def->opts.pciopts.numaNode != -1)
             pciTarget = true;
         break;
 
@@ -19456,7 +19495,19 @@ virDomainControllerDefFormat(virBufferPtr buf,
             if (def->opts.pciopts.port != -1)
                 virBufferAsprintf(buf, " port='0x%x'",
                                   def->opts.pciopts.port);
-            virBufferAddLit(buf, "/>\n");
+            if (def->opts.pciopts.busNr != -1)
+                virBufferAsprintf(buf, " busNr='%d'",
+                                  def->opts.pciopts.busNr);
+            if (def->opts.pciopts.numaNode == -1) {
+                virBufferAddLit(buf, "/>\n");
+            } else {
+                virBufferAddLit(buf, ">\n");
+                virBufferAdjustIndent(buf, 2);
+                virBufferAsprintf(buf, "<node>%d</node>\n",
+                                  def->opts.pciopts.numaNode);
+                virBufferAdjustIndent(buf, -2);
+                virBufferAddLit(buf, "</target>\n");
+            }
         }
 
         if (def->queues || def->cmd_per_lun ||
index 443a1d79545b3f44ca3bba5bb7f4cf2402e337b7..76093e4b670c5a8851027e54fb0e3b69b591b207 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * domain_conf.h: domain XML processing
  *
- * Copyright (C) 2006-2015 Red Hat, Inc.
+ * Copyright (C) 2006-2016 Red Hat, Inc.
  * Copyright (C) 2006-2008 Daniel P. Berrange
  * Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
  *
@@ -759,6 +759,7 @@ typedef enum {
     VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT,
     VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT,
     VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT,
+    VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS,
 
     VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST
 } virDomainControllerModelPCI;
@@ -770,6 +771,7 @@ typedef enum {
     VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420,
     VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_X3130_UPSTREAM,
     VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_XIO3130_DOWNSTREAM,
+    VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PXB,
 
     VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST
 } virDomainControllerPCIModelName;
@@ -834,6 +836,11 @@ struct _virDomainPCIControllerOpts {
      * pcie-root-port/pcie-switch-downstream-port, -1 = unspecified */
     int chassis;
     int port;
+    int busNr; /* used by pci-expander-bus, -1 == unspecified */
+    /* numaNode is a *subelement* of target (to match existing
+     * item in memory target config) -1 == unspecified
+     */
+    int numaNode;
 };
 
 /* Stores the virtual disk controller configuration */
index 73a699ccee5307ada06b952dee6f343d2ff40aa4..d336b4b90f45efa217b8bb0a6cb80c47cd1e6060 100644 (file)
@@ -1372,6 +1372,7 @@ qemuDomainPCIControllerSetDefaultModelName(virDomainControllerDefPtr cont)
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT:
         *modelName = VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_XIO3130_DOWNSTREAM;
         break;
+    case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS:
     case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT:
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT:
     case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST:
@@ -1507,6 +1508,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
                     if (options->port == -1)
                        options->port = addr->slot;
                     break;
+                case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS:
                 case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE:
                 case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT:
                 case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT:
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-expander-bus.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-expander-bus.xml
new file mode 100644 (file)
index 0000000..79c9593
--- /dev/null
@@ -0,0 +1,167 @@
+<domain type='qemu'>
+  <name>expander-test</name>
+  <uuid>3ec6cbe1-b5a2-4515-b800-31a61855df41</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>16</vcpu>
+  <os>
+    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
+  </os>
+  <cpu>
+    <topology sockets='2' cores='4' threads='2'/>
+    <numa>
+      <cell cpus='0-7' memory='109550' unit='KiB'/>
+      <cell cpus='8-15' memory='109550' unit='KiB'/>
+    </numa>
+  </cpu>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' index='0' model='none'/>
+    <controller type='ide' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'/>
+    <controller type='pci' index='1' model='pci-expander-bus'>
+      <model name='pxb'/>
+      <target busNr='254'>
+        <node>1</node>
+      </target>
+    </controller>
+    <controller type='pci' index='2' model='pci-expander-bus'>
+      <model name='pxb'/>
+    </controller>
+    <interface type='user'>
+      <mac address='52:54:00:f1:95:51'/>
+      <model type='rtl8139'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:5c:c6:1a'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:39:97:ac'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:45:28:cb'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:ee:b9:a8'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:a9:f7:17'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:df:2b:f3'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:78:94:b4'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:6b:9b:06'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:17:df:bc'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:3b:d0:51'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:8d:2d:17'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:a7:66:af'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:54:ab:d7'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:1f:99:90'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:c8:43:87'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:df:22:b2'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:d2:9a:47'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:86:05:e2'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:8c:1c:c2'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:48:58:92'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:99:e5:bf'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:b1:8c:25'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:60:e0:d0'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:37:00:6a'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:c7:c8:ad'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:4e:a7:cf'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:00:79:69'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:47:00:6f'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:2a:8c:8b'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:ec:d5:e3'/>
+      <model type='e1000'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:7e:6e:c8'/>
+      <model type='e1000'/>
+    </interface>
+    <input type='mouse' bus='ps2'/>
+    <input type='keyboard' bus='ps2'/>
+    <memballoon model='virtio'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+    </memballoon>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-expander-bus.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-expander-bus.xml
new file mode 100644 (file)
index 0000000..946e94f
--- /dev/null
@@ -0,0 +1,206 @@
+<domain type='qemu'>
+  <name>expander-test</name>
+  <uuid>3ec6cbe1-b5a2-4515-b800-31a61855df41</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>16</vcpu>
+  <os>
+    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu>
+    <topology sockets='2' cores='4' threads='2'/>
+    <numa>
+      <cell id='0' cpus='0-7' memory='109550' unit='KiB'/>
+      <cell id='1' cpus='8-15' memory='109550' unit='KiB'/>
+    </numa>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-x86_64</emulator>
+    <controller type='usb' index='0' model='none'/>
+    <controller type='ide' index='0'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <controller type='pci' index='0' model='pci-root'/>
+    <controller type='pci' index='1' model='pci-expander-bus'>
+      <model name='pxb'/>
+      <target busNr='254'>
+        <node>1</node>
+      </target>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+    </controller>
+    <controller type='pci' index='2' model='pci-expander-bus'>
+      <model name='pxb'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+    </controller>
+    <interface type='user'>
+      <mac address='52:54:00:f1:95:51'/>
+      <model type='rtl8139'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:5c:c6:1a'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:39:97:ac'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:45:28:cb'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:ee:b9:a8'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:a9:f7:17'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:df:2b:f3'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:78:94:b4'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:6b:9b:06'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:17:df:bc'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x0f' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:3b:d0:51'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:8d:2d:17'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x11' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:a7:66:af'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x12' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:54:ab:d7'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x13' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:1f:99:90'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x14' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:c8:43:87'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x15' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:df:22:b2'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x16' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:d2:9a:47'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x17' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:86:05:e2'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x18' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:8c:1c:c2'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x19' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:48:58:92'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1a' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:99:e5:bf'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:b1:8c:25'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1c' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:60:e0:d0'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:37:00:6a'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:c7:c8:ad'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:4e:a7:cf'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:00:79:69'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:47:00:6f'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x02' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:2a:8c:8b'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x03' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:ec:d5:e3'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x04' function='0x0'/>
+    </interface>
+    <interface type='user'>
+      <mac address='52:54:00:7e:6e:c8'/>
+      <model type='e1000'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x05' function='0x0'/>
+    </interface>
+    <input type='mouse' bus='ps2'/>
+    <input type='keyboard' bus='ps2'/>
+    <memballoon model='virtio'>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+    </memballoon>
+  </devices>
+</domain>
index cbe6b7821c3391cf7314138b228be621321fee46..78b6dbe15bb38cd0ecba234d9f1f37bae1e8e311 100644 (file)
@@ -644,6 +644,9 @@ mymain(void)
                  QEMU_CAPS_ICH9_AHCI,
                  QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
                  QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL);
+    DO_TEST_FULL("pci-expander-bus", WHEN_ACTIVE,
+                 QEMU_CAPS_DEVICE_PCI_BRIDGE,
+                 QEMU_CAPS_DEVICE_PXB);
 
 
     DO_TEST_FULL("hostdev-scsi-lsi", WHEN_ACTIVE,