From: tgh <wwwwww4187@sina.com.cn>
To: Tim Deegan <Tim.Deegan@xensource.com>,
Mark Williamson <mark.williamson@cl.cam.ac.uk>,
"Petersson, Mats" <Mats.Petersson@amd.com>,
Tim Deegan <Tim.Deegan@citrix.com>
Cc: xen-devel@lists.xensource.com, MT Rezaie <mmrezaie@gmail.com>
Subject: Re: page table question!
Date: Sat, 08 Dec 2007 22:26:49 +0800 [thread overview]
Message-ID: <475AA9A9.4050103@sina.com.cn> (raw)
In-Reply-To: <20070614082755.GB15027@york.uk.xensource.com>
hi
In the HVM mode on the AMD NPT or intel EPT,VMM should maintain a
counterpart pagetable for each of the guestOS process's page table, is
it ? then there will not be a small mount of memory consumption for
hyperviser's limited VA ,is it? or where are those counterpart page
tables stored ?
Thanks in advance
Tim Deegan 写道:
> At 17:35 +0100 on 13 Jun (1181756130), Mark Williamson wrote:
>
>>>> One thing I've never been clear on for shadow mode is how
>>>> accessed / dirty
>>>> bits get propagated to the guest pagetable from the shadow.
>>>>
>>> Good question. I have a feeling that the answer is "it doesn't". HAP
>>> would probably solve this problem.
>>>
>
> When a guest pagetable entry has the Accessed bit clear, its shadow has
> the Present bit clear. This means we will get an extra page fault when
> the guest tries to read that area of memory. In the page-fault handler
> we write the Accessed bit into the guest entry, and replace the shadow
> entry with one that has the Present bit. A similar scheme (shadowing
> ~Dirty with ~Writeable) applies to those entries that have Dirty bits.
>
> The actual moving parts are in the _sh_propagate() function in
> arch/x86/mm/shadow/multi.c, which is why that function needs to be told
> whether it's handling a read fault, write fault or prefetch operation.
>
>
>> Don't guests need the dirty bits for their memory management (e.g. mmap) to
>> work correctly?
>>
>
> Yes, although in fact Xen doesn't quite catch all the cases where those
> bits should be set (certain Xen-handled operations that walk the guest
> pagetables instead of using the shadows) and it's not tripped us up
> yet. :)
>
>
>> Maybe one could do something scary like trapping reads to
>> guest PTEs, enabling Xen to refer to the real PTE... Sounds a bit gross
>> though.
>>
>
> It was considered. :) (For good reasons; talk to Michael Fetterman
> some time.)
>
>
>> HAP is definitely HAPpier :-)
>>
>
> Yep, should see a significant performance increase and eliminate a lot
> of moving parts.
>
> Tim.
>
>
next prev parent reply other threads:[~2007-12-08 14:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-13 14:55 page table question! MT Rezaie
2007-06-13 15:15 ` Petersson, Mats
2007-06-13 16:05 ` Mark Williamson
2007-06-13 16:22 ` Petersson, Mats
2007-06-13 16:35 ` Mark Williamson
2007-06-14 4:35 ` Jun Koi
2007-06-14 4:54 ` pradeep singh rautela
2007-06-14 8:27 ` Tim Deegan
2007-12-08 14:26 ` tgh [this message]
2007-12-08 14:36 ` Mark Williamson
2007-12-08 14:50 ` Daniel Stodden
2007-12-16 3:07 ` tgh
2007-12-16 11:55 ` Tim Deegan
2007-06-14 8:44 ` tgh
2007-06-14 9:51 ` Mark Williamson
2007-06-16 10:36 ` MT Rezaie
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=475AA9A9.4050103@sina.com.cn \
--to=wwwwww4187@sina.com.cn \
--cc=Mats.Petersson@amd.com \
--cc=Tim.Deegan@citrix.com \
--cc=Tim.Deegan@xensource.com \
--cc=mark.williamson@cl.cam.ac.uk \
--cc=mmrezaie@gmail.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.