From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Tom Creck <tom-xen@hotmail.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: When to emulate writing page table page and when to do_update_va_mapping()?
Date: Wed, 02 Jul 2008 23:44:03 -0700 [thread overview]
Message-ID: <486C7533.8010805@goop.org> (raw)
In-Reply-To: <BAY121-DS15A52350AF0C61628CFC8E7980@phx.gbl>
Tom Creck wrote:
>
> Hello, everyone:
>
>
>
> I know that x86_emulate_memop() is used to emulate writing to
> page table pages as Xen intentionally write protect page table pages.
>
> Also, the hypercall Hypervisor_update_va_mapping() ->
> mod_l2/l1_entry() is also used to modify page table pages.
>
> So I get confused about their difference. My questions are:
>
>
>
> (1) When are the above two routines of modifying page table pages
> invoked respectively?
>
> (2) What’s the difference in functionality among the two?
>
Writing directly to pagetables is a good idea if you think it's likely
that the pagetable is unpinned. That is, when it's still just an
ordinary RW page while the pagetable is under construction (fork/exec)
or destruction (exit). In this case, a simple memory-write is much more
efficient than doing a hypercall.
On the other hand, if you're likely to be updating an active pinned
pagetable, a hypercall is more efficient than trapping and emulating a
write (especially if you can batch multiple updates together with a
multicall).
J
prev parent reply other threads:[~2008-07-03 6:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 6:33 When to emulate writing page table page and when to do_update_va_mapping()? Tom Creck
2008-07-03 6:44 ` Jeremy Fitzhardinge [this message]
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=486C7533.8010805@goop.org \
--to=jeremy@goop.org \
--cc=tom-xen@hotmail.com \
--cc=xen-devel@lists.xensource.com \
/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.