WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] page table question!

To: tgh <wwwwww4187@xxxxxxxxxxx>
Subject: Re: [Xen-devel] page table question!
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Sat, 8 Dec 2007 14:36:53 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Petersson, Mats" <Mats.Petersson@xxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxx>, MT Rezaie <mmrezaie@xxxxxxxxx>
Delivery-date: Sat, 08 Dec 2007 06:38:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <475AA9A9.4050103@xxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <907625E08839C4409CE5768403633E0B02561E12@xxxxxxxxxxxxxxxxx> <20070614082755.GB15027@xxxxxxxxxxxxxxxxxxxxx> <475AA9A9.4050103@xxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)
> 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 ?

As far as I know, the VMM only needs one extra table per guest, not per 
process.  This describes the "guest physical" -> "machine physical" mapping.  
Guest virtual addresses are then translated by walking the guest pagetable 
(guest virtual -> guest physical) and then the physical->machine table for 
that guest (maintained by the VMM) to get a real host address.

Cheers,
Mark

> 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.



-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>