From: weiming <zephyr.zhao@gmail.com>
To: Tim Deegan <Tim.Deegan@citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: Re: where is writable page table implemented?
Date: Sun, 30 Mar 2008 19:43:27 -0400 [thread overview]
Message-ID: <add59a3f0803301643r740ba4c5xda84c40b46d7a157@mail.gmail.com> (raw)
In-Reply-To: <20080325104351.GA30991@york.uk.xensource.com>
[-- Attachment #1.1: Type: text/plain, Size: 1715 bytes --]
Hi Tim,
Very appreciate for your explanation.
Another question that puzzles me is:
with writable page table, why guest os still calls update_va_mapping to
update the pte? Is it because writable page table only traps updates to L4
level page table? So in order to update pud, pmd, we have to use
update_va_mapping? and what's purpose of the hypercall Pin/unpin page table
page?
Very appreciate!
Weiming
On Tue, Mar 25, 2008 at 6:43 AM, Tim Deegan <Tim.Deegan@citrix.com> wrote:
> 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.]
>
[-- Attachment #1.2: Type: text/html, Size: 2322 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2008-03-30 23: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
2008-03-30 23:43 ` weiming [this message]
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=add59a3f0803301643r740ba4c5xda84c40b46d7a157@mail.gmail.com \
--to=zephyr.zhao@gmail.com \
--cc=Tim.Deegan@citrix.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.