[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] DomU sees only 512MB RAM with PCI-passthrough



On Wed, May 22, 2013 at 05:15:37PM -0400, Konrad Rzeszutek Wilk wrote:
> On Wed, May 22, 2013 at 05:06:18PM -0400, Konrad Rzeszutek Wilk wrote:
> > On Thu, Dec 20, 2012 at 01:40:38PM +0100, Christian Holpert wrote:
> > > Hello,
> > > 
> > > the output of xl -vvv create is attached for xen 4.2.1 with PCI and
> > > without PCI.
> > 
> > Could you also attach the host dmesg please?
> 
> Nevermind. I can reproduce it. The interesting thing is that initially I had
> this in my guest config:
> 
> maxmem=2048
> memory=1024
> 
> and the output of the tools told me:
> Memory: 1048576kB End of RAM: 0x20000 (PFN) Delta: 524288kB, PCI start: 
> 524288kB (0x20000 PFN), Balloon 1048576kB
> 
> .. and then it added that 1G to the end:
> 
> libxl_x86.c:201:e820_sanitize: :  [100000 -> 160000] RAM
> 
> and the guest booted nicely.
> 
> But if maxmem=memory I get:
> 
> Memory: 2097152kB End of RAM: 0x20000 (PFN) Delta: 1572864kB, PCI start: 
> 524288kB (0x20000 PFN), Balloon 0kB
> 
> And of course no E820 entry at 4G and guest crashes.

Pff, try this patch please:

diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c
index a17f6ae..a78c91d 100644
--- a/tools/libxl/libxl_x86.c
+++ b/tools/libxl/libxl_x86.c
@@ -182,7 +182,7 @@ static int e820_sanitize(libxl_ctx *ctx, struct e820entry 
src[],
         idx++;
     }
     /* At this point we have the mapped RAM + E820 entries from src. */
-    if (balloon_kb) {
+    if (balloon_kb || delta_kb) {
         /* and if we truncated the RAM region, then add it to the end. */
         e820[idx].type = E820_RAM;
         e820[idx].addr = (uint64_t)(1ULL << 32) > last ?

(I am heading out for today and will retry it tomorrow, but I am 99%
that is the culprit).

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.