
On 12/06/2017 05:15 AM, Andrea Bolognani wrote:
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> --- src/qemu/qemu_command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
I've been working on moving changes from qemu_command to qemu_domain as part of a validate the controller def sequence of calls... v3 is here: https://www.redhat.com/archives/libvir-list/2017-December/msg00209.html Do you mind if I merge that series before I post v4? John
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6a8da1d58..c0ea9eded 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2922,7 +2922,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;