qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Bug 108996 V2] hw/dma.c: Fix converting of ioport_regi


From: Andreas Färber
Subject: Re: [Qemu-devel] [Bug 108996 V2] hw/dma.c: Fix converting of ioport_register* to MemoryRegion
Date: Thu, 10 Jan 2013 18:00:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Am 10.01.2013 17:02, schrieb Stefan Hajnoczi:
> On Wed, Dec 19, 2012 at 12:09:21PM +0000, Julien Grall wrote:
>> The commit 582299336879504353e60c7937fbc70fea93f3da introduced a 1-shift for
>> some offset in dma emulation.
>>
>> Before the previous commit, which converted ioport_register_* to 
>> MemoryRegion,
>> the DMA controller registered 8 ioports with the following formula:
>> base + ((8 + i) << d->shift) where 0 <= i < 8
>> When an IO occured within a Memory Region, DMA callback receives an offset
>> relative to the started address. Here the started address is:
>> base + (8 << d->shift).
>> The offset should be: (i << d->shift). After the shift is reverted, the 
>> offset
>> are 0..7 not 1..8.
>>
>> Cc: address@hidden
>> Reviewed-by: Andreas Färber <address@hidden>
>> Reported-by: Andreas Gustafsson <address@hidden>
>> Signed-off-by: Julien Grall <address@hidden>
>> ---
>>
>>  Modification between V1 and V2:
>>    * Modify the commit message to explain the problem.
>>
>>  hw/dma.c |   22 +++++++++++-----------
>>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> This patch resolves "dma: unknown iport 0" warnings for my Windows 8 guest.
> 
> Tested-by: Stefan Hajnoczi <address@hidden>

If you don't want to queue it for the trivial tree, I'll queue it
together with Hervé's conversions.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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