qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] modelling omap_gpmc with the hierarchical memory API


From: Avi Kivity
Subject: Re: [Qemu-devel] modelling omap_gpmc with the hierarchical memory API
Date: Wed, 03 Aug 2011 00:29:40 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0

On 08/03/2011 12:06 AM, Anthony Liguori wrote:

The qdev level should be the common base that makes sense for *all* qdev devices. IRQ management does not belong in DeviceState because what you do for a simple LCD is not what you do for an MSI-X capable PCI device.

This is what QOM properties tries to address. It should be possible to create a simple device, and register plugs/sockets for GPIO pins without pushing GPIO knowledge into the base class.

In a QDev world, the right approach is to have a GpioDevice base class that implements this sort of logic for devices where it makes sense. That's what SysBusDevice sort of wants to be but it somehow ended up as yet another base class for everything.


Doesn't this end up requiring multiple inheritance, and a ton of boilerplate in addition?

I'm in favour of throwing everything into qdev so it's easy to use. If a device doesn't have gpio, why, 0 is a valid integer.


--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.




reply via email to

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