Received: from eggs.gnu.org ([2001:4830:134:3::10]:37697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaj3l-0000b6-Dc for qemu-devel@nongnu.org; Tue, 01 Mar 2016 07:05:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaj3h-0004GX-6z for qemu-devel@nongnu.org; Tue, 01 Mar 2016 07:05:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaj3h-0004GS-2I for qemu-devel@nongnu.org; Tue, 01 Mar 2016 07:05:45 -0500 From: Markus Armbruster References: <1456771254-17511-1-git-send-email-armbru@redhat.com> <1456771254-17511-5-git-send-email-armbru@redhat.com> Date: Tue, 01 Mar 2016 13:05:42 +0100 In-Reply-To: (=?utf-8?Q?=22Marc-Andr=C3=A9?= Lureau"'s message of "Tue, 1 Mar 2016 12:05:03 +0100") Message-ID: <87wppmjtd5.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 04/38] tests/libqos/pci-pc: Fix qpci_pc_iomap() to map BARs aligned List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: Paolo Bonzini , cam , Claudio Fontana , QEMU , David Marchand Marc-Andr=C3=A9 Lureau writes: > On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster wr= ote: >> qpci_pc_iomap() maps BARs one after the other, without padding. This >> is wrong. PCI Local Bus Specification Revision 3.0, 6.2.5.1. Address >> Maps: "all address spaces used are a power of two in size and are >> naturally aligned". That's because the size of a BAR is given by the >> number of address bits the device decodes, and the BAR needs to be >> mapped at a multiple of that size to ensure the address decoding >> works. >> >> Fix qpci_pc_iomap() accordingly. This takes care of a FIXME in >> ivshmem-test. >> >> Signed-off-by: Markus Armbruster > > Reviewed-by: Marc-Andr=C3=A9 Lureau > > Neat, thanks for fixing my fixme ;) You're welcome :) Of course, I found it the hard way regardless. I experimented with new tests, and suddenly *nothing* worked anymore. WTF?!? After "some" debugging, I notced a BAR mapped at a funny address... what happens if I align it properly? Everything works, that's what happens. And then I remembered your FIXME. Thanks!