bhyve: improve ISA controller validation error reporting

Report error in case when incorrect index is specified for
the ISA controller.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Roman Bogorodskiy committed 2026-05-02 10:31:55 +02:00
1 parent 150b8fe6ee
commit a4c9988471
1 file changed
+2
+2
View File
@@ -323,6 +323,8 @@ bhyveDomainDeviceDefValidate(const virDomainDeviceDef *dev,
if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_ISA &&
controller->idx != 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Bhyve ISA controller can only have index '0'"));
return -1;
} else if (controller->type == VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL) {
if (controller->opts.vioserial.ports > 16) {