WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Question about the dynamic sizing of the PCI hole

To: Tom Rotenberg <tom.rotenberg@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Question about the dynamic sizing of the PCI hole
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Mon, 25 May 2009 10:14:14 +0100
Cc:
Delivery-date: Mon, 25 May 2009 02:14:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <8686c3cd0905250201u5eb546a5n35b7600e4b264feb@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcndF26H7VifTH5lTrmxnKem+TD68AAAb2IG
Thread-topic: [Xen-devel] Question about the dynamic sizing of the PCI hole
User-agent: Microsoft-Entourage/12.17.0.090302
On 25/05/2009 10:01, "Tom Rotenberg" <tom.rotenberg@xxxxxxxxx> wrote:

> I am reviewing the code of the hvmloader from Xen 3.4, and i saw that in
> changeset 19021, there was a patch which added the ability to dynamically size
> the PCI hole. I have seen that this patch calculates the total memory size,
> but i failed to understand the following lines:
> 
> while ( (mmio_total > (pci_mem_end - pci_mem_start)) &&
>             ((pci_mem_start << 1) != 0) )
>         pci_mem_start <<= 1;
> 
> It looks as if the pci mem start will be increased if there isn't enough space
> for the PCI devices, although, as far as i understand, it should be decreased
> (so the PCI hole will be enlarged). So, shouldn't it be: "pci_mem_start >> =
> 1" ?

Leading bits of this 32-bit value are 1s. Hence left shift is what we want.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel