conf: new pci controller model pci-expander-bus

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.
This commit is contained in:
Laine Stump 2016-03-04 10:26:23 -05:00
parent 5d4e2b1721
commit 52f3d0a4d2
9 changed files with 503 additions and 14 deletions

View File

@ -3102,12 +3102,13 @@
PCI controllers have an optional <code>model</code> attribute with PCI controllers have an optional <code>model</code> attribute with
possible values <code>pci-root</code>, <code>pcie-root</code>, possible values <code>pci-root</code>, <code>pcie-root</code>,
<code>pcie-root-port</code>, <code>pci-bridge</code>, <code>pcie-root-port</code>, <code>pci-bridge</code>,
<code>dmi-to-pci-bridge</code>, <code>pcie-switch-upstream-port</code>, or <code>dmi-to-pci-bridge</code>, <code>pcie-switch-upstream-port</code>,
<code>pcie-switch-downstream-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>, (pci-root and pci-bridge <span class="since">since 1.0.5</span>,
pcie-root and dmi-to-pci-bridge <span class="since">since pcie-root and dmi-to-pci-bridge <span class="since">since
1.1.2</span>, pcie-root-port, pcie-switch-upstream-port, and 1.1.2</span>, pcie-root-port, pcie-switch-upstream-port,
pcie-switch-downstream-port <span class="since">since 1.2.19</span>) 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>) The root controllers (<code>pci-root</code> and <code>pcie-root</code>)
have an optional <code>pcihole64</code> element specifying how big have an optional <code>pcihole64</code> element specifying how big
(in kilobytes, or in the unit specified by <code>pcihole64</code>'s (in kilobytes, or in the unit specified by <code>pcihole64</code>'s
@ -3131,9 +3132,9 @@
</p> </p>
<p> <p>
PCI controllers also have an optional PCI controllers also have an optional
subelement <code>&lt;target&gt;</code> with the attributes subelement <code>&lt;target&gt;</code> with the attributes and
listed below. These are configurable items that 1) are visible subelements listed below. These are configurable items that 1)
to the guest OS so must be preserved for guest ABI are visible to the guest OS so must be preserved for guest ABI
compatibility, and 2) are usually left to default values or compatibility, and 2) are usually left to default values or
derived automatically by libvirt. In almost all cases, you derived automatically by libvirt. In almost all cases, you
should not manually add a <code>&lt;target&gt;</code> subelement should not manually add a <code>&lt;target&gt;</code> subelement
@ -3170,6 +3171,35 @@
which is visible to the virtual machine. If set, port must be which is visible to the virtual machine. If set, port must be
between 0 and 255. between 0 and 255.
</dd> </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> </dl>
<p> <p>
For machine types which provide an implicit PCI bus, the pci-root For machine types which provide an implicit PCI bus, the pci-root

View File

@ -1786,6 +1786,8 @@
<value>x3130-upstream</value> <value>x3130-upstream</value>
<!-- implementations of 'pcie-switch-downstream-port' --> <!-- implementations of 'pcie-switch-downstream-port' -->
<value>xio3130-downstream</value> <value>xio3130-downstream</value>
<!-- implementations of 'pci-expander-bus' -->
<value>pxb</value>
</choice> </choice>
</attribute> </attribute>
<empty/> <empty/>
@ -1808,7 +1810,16 @@
<ref name='uint8'/> <ref name='uint8'/>
</attribute> </attribute>
</optional> </optional>
<empty/> <optional>
<attribute name='busNr'>
<ref name='uint8'/>
</attribute>
</optional>
<optional>
<element name='node'>
<ref name='unsignedInt'/>
</element>
</optional>
</element> </element>
</optional> </optional>
<!-- *-root controllers have an optional element "pcihole64"--> <!-- *-root controllers have an optional element "pcihole64"-->
@ -1834,6 +1845,7 @@
<value>pcie-root-port</value> <value>pcie-root-port</value>
<value>pcie-switch-upstream-port</value> <value>pcie-switch-upstream-port</value>
<value>pcie-switch-downstream-port</value> <value>pcie-switch-downstream-port</value>
<value>pci-expander-bus</value>
</choice> </choice>
</attribute> </attribute>
</group> </group>

View File

@ -51,7 +51,11 @@ virDomainPCIControllerModelToConnectType(virDomainControllerModelPCI model)
return 0; return 0;
case VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE: 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; return VIR_PCI_CONNECT_TYPE_PCI_DEVICE;
case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE:
@ -231,6 +235,13 @@ virDomainPCIAddressBusSetModel(virDomainPCIAddressBusPtr bus,
bus->minSlot = 1; bus->minSlot = 1;
bus->maxSlot = VIR_PCI_ADDRESS_SLOT_LAST; bus->maxSlot = VIR_PCI_ADDRESS_SLOT_LAST;
break; 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: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT:
/* slots 1 - 31, no hotplug, PCIe endpoint device or /* slots 1 - 31, no hotplug, PCIe endpoint device or
* pcie-root-port only, unless the address was specified in * pcie-root-port only, unless the address was specified in

View File

@ -320,7 +320,8 @@ VIR_ENUM_IMPL(virDomainControllerModelPCI, VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST,
"dmi-to-pci-bridge", "dmi-to-pci-bridge",
"pcie-root-port", "pcie-root-port",
"pcie-switch-upstream-port", "pcie-switch-upstream-port",
"pcie-switch-downstream-port") "pcie-switch-downstream-port",
"pci-expander-bus")
VIR_ENUM_IMPL(virDomainControllerPCIModelName, VIR_ENUM_IMPL(virDomainControllerPCIModelName,
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST,
@ -329,7 +330,8 @@ VIR_ENUM_IMPL(virDomainControllerPCIModelName,
"i82801b11-bridge", "i82801b11-bridge",
"ioh3420", "ioh3420",
"x3130-upstream", "x3130-upstream",
"xio3130-downstream") "xio3130-downstream",
"pxb")
VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST, VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST,
"auto", "auto",
@ -1654,6 +1656,8 @@ virDomainControllerDefNew(virDomainControllerType type)
def->opts.pciopts.chassisNr = -1; def->opts.pciopts.chassisNr = -1;
def->opts.pciopts.chassis = -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;
break; break;
case VIR_DOMAIN_CONTROLLER_TYPE_IDE: case VIR_DOMAIN_CONTROLLER_TYPE_IDE:
case VIR_DOMAIN_CONTROLLER_TYPE_FDC: case VIR_DOMAIN_CONTROLLER_TYPE_FDC:
@ -7830,6 +7834,8 @@ virDomainControllerDefParseXML(xmlNodePtr node,
char *chassisNr = NULL; char *chassisNr = NULL;
char *chassis = NULL; char *chassis = NULL;
char *port = NULL; char *port = NULL;
char *busNr = NULL;
int numaNode = -1;
char *ioeventfd = NULL; char *ioeventfd = NULL;
xmlNodePtr saved = ctxt->node; xmlNodePtr saved = ctxt->node;
int rc; int rc;
@ -7894,12 +7900,23 @@ virDomainControllerDefParseXML(xmlNodePtr node,
chassisNr = virXMLPropString(cur, "chassisNr"); chassisNr = virXMLPropString(cur, "chassisNr");
chassis = virXMLPropString(cur, "chassis"); chassis = virXMLPropString(cur, "chassis");
port = virXMLPropString(cur, "port"); port = virXMLPropString(cur, "port");
busNr = virXMLPropString(cur, "busNr");
processedTarget = true; processedTarget = true;
} }
} }
cur = cur->next; 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) { if (queues && virStrToLong_ui(queues, NULL, 10, &def->queues) < 0) {
virReportError(VIR_ERR_XML_ERROR, virReportError(VIR_ERR_XML_ERROR,
_("Malformed 'queues' value '%s'"), queues); _("Malformed 'queues' value '%s'"), queues);
@ -8069,6 +8086,25 @@ virDomainControllerDefParseXML(xmlNodePtr node,
goto error; 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; break;
default: default:
@ -8087,6 +8123,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
VIR_FREE(chassisNr); VIR_FREE(chassisNr);
VIR_FREE(chassis); VIR_FREE(chassis);
VIR_FREE(port); VIR_FREE(port);
VIR_FREE(busNr);
VIR_FREE(ioeventfd); VIR_FREE(ioeventfd);
return def; return def;
@ -19420,7 +19457,9 @@ virDomainControllerDefFormat(virBufferPtr buf,
pciModel = true; pciModel = true;
if (def->opts.pciopts.chassisNr != -1 || if (def->opts.pciopts.chassisNr != -1 ||
def->opts.pciopts.chassis != -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; pciTarget = true;
break; break;
@ -19456,7 +19495,19 @@ virDomainControllerDefFormat(virBufferPtr buf,
if (def->opts.pciopts.port != -1) if (def->opts.pciopts.port != -1)
virBufferAsprintf(buf, " port='0x%x'", virBufferAsprintf(buf, " port='0x%x'",
def->opts.pciopts.port); 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 || if (def->queues || def->cmd_per_lun ||

View File

@ -1,7 +1,7 @@
/* /*
* domain_conf.h: domain XML processing * 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) 2006-2008 Daniel P. Berrange
* Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. * 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_ROOT_PORT,
VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT, VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT,
VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT, VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT,
VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS,
VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST
} virDomainControllerModelPCI; } virDomainControllerModelPCI;
@ -770,6 +771,7 @@ typedef enum {
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420,
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_X3130_UPSTREAM, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_X3130_UPSTREAM,
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_XIO3130_DOWNSTREAM, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_XIO3130_DOWNSTREAM,
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PXB,
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST
} virDomainControllerPCIModelName; } virDomainControllerPCIModelName;
@ -834,6 +836,11 @@ struct _virDomainPCIControllerOpts {
* pcie-root-port/pcie-switch-downstream-port, -1 = unspecified */ * pcie-root-port/pcie-switch-downstream-port, -1 = unspecified */
int chassis; int chassis;
int port; 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 */ /* Stores the virtual disk controller configuration */

View File

@ -1372,6 +1372,7 @@ qemuDomainPCIControllerSetDefaultModelName(virDomainControllerDefPtr cont)
case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT:
*modelName = VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_XIO3130_DOWNSTREAM; *modelName = VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_XIO3130_DOWNSTREAM;
break; break;
case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS:
case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT:
case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT:
case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST:
@ -1507,6 +1508,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
if (options->port == -1) if (options->port == -1)
options->port = addr->slot; options->port = addr->slot;
break; break;
case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS:
case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE:
case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT:
case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT:

View File

@ -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>

View File

@ -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>

View File

@ -644,6 +644,9 @@ mymain(void)
QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_ICH9_AHCI,
QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
QEMU_CAPS_VGA_QXL, QEMU_CAPS_DEVICE_QXL); 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, DO_TEST_FULL("hostdev-scsi-lsi", WHEN_ACTIVE,