From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Tom Rotenberg <tom.rotenberg@gmail.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Question about the dynamic sizing of the PCI hole
Date: Mon, 25 May 2009 10:14:14 +0100 [thread overview]
Message-ID: <C6401FF6.BB9B%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <8686c3cd0905250201u5eb546a5n35b7600e4b264feb@mail.gmail.com>
On 25/05/2009 10:01, "Tom Rotenberg" <tom.rotenberg@gmail.com> 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
next prev parent reply other threads:[~2009-05-25 9:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 9:01 Question about the dynamic sizing of the PCI hole Tom Rotenberg
2009-05-25 9:14 ` Keir Fraser [this message]
2009-05-25 9:24 ` Tom Rotenberg
2009-05-25 9:42 ` Keir Fraser
2009-05-25 9:48 ` Tom Rotenberg
2009-05-25 11:24 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C6401FF6.BB9B%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=tom.rotenberg@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.