[libvirt] [PATCHv3 04/11] Add virtio revision attribute to controllers

Laine Stump laine at laine.org
Thu Aug 11 14:17:34 UTC 2016


On 08/11/2016 09:31 AM, Daniel P. Berrange wrote:
> On Thu, Aug 11, 2016 at 03:25:53PM +0200, Ján Tomko wrote:
>> On Thu, Aug 11, 2016 at 01:00:08PM +0100, Daniel P. Berrange wrote:
>>> On Wed, Aug 10, 2016 at 03:27:15PM +0200, Ján Tomko wrote:
>>>> <controller type='scsi' index='0' model='virtio-scsi'>
>>>>      <virtio revision='0.9'/>
>>> I'm wondering about generalizing this. eg what if there are
>>> other device models where we want the ability to set a
>>> revision. We don't really want to invent a new sub-elment
>>> named after each device model
>> Not even a new attribute? :)
>>   <revision virtio='0.9'/>
>>
>> How about:
>>   <revision type='virtio' version='0.9'/>
> Both of those are quite repetative - we already know its virtio.
>
> Most devices we have alrady include a <driver> or <model> sub-element,
> so we should really just add a revision= attrbute to those existing
> elements. For places which don't already have this we can add a new
> <driver> element

Yeah, I was going to suggest <driver> as well.

The only thing missing would be the ability to specify multiple versions.

Also, it does make the parsing and formatting a bit awkward, since 
<driver> has different parse/format functions for each device that uses 
it (necessary due to the difference in possible attributes).

In spite of that, it would definitely look better from the outside.





More information about the libvir-list mailing list