On 13/11/2012 16:32, Cornelia Huck wrote:
On Tue, 13 Nov 2012 15:27:57 +0100
KONRAD Frédéric <fred.kon...@greensocs.com> wrote:

To fix this, an idea is to use a new qbus named VirtioBus to link virtio-pci
or virtio-mmio with all the virtio backend ( VirtioDevice ). So
"virtio-pci" and
"virtio-mmio" will have a VirtioBus.
Just to spell this out:

We'd go from

system bus
-> virtio transport bridge dev (virtio-xxx-bridge)
    -> virtio transport bus (virtio-xxx-bus)
       -> virtio transport dev (virtio-<type>-xxx)

to

system bus
-> virtio transport bridge dev (virtio-bridge-xxx)
    -> virtio bus (virtio-bus-xxx)
       -> virtio dev (virtio-<type>-xxx)

?
I'm not sure of what you mean,.. do you mean for s390 ?

for the moment we have e.g : virtio-blk-pci ( in virtio-pci.c )

and we want virtio-pci -> virtio-bus -> virtio-blk.

( or virtio-mmio -> virtio-bus -> virtio-blk. for pci-less system. )


Would this also mean we could have several virtio-busses with different
transports?
I think so.

To do that we will do the following things in the right order :
      * Introduce a new VirtioBus ( same way as scsi-bus.c ), with
VirtIODevice
        interface :
           -> callback to completely abstract the VirtioDevice from
VirtioPCI.
           -> for the queue, load/save the queue/config, features, ...,
other ?
      * Add a VirtioBus to the VirtioPCIProxy. ( virtio-pci.c ) :
           -> moving all to the newer callback.
      * For each of the virtio-device : ( virtio-x.c )
           -> making a separate class for virtio-x which is a VirtioDevice.
           -> making a virtio-x-pci which has a virtio-x.
      * Create virtio-mmio ( virtio-mmio.c ).

Is it the right approach ? Do I miss something ?
What of the alias handling? Can this be killed once everything has been
converted?
Which alias ?

When it will work, we must be sure of :

-> migration compatibility.
-> not breaking the s390 transport.
-> compatibility with s390 ccw.
There shouldn't be major problems rebasing the virtio-ccw code on top
of this rework (though I'd probably try to keep the basic channel I/O
support separate from this patchset).



Reply via email to