From: Stefano Stabellini Subject: Re: [PATCH v2 4/5] hvmloader: Fix check for needing a 64-bit bar Date: Wed, 19 Jun 2013 18:18:38 +0100 Message-ID: References: <1371573984-28514-1-git-send-email-george.dunlap@eu.citrix.com> <1371573984-28514-4-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1371573984-28514-4-git-send-email-george.dunlap@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Ian Jackson , Hanweidong , Stefano Stabellini , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 18 Jun 2013, George Dunlap wrote: > After attempting to resize the MMIO hole, the check to determine > whether there is a need to relocate BARs into 64-bit space checks the > specific thing that caused the loop to exit (MMIO hole == 2GiB) rather > than checking whether the required MMIO will fit in the hole. > > This should have no functional change now, but will make the next patch > (when we add more conditions for exiting the loop) more clean. > > Signed-off-by: George Dunlap > CC: Ian Jackson > CC: Ian Campbell > CC: Stefano Stabellini > CC: Hanweidong Acked-by: Stefano Stabellini > tools/firmware/hvmloader/pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/firmware/hvmloader/pci.c b/tools/firmware/hvmloader/pci.c > index a483b02..63d79a2 100644 > --- a/tools/firmware/hvmloader/pci.c > +++ b/tools/firmware/hvmloader/pci.c > @@ -213,7 +213,7 @@ void pci_setup(void) > ((pci_mem_start << 1) != 0) ) > pci_mem_start <<= 1; > > - if ( (pci_mem_start << 1) != 0 ) > + if ( mmio_total > (pci_mem_end - pci_mem_start) ) > bar64_relocate = 1; > > /* Relocate RAM that overlaps PCI space (in 64k-page chunks). */ > -- > 1.7.9.5 >