Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-11-18 Thread Avi Kivity
On 11/13/2012 01:44 PM, Peter Maydell wrote: > On 26 October 2012 17:00, Peter Maydell wrote: >> On 26 October 2012 14:09, Paolo Bonzini wrote: >>> As soon as Avi's iommu patches go in, in fact, dma->as will just be as. >>> Even if as == NULL were to be outlawed and you'd be forced to write >>> g

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-11-13 Thread Paolo Bonzini
Il 13/11/2012 16:21, Gerd Hoffmann ha scritto: >>> >> Ping! Can we have a ruling on what the right fix for this is so >>> >> we can fix these segfaults before 1.3 release, please? >> > >> > I think this patch is already in Gerd's queue. > It isn't. It used to be in the usb queue, but after the de

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-11-13 Thread Gerd Hoffmann
Hi, >> Ping! Can we have a ruling on what the right fix for this is so >> we can fix these segfaults before 1.3 release, please? > > I think this patch is already in Gerd's queue. It isn't. It used to be in the usb queue, but after the debate how to fix this property restarted I've dropped it

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-11-13 Thread Paolo Bonzini
Il 13/11/2012 12:44, Peter Maydell ha scritto: >>> >> As soon as Avi's iommu patches go in, in fact, dma->as will just be as. >>> >> Even if as == NULL were to be outlawed and you'd be forced to write >>> >> get_address_space_memory(), taking the pain to create dummy DMAContexts >>> >> now is just

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-11-13 Thread Peter Maydell
On 26 October 2012 17:00, Peter Maydell wrote: > On 26 October 2012 14:09, Paolo Bonzini wrote: >> As soon as Avi's iommu patches go in, in fact, dma->as will just be as. >> Even if as == NULL were to be outlawed and you'd be forced to write >> get_address_space_memory(), taking the pain to creat

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-26 Thread Peter Maydell
On 26 October 2012 14:09, Paolo Bonzini wrote: > As soon as Avi's iommu patches go in, in fact, dma->as will just be as. > Even if as == NULL were to be outlawed and you'd be forced to write > get_address_space_memory(), taking the pain to create dummy DMAContexts > now is just not worth it. Pers

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-26 Thread Paolo Bonzini
Il 26/10/2012 05:58, David Gibson ha scritto: >> > static inline int dma_memory_rw_relaxed(DMAContext *dma, dma_addr_t addr, >> > void *buf, dma_addr_t len, >> > DMADirection dir) >> > { >> > if (!dma_has_iommu(dma)

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-25 Thread David Gibson
On Fri, Oct 26, 2012 at 12:53:27PM +1000, Peter Crosthwaite wrote: > On Fri, Oct 26, 2012 at 10:48 AM, David Gibson > wrote: > > On Thu, Oct 25, 2012 at 08:33:13PM +1000, Peter Crosthwaite wrote: > >> On Oct 24, 2012 3:27 AM, "Peter Maydell" wrote: > >> > > >> > Define a new global dma_context_me

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-25 Thread Peter Crosthwaite
On Fri, Oct 26, 2012 at 10:48 AM, David Gibson wrote: > On Thu, Oct 25, 2012 at 08:33:13PM +1000, Peter Crosthwaite wrote: >> On Oct 24, 2012 3:27 AM, "Peter Maydell" wrote: >> > >> > Define a new global dma_context_memory which is a DMAContext corresponding >> > to the global address_space_memor

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-25 Thread David Gibson
On Thu, Oct 25, 2012 at 08:33:13PM +1000, Peter Crosthwaite wrote: > On Oct 24, 2012 3:27 AM, "Peter Maydell" wrote: > > > > Define a new global dma_context_memory which is a DMAContext corresponding > > to the global address_space_memory AddressSpace. This can be used by > > sysbus peripherals li

Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-25 Thread Peter Crosthwaite
On Oct 24, 2012 3:27 AM, "Peter Maydell" wrote: > > Define a new global dma_context_memory which is a DMAContext corresponding > to the global address_space_memory AddressSpace. This can be used by > sysbus peripherals like sysbus-ohci which need to do DMA. > > In particular, use it in the sysbus-

[Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci

2012-10-23 Thread Peter Maydell
Define a new global dma_context_memory which is a DMAContext corresponding to the global address_space_memory AddressSpace. This can be used by sysbus peripherals like sysbus-ohci which need to do DMA. In particular, use it in the sysbus-ohci device, which fixes a segfault when attempting to use t