From: Gordan Bobic <gordan@bobich.net>
To: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Andrew Bobulsky <rulerof@gmail.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Bug: Limitation of <=2GB RAM in domU persists with 4.3.0
Date: Wed, 31 Jul 2013 20:35:01 +0100 [thread overview]
Message-ID: <51F966E5.9080006@bobich.net> (raw)
In-Reply-To: <CAFLBxZai8V21658+PC2UfW4HxkviPBbvBhLbp+u8+mE+_Wg2WA@mail.gmail.com>
On 07/31/2013 06:53 PM, George Dunlap wrote:
> On Fri, Jul 26, 2013 at 2:11 PM, Gordan Bobic <gordan@bobich.net> wrote:
>>> Now that is intereting - if this makes the memory holes the same between
>>> the guest and the host, does it also implicitly vBAR=pBAR?
>>
>>
>> Another thing that occurred to me might be useful to check - it is
>> pretty easy to modify the BAR size on Nvidia cards. The defaults are
>> 64MB and 128MB for the two BARs. They can be made much, much larger,
>> and there is often advantage to enlarging them to at least be equal to
>> VRAM size. Soooooo... If I boost the BAR from 128MB to 2GB, being a
>> 64-bit BAR, it might make the BIOS do the sane thing and map it above
>> 4GB. With the other BAR also suitably enlarged and it being done on
>> the second GPU as well, there is no obvious option but to map them
>> above 4GB (unless the BIOS is broken, which it may well be, in
>> which case all bets are off).
>>
>> Which may just alleviate the memory issue if not completely fix
>> the problem.
>>
>> Will try this and see what happens.
>
> I believe XenServer has a patch that allows the toolstack (in this
> case xapi) to set the default size of the MMIO hole. Andrew, did that
> ever make it upstream?
>
> Unfortunately, it is unlikely to work with upstream qemu until we fix
> the memory relocation issue...
Interesting you should mention something like this. I've been pondering
whether it might be easier (even if it is a bodge) to simply always set
the domU E820 map to have 0x80000000 - 0xFFFFFFFF (2GB->4GB) reserved. I
have not yet seen a motherboard that maps 32-bit BARs below 2GB.
Note: Admittedly, I haven't tested what happens when you have multiple
Nvidia cards each with a 1GB 32-bit BAR, though, I fully expect
weirdness. And Nvidia cards have have the 32-bit BAR0 up to 2GB in size!
But I cannot see a good reason to use such a configuration since it's
the 64-bit BAR1 (up to 64GB in size) that provides the direct VRAM mapping.
Anyway, if the whole 2GB->4GB area was reserved, then presumably Xen
would map the 32-bit bars below 2GB, which, provided there's enough
memory for the OS kernel to load and the BARs, shouldn't be a problem (I
cannot think of a sane case where this wouldn't hold). 64-bit BARs can
get re-mapped somewhere sky-high in domU RAM (at the top of the
addressable range sounds like a reasonable bet, BIOS (for non-broken
BIOS implementations, of which there seem to be fewer than I'd like to
believe) would probably set those just above the size of RAM in the
machine, so to 2^48 minus BAR size would possibly be a safe place to map
them.
Yes, I know it's a bodge. Yes, I know it wouldn't solve the GeForce
passthrough problem. Yes, host E820 with vBAR = pBAR (possibly without
IOMMU involvement) would be an awesome feature to have. But the bodge of
just punching a 2GB hole at 2GB might just be a lot easier to implement
as a quick fix.
Gordan
next prev parent reply other threads:[~2013-07-31 19:35 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-23 22:34 Bug: Limitation of <=2GB RAM in domU persists with 4.3.0 Gordan Bobic
2013-07-24 14:08 ` Konrad Rzeszutek Wilk
2013-07-24 14:17 ` Gordan Bobic
2013-07-24 16:06 ` Konrad Rzeszutek Wilk
2013-07-24 16:14 ` Gordan Bobic
2013-07-24 16:31 ` Konrad Rzeszutek Wilk
2013-07-24 17:26 ` Gordan Bobic
2013-07-24 22:15 ` Gordan Bobic
2013-07-25 19:18 ` George Dunlap
2013-07-25 21:48 ` Gordan Bobic
2013-07-25 22:23 ` Gordan Bobic
2013-07-26 0:21 ` Ian Campbell
2013-07-26 1:15 ` Andrew Bobulsky
2013-07-26 9:28 ` Gordan Bobic
2013-07-26 13:11 ` Gordan Bobic
2013-07-31 17:53 ` George Dunlap
2013-07-31 17:56 ` Andrew Cooper
2013-07-31 19:36 ` Gordan Bobic
2013-07-31 19:35 ` Gordan Bobic [this message]
2013-08-01 9:15 ` George Dunlap
2013-08-01 13:10 ` Fabio Fantoni
2013-08-02 14:43 ` George Dunlap
2013-07-28 10:26 ` Konrad Rzeszutek Wilk
2013-07-28 21:24 ` Gordan Bobic
2013-07-28 23:17 ` Konrad Rzeszutek Wilk
2013-07-28 23:30 ` Gordan Bobic
2013-07-29 9:53 ` Ian Campbell
2013-07-26 9:23 ` Gordan Bobic
2013-07-29 11:14 ` Ian Campbell
2013-07-29 18:04 ` Konrad Rzeszutek Wilk
2013-09-03 13:53 ` Gordan Bobic
2013-09-03 14:59 ` Konrad Rzeszutek Wilk
2013-09-03 19:47 ` HVM support for e820_host (Was: Bug: Limitation of <=2GB RAM in domU persists with 4.3.0) Gordan Bobic
2013-09-03 20:35 ` Gordan Bobic
2013-09-03 20:49 ` Gordan Bobic
2013-09-03 21:10 ` Konrad Rzeszutek Wilk
2013-09-03 21:24 ` Gordan Bobic
2013-09-03 21:30 ` Konrad Rzeszutek Wilk
2013-09-04 0:18 ` Gordan Bobic
2013-09-04 14:08 ` Konrad Rzeszutek Wilk
2013-09-04 14:23 ` Gordan Bobic
2013-09-04 18:00 ` Konrad Rzeszutek Wilk
2013-09-03 21:08 ` Konrad Rzeszutek Wilk
2013-09-04 9:21 ` Gordan Bobic
2013-09-04 11:01 ` Gordan Bobic
2013-09-04 13:11 ` Gordan Bobic
2013-09-04 20:18 ` Gordan Bobic
2013-09-05 2:04 ` Konrad Rzeszutek Wilk
2013-09-05 9:41 ` Gordan Bobic
2013-09-05 10:00 ` Gordan Bobic
2013-09-05 12:36 ` Konrad Rzeszutek Wilk
2013-09-05 10:26 ` Gordan Bobic
2013-09-05 12:38 ` Konrad Rzeszutek Wilk
2013-09-05 21:13 ` Gordan Bobic
2013-09-05 21:29 ` Gordan Bobic
2013-09-05 21:46 ` Gordan Bobic
2013-09-05 22:23 ` Konrad Rzeszutek Wilk
2013-09-05 22:42 ` Gordan Bobic
2013-09-06 13:09 ` Konrad Rzeszutek Wilk
2013-09-06 14:09 ` Gordan Bobic
2013-09-05 22:45 ` Gordan Bobic
2013-09-05 23:01 ` Konrad Rzeszutek Wilk
2013-09-06 12:23 ` Gordan Bobic
2013-09-06 13:20 ` Konrad Rzeszutek Wilk
2013-09-06 14:45 ` Gordan Bobic
2013-09-05 22:33 ` Gordan Bobic
2013-09-06 13:04 ` Konrad Rzeszutek Wilk
2013-09-06 13:34 ` Gordan Bobic
2013-09-06 14:32 ` Konrad Rzeszutek Wilk
2013-09-06 16:30 ` Gordan Bobic
2013-09-06 19:54 ` Gordan Bobic
2013-09-10 13:35 ` Konrad Rzeszutek Wilk
2013-09-10 15:04 ` Gordan Bobic
2013-07-25 21:26 ` Bug: Limitation of <=2GB RAM in domU persists with 4.3.0 Gordan Bobic
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=51F966E5.9080006@bobich.net \
--to=gordan@bobich.net \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=rulerof@gmail.com \
--cc=xen-devel@lists.xen.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 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.