From: Tim Deegan <Tim.Deegan@citrix.com>
To: weiming <zephyr.zhao@gmail.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: Re: where is writable page table implemented?
Date: Tue, 25 Mar 2008 10:43:51 +0000 [thread overview]
Message-ID: <20080325104351.GA30991@york.uk.xensource.com> (raw)
In-Reply-To: <add59a3f0803241126i603eb40qfa1b57f917103e74@mail.gmail.com>
At 14:26 -0400 on 24 Mar (1206368762), weiming wrote:
> 1) how does the guest OS tell xen which page is a pagetable page?
With an MMUEXT_OP hypercall, if I recall correctly.
> What if the guest doesn't do so?
Then it's not allowed to use it as a pagetable.
> I assume xen should check if a pagetable had
> already been registered or not. But in do_mmuext_op(), there is no such
> check before setting the cr3.
In new_guest_cr3(), the call to get_page_and_type_from_pagenr() will try
to take a typed reference count on the page, which marks it as a
pagetable.
The check for paging_mode_refcounts(d) is to say that if the guest is
running under full shadow pagetables/HAP, then we skip the usual
protection mechanisms and leave it to the paging-assistance code.
> 2) in ptwr_do_page_fault(), it should disconnect the page from page
> directory and then mark the page as writable. Where are they done? In
> x86_emulate()?
That's not done any more. Instead, x86_emulate() emulates the
instruction and verifies the result is OK.
Tim.
--
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]
next prev parent reply other threads:[~2008-03-25 10:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-24 16:18 where is writable page table implemented? weiming
2008-03-24 16:25 ` Tim Deegan
2008-03-24 18:26 ` weiming
2008-03-25 10:43 ` Tim Deegan [this message]
2008-03-30 23:43 ` weiming
2008-04-01 8:38 ` Tim Deegan
2008-04-01 15:37 ` weiming
2008-04-01 16:17 ` Tim Deegan
2008-03-25 16:30 ` Mark Williamson
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=20080325104351.GA30991@york.uk.xensource.com \
--to=tim.deegan@citrix.com \
--cc=xen-devel@lists.xensource.com \
--cc=zephyr.zhao@gmail.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.