qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Can we improve virtio data structures with QOM?


From: Anthony Liguori
Subject: Re: [Qemu-devel] Can we improve virtio data structures with QOM?
Date: Thu, 31 May 2012 07:02:50 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

On 05/31/2012 12:28 AM, Markus Armbruster wrote:
Stefan Hajnoczi<address@hidden>  writes:

On Wed, May 30, 2012 at 1:01 PM, Markus Armbruster<address@hidden>  wrote:
Ordinary device models have a single state struct.  The first member is
a DeviceState or a specialization of DeviceState, e.g. a PCIDevice.
Simple enough.

I think Evgeny's virtio mmio patches change all this.  In the recent
virtio-pci thread we were discussing how the virtio transport (mmio,
pci) and virtio devices (net, blk, etc) fit together.  The email
thread is "Virtio-pci issues" from Evgeny Voevodin
<address@hidden>.

Thanks for the pointer.

It's been a couple of weeks.  Evgeny, are you still pursuing this?

It probably makes sense to first merge Evgeny's virtio refactoring and
then ensure it's nicely mapped to QOM.

Yes, no good attempting to do too much in one series.  Nevertheless,
having a sufficiently developed idea of the final state in mind helps.

Basically, it should look like:

VirtioPCIDevice is-a PCIDevice

VirtioPCIDevice has-a link<VirtioDevice>

VirtioDevice is-a DeviceState

VirtioBlk is-a VirtioDevice
VirtioNet is-a VirtioDevice
...

VirtioPCIBlk is-a VirtioPCIDevice
VirtioPCIBlk has-a child<VirtioBlk>

This gives us backwards compat while also providing a cleaner model. VirtioPCIBlk et al would be deprecated eventually (but not any time soon).

Regards,

Anthony Liguori






reply via email to

[Prev in Thread] Current Thread [Next in Thread]