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-devel] Memory management, mapping, paging questions...

To: nicko.koinkoin@xxxxxxx
Subject: Re: [Xen-devel] Memory management, mapping, paging questions...
From: Simon Kagstrom <simon.kagstrom@xxxxxx>
Date: Wed, 25 Oct 2006 08:53:31 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 24 Oct 2006 23:56:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1161702697.453e2d2969d33@xxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1161702697.453e2d2969d33@xxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/21.4 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI)
At Tue, 24 Oct 2006 17:11:37 +0200,
nicko.koinkoin@xxxxxxx wrote:
> Currently I play with Xen (2.0.7), especially I want to know more about
> the memory management.

I hope I can answer your questions, but I've only used Xen 3/unstable
and I am also not one of the Xen experts (correct me if I'm wrong,
please!)

> So my questions are the following :
> 
> * pt_base is the virtual adress of the pd. But what means virtual
> here ? in which adress space does this adress has the right meaning
> ?

Xen has setup an address space which the guest domain starts in, so
pt_base is simply the virtual address of the page directory.

> * Does Xen create the page tables (I do not include the pd in page tables, I
> think it is more understable like this, i.e. pd != pt) ? Where are these pt?
> their address ?

You can always traverse the page directory page to find this out.

> * mfn_list : is this a list, starting at adress mfn_list, that contains all 
> the
> machine adresses of all machine pages allocated for our VM ? 

Yes, it stores the machine page frame numbers and it's used to
translate physical addresses to machine addresses. I.e., something like

   unsigned long phys_to_machine(unsigned long phys)
   {
       unsigned long machine = mfn_list[phys >> 12];
       machine = (machine << 12) | (phys & (unsigned long)~4095);
       return machine;
   }

Mapping pages work basically as on real hardware except that you have
to translate physical addresses to machine addresses before entering
them into the page table.

// Simon

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

<Prev in Thread] Current Thread [Next in Thread>