[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/38] tests/libqos/pci-pc: Fix qpci_pc_iomap()
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 04/38] tests/libqos/pci-pc: Fix qpci_pc_iomap() to map BARs aligned |
Date: |
Tue, 01 Mar 2016 13:05:42 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Marc-André Lureau <address@hidden> writes:
> On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster <address@hidden> wrote:
>> 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 <address@hidden>
>
> Reviewed-by: Marc-André Lureau <address@hidden>
>
> 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!