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

Re: [Xen-devel] Memory management, mapping, paging questions...

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,

> 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



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