qemu-devel
[Top][All Lists]
Advanced

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

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


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] dma: Define dma_context_memory and use in sysbus-ohci
Date: Sun, 18 Nov 2012 18:53:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1

On 11/13/2012 01:44 PM, Peter Maydell wrote:
> On 26 October 2012 17:00, Peter Maydell <address@hidden> wrote:
>> On 26 October 2012 14:09, Paolo Bonzini <address@hidden> 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.
>>
>> Personally I think it's better not to permit NULL DMAContexts or
>> AddressSpaces here, because they're kind of a hack (in the same way
>> that the "system address space" is kind of a hack). In real hardware
>> you probably aren't really doing dma to that address space but to
>> some more local bus. dma_context_memory/address_space_memory are
>> nice and easy to search for, whereas NULL isn't. [And in general
>> I think NULL is too easy to use; if you have to go looking for the
>> system dma context you've been prompted to think about whether
>> that's the right one...]
> 
> 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 agree with you here.  Callers should be fixed to supply the proper
AddressSpace.


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



reply via email to

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