From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4Ucc-0004kw-P1 for qemu-devel@nongnu.org; Mon, 05 Mar 2012 04:54:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4UcU-0005he-Nc for qemu-devel@nongnu.org; Mon, 05 Mar 2012 04:54:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4UcU-0005hC-FA for qemu-devel@nongnu.org; Mon, 05 Mar 2012 04:54:18 -0500 Message-ID: <4F548D15.5000609@redhat.com> Date: Mon, 05 Mar 2012 10:53:25 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <1330581043.29508.61.camel@nzhmlwks0057.ad.endace.com> <20120304194030.GJ29291@morn.localdomain> In-Reply-To: <20120304194030.GJ29291@morn.localdomain> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [SeaBIOS] [Seabios] [PATCH 0/6] 64bit PCI BARs allocations (take 2) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: mst@redhat.com, sfd@endace.com, seabios@seabios.org, qemu-devel@nongnu.org, avi@redhat.com, Alexey Korolev Hi, > Hrmm. By my count, this would be the third "rewrite" of the PCI bar > initialization in the last 14 months. Indeed. > Given the churn in this area, I don't want to commit patches that do > wholesale code replacement. I'd prefer to see each patch > independently add some functionality and perform its related cleanup. Hardly doable, the algorithms are very different. > Also, since Gerd has some patches pending in this area, we should > figure out which direction makes sense. Can you explain on how this > 64bit support is different from the support proposed by Gerd? My code keeps all state needed to do the pci bar allocation in the pci_bus struct. It counts how many bars of each type+size it has, then uses this for the allocation. It doesn't need per-device state. The logic is a bit twisted because of that. Main reason for this is that I wrote it before "struct pci_device" showed up in seabios (although the merge was afterwards). Alexey's code takes a very different route: It uses pci_device data structure instead and organizes the pci bars in per-region lists. It makes sense to do that, I think that version is easier to understand when you look at it the first time. Both approaches will work fine in the end. I don't care much, I just want something that works. It's probably a bit risky to merge Alexey's version before the planned mid-march release. cheers, Gerd