From: Laszlo Ersek <lersek@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] piix: fix 32bit pci hole
Date: Tue, 26 Nov 2013 22:33:12 +0100 [thread overview]
Message-ID: <52951398.3010206@redhat.com> (raw)
In-Reply-To: <1385482583-23122-1-git-send-email-kraxel@redhat.com>
On 11/26/13 17:16, Gerd Hoffmann wrote:
> Make the 32bit pci hole start at end of ram, so all possible address
> space is covered. Of course the firmware can use less than that.
> Leaving space unused is no problem, mapping pci bars outside the
> hole causes problems though.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/pci-host/piix.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
> index edc974e..1414a2b 100644
> --- a/hw/pci-host/piix.c
> +++ b/hw/pci-host/piix.c
> @@ -345,15 +345,7 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state,
> f->ram_memory = ram_memory;
>
> i440fx = I440FX_PCI_HOST_BRIDGE(dev);
> - /* Set PCI window size the way seabios has always done it. */
> - /* Power of 2 so bios can cover it with a single MTRR */
> - if (ram_size <= 0x80000000) {
> - i440fx->pci_info.w32.begin = 0x80000000;
> - } else if (ram_size <= 0xc0000000) {
> - i440fx->pci_info.w32.begin = 0xc0000000;
> - } else {
> - i440fx->pci_info.w32.begin = 0xe0000000;
> - }
> + i440fx->pci_info.w32.begin = ram_size;
>
> memory_region_init_alias(&f->pci_hole, OBJECT(d), "pci-hole", f->pci_address_space,
> pci_hole_start, pci_hole_size);
>
You've convinced me in the other thread that we can lower w32.begin as
far as we want, as long as it doesn't end up below the top of RAM.
But this patch also obliterates the high bound, 0xe0000000, which can
lead to:
- w32.end - w32.begin <= 512M, or
- a special case of the former, w32.end < w32.begin.
w32.end is set to IO_APIC_DEFAULT_ADDRESS==0xfec00000. (Which is BTW
fine for OVMF too.) What will happen in a 6G guest, for example?
Thanks,
Laszlo
next prev parent reply other threads:[~2013-11-26 21:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-26 16:16 [Qemu-devel] [PATCH] piix: fix 32bit pci hole Gerd Hoffmann
2013-11-26 21:33 ` Laszlo Ersek [this message]
2013-11-27 6:46 ` Gerd Hoffmann
2013-11-27 11:48 ` Laszlo Ersek
2013-11-26 23:36 ` Jordan Justen
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=52951398.3010206@redhat.com \
--to=lersek@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).