From: Tom Rotenberg Subject: Re: Question about the dynamic sizing of the PCI hole Date: Mon, 25 May 2009 12:24:42 +0300 Message-ID: <8686c3cd0905250224k320537b3s3b9cbcc0fd3ce51@mail.gmail.com> References: <8686c3cd0905250201u5eb546a5n35b7600e4b264feb@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0286217349==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --===============0286217349== Content-Type: multipart/alternative; boundary=0016e6476ad224379b046ab92e67 --0016e6476ad224379b046ab92e67 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit And, won't we have any problem if we dynamically size the PCI hole, and not update it in the DSDT we give for the HVM (in the DSDT it's always 0xf0000...)? 2009/5/25 Keir Fraser > On 25/05/2009 10:01, "Tom Rotenberg" 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 > > > --0016e6476ad224379b046ab92e67 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
And, won't we have any problem if we dynamically size = the PCI hole, and not update it in the DSDT we give for the HVM (in the DSD= T it's always 0xf0000...)?

2009/5/25 = Keir Fraser <keir.fraser@eu.citrix.com>
<= div class=3D"h5">On 25/05/2009 10:01, "Tom Rotenberg" <tom.rotenberg@gmail.com> wrote:<= br>
> 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 dynamica= lly 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)) &&
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ((pci_mem_start << 1) !=3D 0) = )
> =A0=A0=A0=A0=A0=A0=A0 pci_mem_start <<=3D 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 de= creased
> (so the PCI hole will be enlarged). So, shouldn't it be: "pci= _mem_start >> =3D
> 1" ?

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

=A0-- Keir


--0016e6476ad224379b046ab92e67-- --===============0286217349== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0286217349==--