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

Re: [Xen-users] domU only see 512MB RAM when enabling PCI passthrough


  • To: xen-users@xxxxxxxxxxxxx
  • From: ShadesOfGrey <shades_of_grey@xxxxxxxxxxxxx>
  • Date: Mon, 11 Mar 2013 18:42:23 -0400
  • Delivery-date: Mon, 11 Mar 2013 22:43:42 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=RwQmD9cncRxp7qudh0jvOjr3zptDACvku/6HV+10d4iRyidkuFJwNN0hqyIcXR9T; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:X-ELNK-Trace:X-Originating-IP;
  • List-id: Xen user discussion <xen-users.lists.xen.org>

From Casey Delorme's "Comprehensive Xen Debian Wheezy PCI Passthrough Tutorial", this may be the potential cause of your issue.

EFI Source Modification

Given that I encountered no make errors, I was shocked to find that they still hadn't addressed the grub efi compatibility bug where it fails to recognize available system memory.

The fix for this is a source modification, though they have supposedly added a build process for xen.efi, which would replace the debian.efi generated by grub. I have yet to find adequate instructions to make that work, and even if I did may break adding xen-pciback.hide to the grub configuration, which we need if we are planning to do the easy method of PCI Passthrough.

So, let's open up xen/arch/x86/setup.c with our favorite text editor, and find the line containing ( e820_raw_nr != 0 ), and make that area look like this:

#if 0
 else if ( e820_raw_nr != 0 )
 {
 memmap_type = "Xen-e820";
 }
 else if ( bootsym(lowmem_kb) )
 {
 memmap_type = "Xen-e801";
 e820_raw[0].addr = 0;
 e820_raw[0].size = bootsym(lowmem_kb) << 10;
 e820_raw[0].type = E820_RAM;
 e820_raw[1].addr = 0x100000;
 e820_raw[1].size = bootsym(highmem_kb) << 10;
 e820_raw[1].type = E820_RAM;
 e820_raw_nr = 2;
 }
 #endif
 else if ( mbi->flags & MBI_MEMMAP )
 

Notice we are commenting out a section of code using "if 0", which always evaluates to false, to eliminate the section of e801 mapping which breaks our ram recognition.

I have no idea what kind of adverse affects this has on other systems, but it has worked for me since Xen 4.1.2.

End EFI Source Modification



On 03/08/2013 07:44 PM, Baojun Wang wrote:
Hi list,

I'm trying to run pvlinux (via pvgrub) using pci passthrough (and vga
pass through), xen version is 4.2.1, dom0 & domU kernel are both
3.8.2, I checked the kernel log (DMAR) and the motherboard (H67)
supports vt-d, processor is i7-2600 and it supports vt-d too.

When pci passthrough is not enabled, everything is fine;
but after I enabled pci pass through, domU can only see 512MB RAM (USB
passed from pci-passthrough works, but video/intel didn't work, likely
due to i915 load error from dmesg, everything else is also good).

I googled and found a similar issue is reported at:
http://lists.xen.org/archives/html/xen-users/2012-12/msg00179.html

But seems there is no follow up how the problem is fixed, how can I
fix the issue?


Below are some links from pastebin.com:

1) native dmesg without loading xen.gz: http://pastebin.com/BTVNTi8D
2) (kernel) dmesg of dom0: http://pastebin.com/DEZ7gfmG
3) (xl) dmesg of dom0: http://pastebin.com/46bR2ngv
4) domU dmesg without pci passthrough: http://pastebin.com/DGZR4NLP
5) domU dmesg with pci passthrough: http://pastebin.com/aujxwys2

I tried xen version 4.2.0 too but still no luck.
My kernel have all xen feature enabled; and I can provide more info if
necessary.

Thanks
baojun

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


_______________________________________________
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®.