qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] RFC: hcd-ohci: add dma error handling


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH] RFC: hcd-ohci: add dma error handling
Date: Wed, 17 Jul 2013 14:31:13 +0200

On 17.07.2013, at 13:15, Benjamin Herrenschmidt wrote:

> On Wed, 2013-07-17 at 19:46 +1000, Alexey Kardashevskiy wrote:
>> Current hcd-ohci does not handle DMA errors which can actually
>> happen.
>> 
>> However it is not clear what approach should be used here -
>> for example, get_dwords returns positive number saying that there
>> is no error as all the callers consider the return value as fail
>> if it is less than zero. Normally you would expect bool=true/int=0
>> as success and bool=false/int=-1 as fail.
>> 
>> Any suggestion?
> 
> The right thing to do is not only to bring the error up the stack, but
> essentially to set the error bits in the PCI command status and put the
> whole HCI in error state (and stop operating)
> 
> That how real HW reacts.

Who does that? I always assumed it's the IOMMU that kills the device when it 
accesses regions it's not allowed to access. On real hardware, memory transfers 
don't have error return codes, do they?


Alex




reply via email to

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