Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-13 Thread Paul Brook
I think we could solve all problems (well, maybe not world peace, yet) by switching to message based system for all of DMA and IRQs. Each device would have a message input port and way to output messages. Examples: Zero copy memory access from device D1 to D2 to host memory (D3) with

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-13 Thread Paul Brook
TBH I preferred the original system whereby the source can query the state of the sink (i.e are you ignoring this line?). Note that conceptually this should be *querying* state, not responding to an event. People are still pushing qemu_irq as an message passing interface, so I'm going to

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-13 Thread Blue Swirl
On Sun, Jun 13, 2010 at 4:34 PM, Paul Brook p...@codesourcery.com wrote: TBH I preferred the original system whereby the source can query the state of the sink (i.e are you ignoring this line?).  Note that conceptually this should be *querying* state, not responding to an event. People are

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-13 Thread Blue Swirl
On Sun, Jun 13, 2010 at 3:49 PM, Paul Brook p...@codesourcery.com wrote: I think we could solve all problems (well, maybe not world peace, yet) by switching to message based system for all of DMA and IRQs. Each device would have a message input port and way to output messages. Examples:

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-13 Thread Blue Swirl
On Sun, Jun 13, 2010 at 6:39 PM, Paul Brook p...@codesourcery.com wrote: On Sun, Jun 13, 2010 at 3:49 PM, Paul Brook p...@codesourcery.com wrote: I think we could solve all problems (well, maybe not world peace, yet) by switching to message based system for all of DMA and IRQs. Each

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-13 Thread Paul Brook
For the memory access case, in practice the interface could be sysbus_memory_rw(DeviceState *parent, target_phys_addr_t addr, target_phys_addr_t size) Why parent? Parent device or bus host bridge device. Alternatively there could be a bus handle. A device has no way of knowing

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-13 Thread Gleb Natapov
On Sun, Jun 13, 2010 at 05:34:24PM +0100, Paul Brook wrote: TBH I preferred the original system whereby the source can query the state of the sink (i.e are you ignoring this line?). Note that conceptually this should be *querying* state, not responding to an event. People are still

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Paul Brook
This patch allows to optionally attach a message to an IRQ event. The message can contain a payload reference and a callback that the IRQ handler may invoke to report the delivery result. The former can be used to model message signaling interrupts, the latter to cleanly implement IRQ

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Jan Kiszka
Paul Brook wrote: This patch allows to optionally attach a message to an IRQ event. The message can contain a payload reference and a callback that the IRQ handler may invoke to report the delivery result. The former can be used to model message signaling interrupts, the latter to cleanly

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Blue Swirl
On Sat, Jun 12, 2010 at 12:21 PM, Paul Brook p...@codesourcery.com wrote: This patch allows to optionally attach a message to an IRQ event. The message can contain a payload reference and a callback that the IRQ handler may invoke to report the delivery result. The former can be used to model

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Paul Brook
On Sat, Jun 12, 2010 at 12:21 PM, Paul Brook p...@codesourcery.com wrote: This patch allows to optionally attach a message to an IRQ event. The message can contain a payload reference and a callback that the IRQ handler may invoke to report the delivery result. The former can be used to

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Blue Swirl
On Sat, Jun 12, 2010 at 2:15 PM, Paul Brook p...@codesourcery.com wrote: On Sat, Jun 12, 2010 at 12:21 PM, Paul Brook p...@codesourcery.com wrote: This patch allows to optionally attach a message to an IRQ event. The message can contain a payload reference and a callback that the IRQ

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Paul Brook
I think message passing interrupts are only used in bus based systems, like PCI or UPA/JBUS etc. I don't know how LAPIC/IOAPIC bus works, it could be similar. PCI Message Signalled Interrupts use a regular data write, and we model it exactly that way. Under normal circumstances you program

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Blue Swirl
On Sat, Jun 12, 2010 at 3:58 PM, Paul Brook p...@codesourcery.com wrote: I think message passing interrupts are only used in bus based systems, like PCI or UPA/JBUS etc. I don't know how LAPIC/IOAPIC bus works, it could be similar. PCI Message Signalled Interrupts use a regular data write,

Re: [Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-12 Thread Paul Brook
[*] A simple unidirectional dma request line is suitable for qmu_irq. A DMA system that transfers data outside of memory read/write transactions is not. e.g. ISA effectively defines a regular memory bus plus 8 bidirectional data streams (aka DMA channels). These are multiplexed over the

[Qemu-devel] [PATCH 09/16] Enable message delivery via IRQs

2010-06-06 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com This patch allows to optionally attach a message to an IRQ event. The message can contain a payload reference and a callback that the IRQ handler may invoke to report the delivery result. The former can be used to model message signaling interrupts, the