From: "=?ISO-8859-2?Q?Grzegorz_Mi=B3o=B6?=" Subject: Re: [Xen-users] Re: Xen - Guest memory allocation Date: Sat, 28 Jun 2008 16:50:48 +0100 Message-ID: <4cac40570806280850h1bd7ff9cj92da9bcc55f3d993@mail.gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: dinesh chandrasekaran Cc: derek.murray@cl.cam.ac.uk, xen-devel@lists.xensource.com, xen-users@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > Hi, > > if I use the following inside the populate_physmap() inside > xen/common/memory.c, > > unsigned long maddr_pci = 0xdf000000; //since I know the machine > address of the mememory behind my pci device > > static void populate_physmap(struct memop_args *a) > { > /****** > > for(i=a->nr_done; inr_extents; i++) > { > /************* > &nb sp; if(d->is_privilaged) > > page = alloc_domheap_pages(d, a->extent_order, a->memflags | > MEMF_node(node)); > else > { > page = maddr_to_page(maddr_pci); This is going to assign DomU IO pages _only_. > maddr_pci = ((maddr + PAGE_SIZE-1) &PAGE_MASK); What is maddr here? Did you mean maddr_pci? Also, (page_aligned_x + PAGE_SIZE - 1) & PAGE_MASK = page_aligned_x, in other words you are stuck on the same page. > > `   ; } > /*************** > } > printk("a->nr_done: %lx", a->nr_done); > } > > The printk says "a->nr_done: 2000" when 'xm dmesg' is used (which is correct > since I allocated 32MB for DomU = 8192 pages = 0x2000) > > but exits with the following error: > > & n bsp; 'dmesg' says : Using config file > "/home/guest/Guest.conf". > Error: (1, 'Internal error', 'xc_dom_boot_domU_map: > failed to mmap domU pages 0x200+0x2e3 [xenctl, rc=-1]\n' > > 'xm dmesg' says: <1>mm.c:671:d0 Non-privileged (1) attempt > to map I/O space 000df1ff Dom0 tried map DomU memory in order to load the kernel + other boot info. This fails because you've only allocated IO pages to DomU. Cheers Gr(z)egor(z)