[...]

>> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>> index fd7579a..32e3dcd 100644
>> --- a/src/conf/domain_conf.c
>> +++ b/src/conf/domain_conf.c
>> @@ -7847,6 +7847,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
>>       char *busNr = NULL;
>>       int numaNode = -1;
>>       char *ioeventfd = NULL;
>> +    char *iothread = NULL;
>>       xmlNodePtr saved = ctxt->node;
>>       int rc;
>>
>> @@ -7891,6 +7892,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
>>                   cmd_per_lun = virXMLPropString(cur, "cmd_per_lun");
>>                   max_sectors = virXMLPropString(cur, "max_sectors");
>>                   ioeventfd = virXMLPropString(cur, "ioeventfd");
>> +                iothread = virXMLPropString(cur, "iothread");
>>               } else if (xmlStrEqual(cur->name, BAD_CAST "model")) {
>>                   if (processedModel) {
>>                       virReportError(VIR_ERR_XML_ERROR, "%s",
>> @@ -7952,6 +7954,21 @@ virDomainControllerDefParseXML(xmlNodePtr node,
>>           goto error;
>>       }
>>
>> +    if (iothread) {
>> +        if (def->model !=
>> VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI) {
>> +            virReportError(VIR_ERR_XML_ERROR,
>> +                           _("'iothread' attribute only supported for "
>> +                             "controller model '%s'"),
>> +                           virDomainControllerModelTypeToString(def,
>> VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI));
> virDomainControllerModelSCSITypeToString(VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI)
> 
> 
> Otherwise you can end up with a rather useless error messages that looks
> like this: error: XML error: 'iothread' attribute only supported for
> controller model '(null)'
> e.g. if the controller is of type 'virtio-serial'.
> 

Oh right - yeah, good catch...  I've fixed it in my branch. I guess I
was trying to utilize the common ModelTypeToString which vectors off if
type is right...

Thanks for looking at it from a ccw/s390 perspective - I was mostly
flying blind with those. I can "see" the proper syntax, but didn't have
something to test with.

Tks -

John

[...]

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to