This controller provides a single PCIe port on a new root. It is
similar to pci-expander-bus, intended to provide a bus that can be
associated with a guest-identifiable NUMA node, but is for
machinetypes with PCIe rather than PCI (e.g. q35-based machinetypes).
Aside from PCIe vs. PCI, the other main difference is that a
pci-expander-bus has a companion pci-bridge that is automatically
attached along with it, but pcie-expander-bus has only a single port,
and that port will only connect to a pcie-root-port, or to a
pcie-switch-upstream-port. In order for the bus to be of any use in
the guest, it must have either a pcie-root-port or a
pcie-switch-upstream-port attached (and one or more
pcie-switch-downstream-ports attached to the
pcie-switch-upstream-port).
---
docs/formatdomain.html.in | 40 ++-
docs/schemas/domaincommon.rng | 3 +
src/conf/domain_addr.c | 17 +-
src/conf/domain_conf.c | 6 +-
src/conf/domain_conf.h | 2 +
src/qemu/qemu_domain_address.c | 2 +
.../qemuxml2argv-pcie-expander-bus.xml | 247 +++++++++++++
.../qemuxml2xmlout-pcie-expander-bus.xml | 384 +++++++++++++++++++++
tests/qemuxml2xmltest.c | 7 +
9 files changed, 694 insertions(+), 14 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-expander-bus.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 5552b90..2a315dd 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -3044,15 +3044,18 @@
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>,
- <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,
- pcie-switch-downstream-port <span class="since">since
1.2.19</span>,
- and pci-expander-bus <span class="since">since 1.3.3</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
+ <code>pcie-switch-downstream-port</code>,
<code>pci-expander-bus</code>,
+ or <code>pcie-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,
+ pcie-switch-downstream-port <span class="since">since
+ 1.2.19</span>, and pci-expander-bus and
+ pcie-expander-bus <span class="since">since 1.3.3</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
<code>unit</code> attribute) the 64-bit PCI hole should be. Some guests
(like
Windows XP or Windows Server 2003) might crash when QEMU and Seabios
are recent enough to support 64-bit PCI holes, unless this is disabled
@@ -3114,7 +3117,7 @@
</dd>
<dt><code>busNr</code></dt>
<dd>
- pci-expander-bus controllers can have an
+ pci-expander-bus and pcie-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
@@ -3129,6 +3132,23 @@
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).
+ <p>
+ A similar algorithm is used for automatically determining
+ the busNr attribute for pcie-expander-bus, but since the
+ pcie-expander-bus doesn't have any built-in pci-bridge, the
+ 2nd bus-number is just being reserved for the pcie-root-port
+ that must necessarily be connected to the bus in order to
+ actually plug in an endpoint device. If you intend to plug
+ multiple devices into a pcie-expander-bus, you must instead
+ connect a pcie-switch-upstream-port to the
+ pcie-expander-bus, and multiple pcie-switch-downstream-ports
+ to the pcie-switch-downstream-port, and of course for this
+ to work properly, you will need to decrease the
+ pcie-expander-bus' busNr accordingly so that there are
+ enough unused bus numbers above it to accomodate giving out
+ one bus number for the upstream-port and one for each
+ downstream-port).
+ </p>
</dd>
<dt><code><node></code></dt>
<dd>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 8827807..fd9d5a2 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1761,6 +1761,8 @@
<value>xio3130-downstream</value>
<!-- implementations of 'pci-expander-bus' -->
<value>pxb</value>
+ <!-- implementations of 'pcie-expander-bus' -->
+ <value>pxb-pcie</value>
</choice>
</attribute>
<empty/>
@@ -1819,6 +1821,7 @@
<value>pcie-switch-upstream-port</value>
<value>pcie-switch-downstream-port</value>
<value>pci-expander-bus</value>
+ <value>pcie-expander-bus</value>
</choice>
</attribute>
</group>
diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index 5293dc9..23d671c 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -57,8 +57,11 @@ virDomainPCIControllerModelToConnectType(virDomainControllerModelPCI
model,
*connectType = VIR_PCI_CONNECT_TYPE_PCI_DEVICE;
break;
case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE:
- /* dmi-to-pci-bridge is treated like a PCIe device
- * (e.g. it can be plugged directly into pcie-root)
+ case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS:
+ /* dmi-to-pci-bridge and pcie-expander-bus are treated like
+ * PCIe devices (the part of pcie-expander-bus that is plugged
+ * in isn't the expander bus itself, but a companion device
+ * used for setting it up).
*/
*connectType = VIR_PCI_CONNECT_TYPE_PCIE_DEVICE;
break;
@@ -278,6 +281,16 @@ virDomainPCIAddressBusSetModel(virDomainPCIAddressBusPtr bus,
bus->minSlot = 0;
bus->maxSlot = VIR_PCI_ADDRESS_SLOT_LAST;
break;
+ case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS:
+ /* single slot, no hotplug, only accepts pcie-root-port or
+ * pcie-switch-upstream-port.
+ */
+ bus->flags = (VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT
+ | VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT);
+ bus->minSlot = 0;
+ bus->maxSlot = 0;
+ break;
+
default:
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Invalid PCI controller model %d"), model);
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1619517..b7cffd8 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -315,7 +315,8 @@ VIR_ENUM_IMPL(virDomainControllerModelPCI,
VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST,
"pcie-root-port",
"pcie-switch-upstream-port",
"pcie-switch-downstream-port",
- "pci-expander-bus")
+ "pci-expander-bus",
+ "pcie-expander-bus")
VIR_ENUM_IMPL(virDomainControllerPCIModelName,
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST,
@@ -325,7 +326,8 @@ VIR_ENUM_IMPL(virDomainControllerPCIModelName,
"ioh3420",
"x3130-upstream",
"xio3130-downstream",
- "pxb")
+ "pxb",
+ "pxb-pcie")
VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST,
"auto",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4757065..673ddd0 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -758,6 +758,7 @@ typedef enum {
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_PCIE_EXPANDER_BUS,
VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST
} virDomainControllerModelPCI;
@@ -770,6 +771,7 @@ typedef enum {
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_PXB_PCIE,
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST
} virDomainControllerPCIModelName;
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index aaec7b5..9006643 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -1378,6 +1378,7 @@ qemuDomainPCIControllerSetDefaultModelName(virDomainControllerDefPtr
cont)
case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS:
*modelName = VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PXB;
break;
+ case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS:
case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT:
case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT:
case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST:
@@ -1582,6 +1583,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
options->port = addr->slot;
break;
case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS:
+ case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS:
if (options->busNr == -1)
options->busNr = qemuDomainAddressFindNewBusNr(def);
if (options->busNr == -1) {
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.xml
b/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.xml
new file mode 100644
index 0000000..72681ce
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.xml
@@ -0,0 +1,247 @@
+<domain type='qemu'>
+ <name>pcie-expander-bus-test</name>
+ <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+ <memory unit='KiB'>2097152</memory>
+ <currentMemory unit='KiB'>2097152</currentMemory>
+ <vcpu placement='static'>16</vcpu>
+ <os>
+ <type arch='x86_64' machine='q35'>hvm</type>
+ <boot dev='hd'/>
+ </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>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/libexec/qemu-kvm</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='sda' bus='sata'/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
+ </disk>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1'
model='dmi-to-pci-bridge'>
+ <model name='i82801b11-bridge'/>
+ </controller>
+ <controller type='pci' index='2' model='pci-bridge'>
+ <model name='pci-bridge'/>
+ <target chassisNr='56'/>
+ </controller>
+ <controller type='pci' index='3'
model='pcie-expander-bus'>
+ <model name='pxb-pcie'/>
+ <target busNr='254'>
+ <node>0</node>
+ </target>
+ <address type='pci' bus='0x00' slot='4'/>
+ </controller>
+ <controller type='pci' index='4'
model='pcie-root-port'>
+ <target busNr='220'>
+ <node>1</node>
+ </target>
+ <address type='pci' bus='0x03'/>
+ </controller>
+ <controller type='pci' index='5'
model='pcie-switch-upstream-port'>
+ <address type='pci' bus='0x04'/>
+ </controller>
+ <controller type='pci' index='6'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='7'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='8'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='9'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='10'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='11'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='12'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='13'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='14'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='15'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='16'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='17'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='18'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='19'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='20'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='21'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='22'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='23'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='24'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='25'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='26'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='27'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='28'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='29'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='30'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='31'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='32'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='33'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='34'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='35'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='36'
model='pcie-switch-downstream-port'/>
+ <controller type='pci' index='37'
model='pcie-switch-downstream-port'/>
+ <interface type='user'>
+ <mac address='52:54:00:f1:95:51'/>
+ <model type='rtl8139'/>
+ <address type='pci' bus='6'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:5c:c6:1a'/>
+ <model type='e1000'/>
+ <address type='pci' bus='07'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:39:97:ac'/>
+ <model type='e1000'/>
+ <address type='pci' bus='8'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:ee:b9:a8'/>
+ <model type='e1000'/>
+ <address type='pci' bus='9'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:a9:f7:17'/>
+ <model type='e1000'/>
+ <address type='pci' bus='10'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:df:2b:f3'/>
+ <model type='e1000'/>
+ <address type='pci' bus='11'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:78:94:b4'/>
+ <model type='e1000'/>
+ <address type='pci' bus='12'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:6b:9b:06'/>
+ <model type='e1000'/>
+ <address type='pci' bus='13'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:17:df:bc'/>
+ <model type='e1000'/>
+ <address type='pci' bus='14'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:3b:d0:51'/>
+ <model type='e1000'/>
+ <address type='pci' bus='15'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:8d:2d:17'/>
+ <model type='e1000'/>
+ <address type='pci' bus='16'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:a7:66:af'/>
+ <model type='e1000'/>
+ <address type='pci' bus='17'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:54:ab:d7'/>
+ <model type='e1000'/>
+ <address type='pci' bus='18'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:1f:99:90'/>
+ <model type='e1000'/>
+ <address type='pci' bus='19'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:c8:43:87'/>
+ <model type='e1000'/>
+ <address type='pci' bus='20'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:df:22:b2'/>
+ <model type='e1000'/>
+ <address type='pci' bus='21'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:d2:9a:47'/>
+ <model type='e1000'/>
+ <address type='pci' bus='22'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:86:05:e2'/>
+ <model type='e1000'/>
+ <address type='pci' bus='23'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:8c:1c:c2'/>
+ <model type='e1000'/>
+ <address type='pci' bus='24'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:48:58:92'/>
+ <model type='e1000'/>
+ <address type='pci' bus='25'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:99:e5:bf'/>
+ <model type='e1000'/>
+ <address type='pci' bus='26'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:b1:8c:25'/>
+ <model type='e1000'/>
+ <address type='pci' bus='27'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:60:e0:d0'/>
+ <model type='e1000'/>
+ <address type='pci' bus='28'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:37:00:6a'/>
+ <model type='e1000'/>
+ <address type='pci' bus='29'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:c7:c8:ad'/>
+ <model type='e1000'/>
+ <address type='pci' bus='30'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:4e:a7:cf'/>
+ <model type='e1000'/>
+ <address type='pci' bus='31'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:00:79:69'/>
+ <model type='e1000'/>
+ <address type='pci' bus='32'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:47:00:6f'/>
+ <model type='e1000'/>
+ <address type='pci' bus='33'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:2a:8c:8b'/>
+ <model type='e1000'/>
+ <address type='pci' bus='34'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:ec:d5:e3'/>
+ <model type='e1000'/>
+ <address type='pci' bus='35'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:7e:6e:c8'/>
+ <model type='e1000'/>
+ <address type='pci' bus='36'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:7e:6d:c9'/>
+ <model type='e1000'/>
+ <address type='pci' bus='37'/>
+ </interface>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-expander-bus.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-expander-bus.xml
new file mode 100644
index 0000000..7a37870
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-expander-bus.xml
@@ -0,0 +1,384 @@
+<domain type='qemu'>
+ <name>pcie-expander-bus-test</name>
+ <uuid>11dbdcdd-4c3b-482b-8903-9bdb8c0a2774</uuid>
+ <memory unit='KiB'>2097152</memory>
+ <currentMemory unit='KiB'>2097152</currentMemory>
+ <vcpu placement='static'>16</vcpu>
+ <os>
+ <type arch='x86_64' machine='q35'>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/libexec/qemu-kvm</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='sda' bus='sata'/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
+ </disk>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1'
model='dmi-to-pci-bridge'>
+ <model name='i82801b11-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x1e' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pci-bridge'>
+ <model name='pci-bridge'/>
+ <target chassisNr='56'/>
+ <address type='pci' domain='0x0000' bus='0x01'
slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='3'
model='pcie-expander-bus'>
+ <model name='pxb-pcie'/>
+ <target busNr='254'>
+ <node>0</node>
+ </target>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
+ </controller>
+ <controller type='pci' index='4'
model='pcie-root-port'>
+ <model name='ioh3420'/>
+ <target chassis='4' port='0x0' busNr='220'>
+ <node>1</node>
+ </target>
+ <address type='pci' domain='0x0000' bus='0x03'
slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='5'
model='pcie-switch-upstream-port'>
+ <model name='x3130-upstream'/>
+ <address type='pci' domain='0x0000' bus='0x04'
slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='6'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='6' port='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='7'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='7' port='0x1'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='8'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='8' port='0x2'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x02' function='0x0'/>
+ </controller>
+ <controller type='pci' index='9'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='9' port='0x3'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x03' function='0x0'/>
+ </controller>
+ <controller type='pci' index='10'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='10' port='0x4'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x04' function='0x0'/>
+ </controller>
+ <controller type='pci' index='11'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='11' port='0x5'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x05' function='0x0'/>
+ </controller>
+ <controller type='pci' index='12'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='12' port='0x6'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x06' function='0x0'/>
+ </controller>
+ <controller type='pci' index='13'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='13' port='0x7'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x07' function='0x0'/>
+ </controller>
+ <controller type='pci' index='14'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='14' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x08' function='0x0'/>
+ </controller>
+ <controller type='pci' index='15'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='15' port='0x9'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x09' function='0x0'/>
+ </controller>
+ <controller type='pci' index='16'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='16' port='0xa'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x0a' function='0x0'/>
+ </controller>
+ <controller type='pci' index='17'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='17' port='0xb'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x0b' function='0x0'/>
+ </controller>
+ <controller type='pci' index='18'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='18' port='0xc'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x0c' function='0x0'/>
+ </controller>
+ <controller type='pci' index='19'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='19' port='0xd'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x0d' function='0x0'/>
+ </controller>
+ <controller type='pci' index='20'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='20' port='0xe'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x0e' function='0x0'/>
+ </controller>
+ <controller type='pci' index='21'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='21' port='0xf'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x0f' function='0x0'/>
+ </controller>
+ <controller type='pci' index='22'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='22' port='0x10'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x10' function='0x0'/>
+ </controller>
+ <controller type='pci' index='23'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='23' port='0x11'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x11' function='0x0'/>
+ </controller>
+ <controller type='pci' index='24'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='24' port='0x12'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x12' function='0x0'/>
+ </controller>
+ <controller type='pci' index='25'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='25' port='0x13'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x13' function='0x0'/>
+ </controller>
+ <controller type='pci' index='26'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='26' port='0x14'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x14' function='0x0'/>
+ </controller>
+ <controller type='pci' index='27'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='27' port='0x15'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x15' function='0x0'/>
+ </controller>
+ <controller type='pci' index='28'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='28' port='0x16'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x16' function='0x0'/>
+ </controller>
+ <controller type='pci' index='29'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='29' port='0x17'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x17' function='0x0'/>
+ </controller>
+ <controller type='pci' index='30'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='30' port='0x18'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x18' function='0x0'/>
+ </controller>
+ <controller type='pci' index='31'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='31' port='0x19'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x19' function='0x0'/>
+ </controller>
+ <controller type='pci' index='32'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='32' port='0x1a'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x1a' function='0x0'/>
+ </controller>
+ <controller type='pci' index='33'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='33' port='0x1b'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x1b' function='0x0'/>
+ </controller>
+ <controller type='pci' index='34'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='34' port='0x1c'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x1c' function='0x0'/>
+ </controller>
+ <controller type='pci' index='35'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='35' port='0x1d'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x1d' function='0x0'/>
+ </controller>
+ <controller type='pci' index='36'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='36' port='0x1e'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x1e' function='0x0'/>
+ </controller>
+ <controller type='pci' index='37'
model='pcie-switch-downstream-port'>
+ <model name='xio3130-downstream'/>
+ <target chassis='37' port='0x1f'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x1f' function='0x0'/>
+ </controller>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x1f' function='0x2'/>
+ </controller>
+ <interface type='user'>
+ <mac address='52:54:00:f1:95:51'/>
+ <model type='rtl8139'/>
+ <address type='pci' domain='0x0000' bus='0x06'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:5c:c6:1a'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x07'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:39:97:ac'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x08'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:ee:b9:a8'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x09'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:a9:f7:17'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x0a'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:df:2b:f3'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x0b'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:78:94:b4'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x0c'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:6b:9b:06'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x0d'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:17:df:bc'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x0e'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:3b:d0:51'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x0f'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:8d:2d:17'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x10'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:a7:66:af'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x11'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:54:ab:d7'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x12'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:1f:99:90'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x13'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:c8:43:87'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x14'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:df:22:b2'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x15'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:d2:9a:47'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x16'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:86:05:e2'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x17'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:8c:1c:c2'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x18'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:48:58:92'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x19'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:99:e5:bf'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x1a'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:b1:8c:25'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x1b'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:60:e0:d0'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x1c'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:37:00:6a'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x1d'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:c7:c8:ad'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x1e'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:4e:a7:cf'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x1f'
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='0x20'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:47:00:6f'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x21'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:2a:8c:8b'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x22'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:ec:d5:e3'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x23'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:7e:6e:c8'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x24'
slot='0x00' function='0x0'/>
+ </interface>
+ <interface type='user'>
+ <mac address='52:54:00:7e:6d:c9'/>
+ <model type='e1000'/>
+ <address type='pci' domain='0x0000' bus='0x25'
slot='0x00' function='0x0'/>
+ </interface>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 016340b..e986205 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -644,6 +644,13 @@ mymain(void)
DO_TEST_FULL("pci-expander-bus", WHEN_ACTIVE,
QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_PXB);
+ DO_TEST_FULL("pcie-expander-bus", WHEN_ACTIVE,
+ QEMU_CAPS_DEVICE_PCI_BRIDGE,
+ QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
+ QEMU_CAPS_DEVICE_IOH3420,
+ QEMU_CAPS_DEVICE_X3130_UPSTREAM,
+ QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM,
+ QEMU_CAPS_DEVICE_PXB_PCIE);
DO_TEST_FULL("hostdev-scsi-lsi", WHEN_ACTIVE,
--
2.5.5