Re: [PATCH 17/18] qemu: Support virtio-serial controller model=virtio-{non-}transitional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2019-01-22 at 12:46 -0500, Cole Robinson wrote:
> On 01/21/2019 11:59 AM, Andrea Bolognani wrote:
> > On Thu, 2019-01-17 at 12:52 -0500, Cole Robinson wrote:
> > [...]
> > > +typedef enum {
> > > +    VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_DEFAULT = -1,
> > > +    VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO,
> > > +    VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_TRANSITIONAL,
> > > +    VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_NON_TRANSITIONAL,
> > > +
> > > +    VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_LAST
> > > +} virDomainControllerModelVirtioSerial;
> > 
> > Do we even need MODEL_VIRTIO_SERIAL_DEFAULT here? Honest question :)
> 
> The DEFAULT = -1 is the pattern used by other controller models, and I
> believe it's kinda enforced by ControllerDefNew which sets cont->model =
> -1. It might not serve any purpose in this particular case besides
> consistency.

I see.

> Working in this area made me explore enum DEFAULT/NONE naming a bit and
> there's definitely a lot of room for making things consistent.
> controller models are the oddball here with the -1 value but I think
> that's to do with some old XML migration compat that can be unwound in a
> different way. Another task for another day

Definitely :)

-- 
Andrea Bolognani / Red Hat / Virtualization

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux