From: Igor Mammedov <imammedo@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: pbonzini@redhat.com, kevin@koconnor.net, seabios@seabios.org,
qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] map 64-bit PCI BARs at location provided by emulator
Date: Fri, 11 Oct 2013 15:53:02 +0200 [thread overview]
Message-ID: <20131011155302.067df549@nial.usersys.redhat.com> (raw)
In-Reply-To: <1381494950.23065.12.camel@nilsson.home.kraxel.org>
On Fri, 11 Oct 2013 14:35:50 +0200
Gerd Hoffmann <kraxel@redhat.com> wrote:
> On Fr, 2013-10-11 at 12:19 +0200, Igor Mammedov wrote:
> > Currently 64-bit PCI BARs are unconditionally mapped by BIOS right
> > over 4G + RamSizeOver4G location, which doesn't allow to reserve
> > extra space before 64-bit PCI window. For memory hotplug an extra
> > RAM space might be reserved after present 64-bit RAM end and BIOS
> > should map 64-bit PCI BARs after it.
> >
> > Introduce "etc/pcimem64-start" romfile to provide BIOS a hint
> > where it should start mapping of 64-bit PCI BARs. If romfile is
> > missing BIOS reverts to legacy behavior and starts mapping right
> > after high memory.
>
> Looks good overall.
>
>
> > struct pci_region r64_mem, r64_pref;
> > + u64 base64 = le64_to_cpu(romfile_loadint("etc/pcimem64-start",
> > + 0x100000000ULL + RamSizeOver4G));
>
> Should we sanity-check base64 maybe?
> Make sure it isn't smaller than 0x100000000ULL + RamSizeOver4G?
If it would be less than 0x100000000ULL + RamSizeOver4G then it would mean
that QEMU for some reason decided to overshadow present RAM with PCI hole.
It would add a couple of extra bytes to BIOS and point where it should fail
or at least print a warning that nobody will read at runtime.
I think it's better to assert on QEMU side and abort even before guest
started if it's considered as error.
>
> cheers,
> Gerd
>
>
>
next prev parent reply other threads:[~2013-10-11 13:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 10:19 [Qemu-devel] [PATCH] map 64-bit PCI BARs at location provided by emulator Igor Mammedov
2013-10-11 12:35 ` Gerd Hoffmann
2013-10-11 13:53 ` Igor Mammedov [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-10-15 12:31 Igor Mammedov
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=20131011155302.067df549@nial.usersys.redhat.com \
--to=imammedo@redhat.com \
--cc=kevin@koconnor.net \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.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).