From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v1] hvmloader, pci: Don't try to relocate memory if 64-bit BAR is bigger than 4GB
Date: Wed, 28 Sep 2016 15:23:47 -0400 [thread overview]
Message-ID: <CACJDEmqy1OGAee8jxPsQX+u-JBWsOeOZ9decWZB2CwOW__BmOQ@mail.gmail.com> (raw)
In-Reply-To: <577E341802000078000FC03C@prv-mh.provo.novell.com>
.. snip..
>> + {
>> + /* If bigger than 4GB, don't try to put under 4GB. */
>> + if ( is_64bar && bar_sz > (1ull<<32) )
>
> Clearly at the very least this should be >=. However, even when
> it's a 2Gb BAR, we won't be able to fit it (as it can't go at address
> zero, nor at address 0x80000000, both for different reasons).
<brushes off an old email>
The reason 2GB is also problematic is that we still have other things
that need to live under 4GB region: ACPI, APIC, and BAR of the PCI
platform device (16MB), VGA emulated device (32MB).
mmio_total counts all of those up, and the emulated devices are
enumerated before the passthrough devices - so I can do:
if ( is_64bar && bar_sz > (GB(2) - mmio_total - HVM_BELOW_4G_MMIO_LENGTH) )
or such?
Let me prep a patch to this effect and also another prereq that adds
MB(x) and GB(x) macros.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-09-28 19:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 18:16 [PATCH v1] hvmloader, pci: Don't try to relocate memory if 64-bit BAR is bigger than 4GB Konrad Rzeszutek Wilk
2016-07-07 8:51 ` Jan Beulich
2016-07-07 15:27 ` Konrad Rzeszutek Wilk
2016-07-07 15:53 ` Jan Beulich
2016-09-28 19:23 ` Konrad Rzeszutek Wilk [this message]
2016-09-29 6:08 ` Jan Beulich
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=CACJDEmqy1OGAee8jxPsQX+u-JBWsOeOZ9decWZB2CwOW__BmOQ@mail.gmail.com \
--to=konrad@kernel.org \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=xen-devel@lists.xenproject.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).