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

Re: [Xen-devel] [PATCH v3 2/8] hvmloader: Make the printfs more informative



On Thu, 20 Jun 2013, George Dunlap wrote:
> * Warn that you're relocating some BARs to 64-bit
> 
> * Warn that you're relocating guest pages, and how many
> 
> * Include upper 32-bits of the base register when printing the bar
>   placement info
> 
> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
> CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
> CC: Ian Jackson <ian.jackson@xxxxxxxxxx>
> CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> CC: Hanweidong <hanweidong@xxxxxxxxxx>
> CC: Keir Fraser <keir@xxxxxxx>
> ---
>  tools/firmware/hvmloader/pci.c |   13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/firmware/hvmloader/pci.c b/tools/firmware/hvmloader/pci.c
> index aa54bc1..d8592b0 100644
> --- a/tools/firmware/hvmloader/pci.c
> +++ b/tools/firmware/hvmloader/pci.c
> @@ -213,10 +213,17 @@ void pci_setup(void)
>              ((pci_mem_start << 1) != 0) )
>          pci_mem_start <<= 1;
>  
> -    if ( (pci_mem_start << 1) != 0 )
> +    if ( (pci_mem_start << 1) != 0 ) {
> +        printf("Low MMIO hole not large enough for all devices,"
> +               " relocating some BARs to 64-bit\n");
>          bar64_relocate = 1;
> +    }
>  
>      /* Relocate RAM that overlaps PCI space (in 64k-page chunks). */
> +    if ( (pci_mem_start >> PAGE_SHIFT) < hvm_info->low_mem_pgend )
> +        printf("Relocating 0x%lx pages to highmem for lowmem MMIO hole\n",
> +               hvm_info->low_mem_pgend - (pci_mem_start >> PAGE_SHIFT));

Shouldn't this be:

min_t(unsigned int,
      hvm_info->low_mem_pgend - (pci_mem_start >> PAGE_SHIFT),
      (1u << 16) - 1);

to match exactly what we do in the relocation code?

Regarding the message, what about:

printf("Relocating 0x%lx pages from 0x%lx to 0x%lx%lx to make room for a larger 
MMIO hole\n",
       min_t(unsigned int,
             hvm_info->low_mem_pgend - (pci_mem_start >> PAGE_SHIFT),
             (1u << 16) - 1),
        hvm_info->low_mem_pgend,
        hvm_info->high_mem_pgend);

_______________________________________________
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®.