From: Richard <judicator3@gmail.com>
To: xen-devel@lists.sourceforge.net
Subject: Page table and memory management
Date: Wed, 2 Mar 2005 22:07:39 -0500 [thread overview]
Message-ID: <a146ff9b050302190711a1c1f0@mail.gmail.com> (raw)
Hello,
I am having some problems to update the page table entries of my
domain with the hypervisor call do_mmu_update().
With 2 level paging XEN refers to the page global directory (PGD) as
level2 and page tables (PT) as level1. I am taking a page frame that
my domain owns, I am going to use that page frame as a page table
(level1 PT) and I am adding the 'address' of that page frame as an
entry of my page global directory (level2 PGD). So my request
'mmu_update_t' to the hypercall do_mmu_update() looks like this.
mmu_update_t.ptr = machine address of PGD entry that I want to update
mmu_update_t.val = machine frame number of PT with appropriate flags
do_mmu_update() and its helper functions in xen/arch/x86/memory.c do
many checks. One of the checks is to verify the flags in '(struct
pfn_info).u.inuse.type_info'. The upper bits of 'type_info' contain
the type of the page frame: PGT_none, PGT_l1_page_table,
PGT_l2_page_table etc ...
In my case, do_mmu_update() verifies that the page frame that I am
going to use as a page table is actually of type PGT_l1_page_table.
Therefore, I cannot just take any random page frame that my domain
owns and use it as page table.
How do I create a new page table ?
How do I register a page frame that I own with XEN so that I can use
it as a page table ?
I am trying to see how XenoLinux is doing its page table allocation.
>From what I can see, function pte_alloc_map() in mm/memory.c is not
doing anything special. It is just getting a free page frame and using
the function pmd_populate() to use that page frame as a page table.
Function pmd_populate() uses macro set_pmd() that expands to function
xen_l2_entry_update() to update the (PGD) level2 page tables.
Thanks
Richard
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
next reply other threads:[~2005-03-03 3:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-03 3:07 Richard [this message]
2005-03-03 9:02 ` Page table and memory management Keir Fraser
2005-03-03 22:00 ` Richard
2005-03-03 22:11 ` Richard
2005-03-03 23:48 ` Xen hangs while booting Domain 0 Dhawan, Puneet
2005-03-04 1:38 ` Page table and memory management Christian Limpach
2005-03-04 9:21 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a146ff9b050302190711a1c1f0@mail.gmail.com \
--to=judicator3@gmail.com \
--cc=xen-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.