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

2011-06-26 Thread Paul Brook
> On Mon, Jun 20, 2011 at 6:23 PM, Paul Brook wrote: > >> > Yeah, that's why I said, "hard to do well". It makes it very hard to > >> > add new socket types. > >> > >> PCI, USB, IDE, SCSI, SBus, what else? APICBus? I2C? 8 socket types > >> ought to be enough for anybody. > > > > Off the top of

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

2011-06-21 Thread Avi Kivity
On 06/21/2011 12:32 AM, Blue Swirl wrote: On Mon, Jun 20, 2011 at 6:23 PM, Paul Brook wrote: >> > Yeah, that's why I said, "hard to do well". It makes it very hard to add >> > new socket types. >> >> PCI, USB, IDE, SCSI, SBus, what else? APICBus? I2C? 8 socket types >> ought to be enough

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

2011-06-20 Thread Blue Swirl
On Mon, Jun 20, 2011 at 6:23 PM, Paul Brook wrote: >> > Yeah, that's why I said, "hard to do well".  It makes it very hard to add >> > new socket types. >> >> PCI, USB, IDE, SCSI, SBus, what else? APICBus? I2C? 8 socket types >> ought to be enough for anybody. > > Off the top of my head: AClink (a

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

2011-06-20 Thread Paul Brook
> > Yeah, that's why I said, "hard to do well". It makes it very hard to add > > new socket types. > > PCI, USB, IDE, SCSI, SBus, what else? APICBus? I2C? 8 socket types > ought to be enough for anybody. Off the top of my head: AClink (audio), i2s (audio), SSI/SSP (synchonous serial), Firewire,

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

2011-06-15 Thread Blue Swirl
On Wed, Jun 15, 2011 at 11:00 PM, Anthony Liguori wrote: > On 06/15/2011 01:56 PM, Blue Swirl wrote: >> >> On Tue, Jun 14, 2011 at 4:21 PM, Anthony Liguori >>  wrote: >>> >>> Which suggests that we really need to move away from declarative device >>> definitions.  It makes it hard to have variable

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

2011-06-15 Thread Anthony Liguori
On 06/15/2011 01:56 PM, Blue Swirl wrote: On Tue, Jun 14, 2011 at 4:21 PM, Anthony Liguori wrote: Which suggests that we really need to move away from declarative device definitions. It makes it hard to have variable numbers of properties. I'd suppose the number of slots could be fixed. The

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

2011-06-15 Thread Blue Swirl
On Tue, Jun 14, 2011 at 4:21 PM, Anthony Liguori wrote: > On 06/13/2011 03:59 PM, Blue Swirl wrote: >> >> On Sun, Jun 12, 2011 at 10:21 PM, Anthony Liguori >>  wrote: >>> >>> On 06/12/2011 12:12 PM, Avi Kivity wrote: On 06/10/2011 06:43 PM, Anthony Liguori wrote: > >> What exactl

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

2011-06-14 Thread Anthony Liguori
On 06/13/2011 03:59 PM, Blue Swirl wrote: On Sun, Jun 12, 2011 at 10:21 PM, Anthony Liguori wrote: On 06/12/2011 12:12 PM, Avi Kivity wrote: 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 devic

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

2011-06-13 Thread Blue Swirl
On Sun, Jun 12, 2011 at 10:21 PM, Anthony Liguori wrote: > On 06/12/2011 12:12 PM, Avi Kivity wrote: >> >> 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

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

2011-06-13 Thread Anthony Liguori
On 06/13/2011 03:05 AM, Avi Kivity wrote: On 06/12/2011 10:21 PM, Anthony Liguori wrote: 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 device

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

2011-06-13 Thread Gleb Natapov
On Fri, Jun 10, 2011 at 04:59:08PM +0200, Markus Armbruster wrote: > Anthony Liguori writes: > > > On 06/10/2011 03:13 AM, Markus Armbruster wrote: > >> Jan Kiszka writes: > >>> Resource management, e.g. IRQs. That will be useful for other types of > >>> buses as well. > >> > >> A device should

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

2011-06-13 Thread Avi Kivity
On 06/12/2011 10:21 PM, Anthony Liguori wrote: 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

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

2011-06-12 Thread Anthony Liguori
On 06/12/2011 12:12 PM, Avi Kivity wrote: 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

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

2011-06-12 Thread Avi Kivity
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 w

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

2011-06-10 Thread Andreas Färber
Am 10.06.2011 um 14:51 schrieb Anthony Liguori: The trouble is that I don't think we have a reasonable way to refer to properties of other devices and we don't have names for all devices. I think if we fix the later problem, the former problem becomes easier. For the former issue I sent

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

2011-06-10 Thread Anthony Liguori
On 06/10/2011 09:59 AM, Markus Armbruster wrote: Anthony Liguori writes: On 06/10/2011 03:13 AM, Markus Armbruster wrote: Jan Kiszka writes: Resource management, e.g. IRQs. That will be useful for other types of buses as well. A device should be able to say "I need to be connected to an

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

2011-06-10 Thread Markus Armbruster
Anthony Liguori writes: > On 06/10/2011 03:13 AM, Markus Armbruster wrote: >> Jan Kiszka writes: >>> Resource management, e.g. IRQs. That will be useful for other types of >>> buses as well. >> >> A device should be able to say "I need to be connected to an IRQ line". >> Feels generic to me. > >

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

2011-06-10 Thread Anthony Liguori
On 06/10/2011 09:22 AM, Markus Armbruster wrote: Peter Maydell writes: But I think that's a non-typical case compared to the usual one of "these wires are just hardwired this way by the machine". IIRC, the PCI bus also provides a number of IRQ lines for the device to tickle (INTA#..INTD#).

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

2011-06-10 Thread Anthony Liguori
On 06/10/2011 09:18 AM, Jan Kiszka wrote: On 2011-06-10 16:12, Anthony Liguori wrote: On 06/10/2011 08:43 AM, Jan Kiszka wrote: -device piix3,id=piix3 -device isa-serial,id=serial,irq[3]=piix3.irq[3],irq[4]=piix3.irq[4],... But I don't think we benefit from modelling it this correctly. The

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

2011-06-10 Thread Anthony Liguori
On 06/10/2011 08:50 AM, Peter Maydell wrote: On 10 June 2011 14:43, Jan Kiszka wrote: On 2011-06-10 15:10, Peter Maydell wrote: This makes the wiring of this signal look like a property of the isa-serial device, which is a bit odd, since it's just as much a property of the piix3. Actually it's

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

2011-06-10 Thread Markus Armbruster
Peter Maydell writes: > On 10 June 2011 14:43, Jan Kiszka wrote: >> On 2011-06-10 15:10, Peter Maydell wrote: >>> This makes the wiring of this signal look like a property of the >>> isa-serial device, which is a bit odd, since it's just as much >>> a property of the piix3. Actually it's neither

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

2011-06-10 Thread Jan Kiszka
On 2011-06-10 16:12, Anthony Liguori wrote: > On 06/10/2011 08:43 AM, Jan Kiszka wrote: >> On 2011-06-10 15:10, Peter Maydell wrote: >>> On 10 June 2011 13:51, Anthony Liguori wrote: On 06/10/2011 03:13 AM, Markus Armbruster wrote: > > Jan Kiszka writes: >> >> Resource manag

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

2011-06-10 Thread Anthony Liguori
On 06/10/2011 08:43 AM, Jan Kiszka wrote: On 2011-06-10 15:10, Peter Maydell wrote: On 10 June 2011 13:51, Anthony Liguori wrote: On 06/10/2011 03:13 AM, Markus Armbruster wrote: Jan Kiszka writes: Resource management, e.g. IRQs. That will be useful for other types of buses as well. A

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

2011-06-10 Thread Anthony Liguori
On 06/10/2011 08:10 AM, Peter Maydell wrote: On 10 June 2011 13:51, Anthony Liguori wrote: On 06/10/2011 03:13 AM, Markus Armbruster wrote: Jan Kiszkawrites: Resource management, e.g. IRQs. That will be useful for other types of buses as well. A device should be able to say "I need to

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

2011-06-10 Thread Jan Kiszka
On 2011-06-10 15:10, Peter Maydell wrote: > On 10 June 2011 13:51, Anthony Liguori wrote: >> On 06/10/2011 03:13 AM, Markus Armbruster wrote: >>> >>> Jan Kiszka writes: Resource management, e.g. IRQs. That will be useful for other types of buses as well. >>> >>> A device should be

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

2011-06-10 Thread Peter Maydell
On 10 June 2011 14:43, Jan Kiszka wrote: > On 2011-06-10 15:10, Peter Maydell wrote: >> This makes the wiring of this signal look like a property of the >> isa-serial device, which is a bit odd, since it's just as much >> a property of the piix3. Actually it's neither, it's a property >> of the ma

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

2011-06-10 Thread Peter Maydell
On 10 June 2011 13:51, Anthony Liguori wrote: > On 06/10/2011 03:13 AM, Markus Armbruster wrote: >> >> Jan Kiszka  writes: >>> >>> Resource management, e.g. IRQs. That will be useful for other types of >>> buses as well. >> >> A device should be able to say "I need to be connected to an IRQ line".

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

2011-06-10 Thread Anthony Liguori
On 06/10/2011 03:13 AM, Markus Armbruster wrote: Jan Kiszka writes: Resource management, e.g. IRQs. That will be useful for other types of buses as well. A device should be able to say "I need to be connected to an IRQ line". Feels generic to me. More specifically, a device has input IRQs.

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

2011-06-10 Thread Markus Armbruster
Jan Kiszka writes: > On 2011-06-09 18:40, Markus Armbruster wrote: >> Jan Kiszka writes: >> >>> On 2011-06-08 13:33, Peter Maydell wrote: At the moment you can't really implement one sysbus device by saying that it's composed of a set of other sysbus devices. This patch adds new

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

2011-06-09 Thread Jan Kiszka
On 2011-06-09 18:40, Markus Armbruster wrote: > Jan Kiszka writes: > >> On 2011-06-08 13:33, Peter Maydell wrote: >>> At the moment you can't really implement one sysbus device by saying >>> that it's composed of a set of other sysbus devices. This patch adds >>> new functions sysbus_pass_mmio()

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

2011-06-09 Thread Markus Armbruster
Jan Kiszka writes: > On 2011-06-08 13:33, Peter Maydell wrote: >> At the moment you can't really implement one sysbus device by saying >> that it's composed of a set of other sysbus devices. This patch adds >> new functions sysbus_pass_mmio() and sysbus_pass_one_irq() which >> allow a sysbus devi

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

2011-06-08 Thread Jan Kiszka
On 2011-06-08 13:33, Peter Maydell wrote: > At the moment you can't really implement one sysbus device by saying > that it's composed of a set of other sysbus devices. This patch adds > new functions sysbus_pass_mmio() and sysbus_pass_one_irq() which > allow a sysbus device to delegate an MMIO or I

[Qemu-devel] [PATCH RFC 0/3] basic support for composing sysbus devices

2011-06-08 Thread Peter Maydell
At the moment you can't really implement one sysbus device by saying that it's composed of a set of other sysbus devices. This patch adds new functions sysbus_pass_mmio() and sysbus_pass_one_irq() which allow a sysbus device to delegate an MMIO or IRQ to another sysbus device (The approach is inspi