WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation

To: "dinesh chandrasekaran" <dinesh_chan8@xxxxxxxxxxx>
Subject: Re: [Xen-users] Re: [Xen-devel] Xen - Guest memory allocation
From: "Grzegorz Miłoś" <gm281@xxxxxxxxx>
Date: Sat, 28 Jun 2008 16:50:48 +0100
Cc: derek.murray@xxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sat, 28 Jun 2008 08:51:18 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=C0V4eFxOeF7BKvb+EePiYvX1/Fwn1QBuPshhxXg2ftI=; b=sjGLYb816dmNMUlUts6YCrfRYivxGc0IGV9ZLoVOpFu44OqJJWskxFDqoWKbk20dmX M3VUvh9zmgqG48EUqRmJTo0+NuQz0+QJB7LZNRu86YHXJET5CDjjg6pw6YAot+fY5kB0 GIlAy7yRq44lrh9poyXirM/hwLHss+FB+UhUY=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=c7Tr42xdVBAPYe39/kiu6sePiSgYtTD/YBNbRZ2gbzdhqs/RXzRd+QIFr1wkEPKk1v I8cyD9NR1/z5NZpQ1CBR3ygqqi6cC3eMcwReemQgc61kZtD6iJr/JwNVmF5fUqWPEg19 Yx7XYtA37XjRqsikfrMObmLLp6IJecbS7WUq4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BAY111-W60C839377B5EFDCDBB2B0B1A20@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <BAY111-W1469C685751B8FECADA70EB1A60@xxxxxxx> <BAY111-W60C839377B5EFDCDBB2B0B1A20@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> 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 <xm dmesg>
>
> static void populate_physmap(struct memop_args *a)
> {
>         /******
>
>              for(i=a->nr_done; i<a->nr_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.

>
> `  &nbsp ;                         }
>                    /***************
>                 }
>         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: <G><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)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel