[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] where is writable page table implemented?
- To: "Tim Deegan" <Tim.Deegan@xxxxxxxxxx>
- From: weiming <zephyr.zhao@xxxxxxxxx>
- Date: Mon, 24 Mar 2008 14:26:02 -0400
- Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 24 Mar 2008 11:26:28 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=EjnpFCmcoFjPTaBoq3N3zh778Pvfs2IBmAm4M69qsA9qSfrfgzrtKQz6BAkx5WkyPd81FF2rJhwIzKuRbIolI2GkTVXCo0c5ZENE/ISw6hnrm2ZWNMnfTggCWnbPtO2WqGDrqHAlAu160UiNyY1geAiq7r31T15N4wZJ2hUE8b4=
- List-id: Xen developer discussion <xen-devel.lists.xensource.com>
Hi Tim,
Thanks a lot!
Now, I know that fixup_page_fault() -> ptwr_do_page_fault handles the write attempts to a pagetable page.
But 1) how does the guest OS tell xen which page is a pagetable page? What if the guest doesn't do so? 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.
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()?
Thanks in advance! Weiming
On Mon, Mar 24, 2008 at 12:25 PM, Tim Deegan < Tim.Deegan@xxxxxxxxxx> wrote:
At 12:18 -0400 on 24 Mar (1206361139), weiming wrote:
> Hi,
>
> I want to read the code about the implementation of writable page table. But
> I can't find it in the source codes.
xen/arch/x86/mm.c, the functions after the comment "Writable Pagetables"
(ptwr_*)
The guest is responsible for revoking write access to its own
pagetables, but that is checked by the recursive pagetable walk started
by the MMUEXT_PIN_* hypercall.
Cheers,
Tim.
--
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|