aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware
diff options
context:
space:
mode:
authorGeorge Dunlap <george.dunlap@eu.citrix.com>2013-06-18 12:48:36 +0100
committerIan Jackson <Ian.Jackson@eu.citrix.com>2013-06-24 12:20:29 +0100
commit3458ab670f3043100f2c0ae5634c44226eb3d2ca (patch)
treead12b4d134d7a8cdf2f34c9f8541a5f233f3ae23 /tools/firmware
parent42d075411bc68effe8c75dca27447ba7c72da208 (diff)
downloadxen-3458ab670f3043100f2c0ae5634c44226eb3d2ca.tar.gz
xen-3458ab670f3043100f2c0ae5634c44226eb3d2ca.tar.bz2
xen-3458ab670f3043100f2c0ae5634c44226eb3d2ca.zip
hvmloader: Fix check for needing a 64-bit bar
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. But even then it does it wrong: the polarity of the check is backwards. Check for the actual condition we care about (the sizeof the MMIO hole) rather than checking for the loop exit condition. v3: - Move earlier in the series, before other functional changes Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> CC: Ian Jackson <ian.jackson@citrix.com> CC: Ian Campbell <ian.campbell@citrix.com> CC: Stefano Stabellini <stefano.stabellini@citrix.com> CC: Hanweidong <hanweidong@huawei.com> CC: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools/firmware')
-rw-r--r--tools/firmware/hvmloader/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/firmware/hvmloader/pci.c b/tools/firmware/hvmloader/pci.c
index a3d03ed40c..6792ed47a4 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) )
{
printf("Low MMIO hole not large enough for all devices,"
" relocating some BARs to 64-bit\n");