From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tta1E-0001zJ-Nv for qemu-devel@nongnu.org; Fri, 11 Jan 2013 03:31:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tta18-000168-0u for qemu-devel@nongnu.org; Fri, 11 Jan 2013 03:31:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:24314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tta17-00015w-Ov for qemu-devel@nongnu.org; Fri, 11 Jan 2013 03:31:09 -0500 Date: Fri, 11 Jan 2013 08:38:47 +0100 From: Stefan Hajnoczi Message-ID: <20130111073847.GA21982@stefanha-thinkpad> References: <1355918961-3817-1-git-send-email-julien.grall@citrix.com> <20130110160203.GA12161@stefanha-thinkpad.redhat.com> <50EEF3A9.4050909@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <50EEF3A9.4050909@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Bug 108996 V2] hw/dma.c: Fix converting of ioport_register* to MemoryRegion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: kwolf@redhat.com, gson@gson.org, 1089996@bugs.launchpad.net, Stefan Hajnoczi , mtosatti@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, Julien Grall , hpoussin@reactos.org On Thu, Jan 10, 2013 at 06:00:25PM +0100, Andreas F=E4rber wrote: > 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-s= hift for > >> some offset in dma emulation. > >> > >> Before the previous commit, which converted ioport_register_* to Mem= oryRegion, > >> the DMA controller registered 8 ioports with the following formula: > >> base + ((8 + i) << d->shift) where 0 <=3D 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: 1089996@bugs.launchpad.net > >> Reviewed-by: Andreas F=E4rber > >> Reported-by: Andreas Gustafsson > >> Signed-off-by: Julien Grall > >> --- > >> > >> Modification between V1 and V2: > >> * Modify the commit message to explain the problem. > >> > >> hw/dma.c | 22 +++++++++++----------- > >> 1 file changed, 11 insertions(+), 11 deletions(-) > >=20 > > This patch resolves "dma: unknown iport 0" warnings for my Windows 8 = guest. > >=20 > > Tested-by: Stefan Hajnoczi >=20 > If you don't want to queue it for the trivial tree, I'll queue it > together with Herv=E9's conversions. Thanks, please queue it in your tree. Stefan