[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] hvmloader: Fix check for needing a 64-bit bar



commit 3458ab670f3043100f2c0ae5634c44226eb3d2ca
Author:     George Dunlap <george.dunlap@xxxxxxxxxxxxx>
AuthorDate: Tue Jun 18 12:48:36 2013 +0100
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Mon Jun 24 12:20:29 2013 +0100

    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@xxxxxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    CC: Ian Jackson <ian.jackson@xxxxxxxxxx>
    CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
    CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
    CC: Hanweidong <hanweidong@xxxxxxxxxx>
    CC: Keir Fraser <keir@xxxxxxx>
---
 tools/firmware/hvmloader/pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/firmware/hvmloader/pci.c b/tools/firmware/hvmloader/pci.c
index a3d03ed..6792ed4 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");
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.