qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devi


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices
Date: Sun, 12 Jun 2011 20:12:17 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Lightning/1.0b3pre Thunderbird/3.1.10

On 06/10/2011 06:43 PM, Anthony Liguori wrote:

What exactly is so very wrong about buses that they need to die?

They force a device tree. The device model shouldn't be a tree, but a directed graph.

Right. As an example, you configure PCI interrupt routing and the memory controller by writing to a PCI device, which logically doesn't have access to any of this stuff if it's behind the PCI bus.

However, I don't think buses should die. They should be available as an easy way to model the devices that do follow the rules. But we should also expose everything else for the exceptional cases.

It's perfectly fine to have a type called PCIBus that I440FX extends, but qdev shouldn't have explicit knowledge of something called a "bus" IMHO. Doing this forces a limited mechanism of connecting devices because it creates an artificial tree (by implying a parent/child relationship). It makes composition difficult if not impossible.

I think qdev buses are useful as long as they don't enforce their interfaces. That is, a qdev that is a child of a qbus has access to the qbus's interfaces, but also access to other stuff. That makes the easy devices easy and the hard ones possible.

--
error compiling committee.c: too many arguments to function




reply via email to

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