> A VirtIOBlock device cannot be a VirtIODevice while being a
> VirtIOPCIProxy (proxy is a poor name, btw).
> 
> It really ought to be:
> 
> DeviceState -> VirtIODevice -> VirtIOBlock
> 
> and:
> 
> PCIDevice -> VirtIOPCI : implements VirtIOBus
> 
> The interface between the VirtIODevice and VirtIOBus is the virtio
> transport.
> 
> The main reason a separate bus is needed is the same reason it's needed
> in Linux.  VirtIOBlock has to be tied to some bus.  It cannot be tied to
> the PCI bus without having it be part of the implementation detail.
> Introducing another bus type fixes this (and it's what we do in the
>  kernel).

Why does virtio need a device state and bus at all? 
Can't it just be an internal implementation interface, which happens to be 
used by all devices that happen to exposed a block device over a virtio 
transport?

If you have a virtio bus then IMO the PCI bridge device should be independent 
of the virtio device that is connected to it.

Paul


Reply via email to