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

Re: [Xen-devel] [PATCH v2 4/5] hvmloader: Fix check for needing a 64-bit bar



>>> On 18.06.13 at 18:46, George Dunlap <george.dunlap@xxxxxxxxxxxxx> 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.

This does change functionality, but in a desirable way: With what
the code did before, even if pci_mem_start remained at its start
value, bar64_relocate would end up getting set to 1, while it would
be left at 0 when pci_mem_start got lowered down to 2Gb. I.e. it
seems to me that the original condition was inverted.

> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

With the above I even think this is a backporting candidate
(irrespective of eventual considerations of this kind for the full
series).

Jan

> CC: Ian Jackson <ian.jackson@xxxxxxxxxx>
> CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
> CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> CC: Hanweidong <hanweidong@xxxxxxxxxx>
> ---
>  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
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx 
> http://lists.xen.org/xen-devel 




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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