mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
qemu: Add support for generic PCIe Root Ports
QEMU 2.9 introduces the pcie-root-port device, which is a generic version of the existing ioh3420 device. Make the new device available to libvirt users.
This commit is contained in:
parent
123cc3e11c
commit
c51090fc99
@ -1904,6 +1904,7 @@
|
||||
<value>i82801b11-bridge</value>
|
||||
<!-- implementations of 'pcie-root-port' -->
|
||||
<value>ioh3420</value>
|
||||
<value>pcie-root-port</value>
|
||||
<!-- implementations of 'pcie-switch-upstream-port' -->
|
||||
<value>x3130-upstream</value>
|
||||
<!-- implementations of 'pcie-switch-downstream-port' -->
|
||||
|
@ -338,7 +338,9 @@ VIR_ENUM_IMPL(virDomainControllerPCIModelName,
|
||||
"x3130-upstream",
|
||||
"xio3130-downstream",
|
||||
"pxb",
|
||||
"pxb-pcie")
|
||||
"pxb-pcie",
|
||||
"pcie-root-port",
|
||||
);
|
||||
|
||||
VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LAST,
|
||||
"auto",
|
||||
|
@ -694,6 +694,7 @@ typedef enum {
|
||||
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_PCIE_ROOT_PORT,
|
||||
|
||||
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST
|
||||
} virDomainControllerPCIModelName;
|
||||
|
@ -360,6 +360,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
|
||||
"virtio-net.host_mtu",
|
||||
"spice-rendernode",
|
||||
"nvdimm",
|
||||
"pcie-root-port",
|
||||
);
|
||||
|
||||
|
||||
@ -1621,6 +1622,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
|
||||
{ "ivshmem-doorbell", QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL },
|
||||
{ "vhost-scsi", QEMU_CAPS_DEVICE_VHOST_SCSI },
|
||||
{ "nvdimm", QEMU_CAPS_DEVICE_NVDIMM },
|
||||
{ "pcie-root-port", QEMU_CAPS_DEVICE_PCIE_ROOT_PORT },
|
||||
};
|
||||
|
||||
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBalloon[] = {
|
||||
|
@ -395,6 +395,7 @@ typedef enum {
|
||||
QEMU_CAPS_VIRTIO_NET_HOST_MTU, /* virtio-net-*.host_mtu */
|
||||
QEMU_CAPS_SPICE_RENDERNODE, /* -spice rendernode */
|
||||
QEMU_CAPS_DEVICE_NVDIMM, /* -device nvdimm */
|
||||
QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, /* -device pcie-root-port */
|
||||
|
||||
QEMU_CAPS_LAST /* this must always be the last item */
|
||||
} virQEMUCapsFlags;
|
||||
|
@ -2874,20 +2874,32 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
|
||||
def->opts.pciopts.modelName);
|
||||
goto error;
|
||||
}
|
||||
if (def->opts.pciopts.modelName
|
||||
!= VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420) {
|
||||
if ((def->opts.pciopts.modelName !=
|
||||
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420) &&
|
||||
(def->opts.pciopts.modelName !=
|
||||
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_ROOT_PORT)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("PCI controller model name '%s' "
|
||||
"is not valid for a pcie-root-port"),
|
||||
modelName);
|
||||
goto error;
|
||||
}
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_IOH3420)) {
|
||||
if ((def->opts.pciopts.modelName ==
|
||||
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420) &&
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_IOH3420)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("the pcie-root-port (ioh3420) "
|
||||
"controller is not supported in this QEMU binary"));
|
||||
goto error;
|
||||
}
|
||||
if ((def->opts.pciopts.modelName ==
|
||||
VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_ROOT_PORT) &&
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCIE_ROOT_PORT)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("the pcie-root-port (pcie-root-port) "
|
||||
"controller is not supported in this QEMU binary"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
virBufferAsprintf(&buf, "%s,port=0x%x,chassis=%d,id=%s",
|
||||
modelName, def->opts.pciopts.port,
|
||||
|
@ -202,6 +202,7 @@
|
||||
<flag name='drive-iotune-group'/>
|
||||
<flag name='query-cpu-model-expansion'/>
|
||||
<flag name='virtio-net.host_mtu'/>
|
||||
<flag name='pcie-root-port'/>
|
||||
<version>2008050</version>
|
||||
<kvmVersion>0</kvmVersion>
|
||||
<package> (v2.8.0-1961-g5b10b94bd5)</package>
|
||||
|
Loading…
Reference in New Issue
Block a user