mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
qemu: Add missing checks for pcie-root-port options
We format the 'chassis' and 'port' properties on the QEMU command line later on, so we should make sure they've been set. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
d84caf9b50
commit
e1f7c354f0
@ -2816,7 +2816,9 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
|
||||
break;
|
||||
case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT:
|
||||
if (def->opts.pciopts.modelName
|
||||
== VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE) {
|
||||
== VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE ||
|
||||
def->opts.pciopts.chassis == -1 ||
|
||||
def->opts.pciopts.port == -1) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("autogenerated pcie-root-port options not set"));
|
||||
goto error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user