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] why xen use x86_emulat ion() in page_fault

To: cc Luit <universalbillow@xxxxxxxxx>, Tim Deegan <tim@xxxxxxx>
Subject: Re: [Xen-devel] why xen use x86_emulat ion() in page_fault
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Tue, 11 Oct 2011 14:20:34 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 11 Oct 2011 06:21:31 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ns0OG0SxYGeLswFRRDlt5i8mkevS0w29ihcLDUm/1Nc=; b=rxjqfoArgDg0XL1meIlpRCQRG/OO8pjXlOxxodBtVhgL7uWf4hjTdAYnELb52+YDQV GWrFWYh5gTDoyk1fBNTIH8oUtzCC443fxfNDVw0wjgamaA5JLRJn5P4XsCFpAg6vIcOa nyUkoQ4l3o3AG2GYxHepcwwdJCEoL9pYW1W+M=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CADWh-PE=dPG4BJNUJkdr40f0d57brJvu+8wq6aEsd++mK6kAZQ@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CAFLBxZbLcqpcJfFRSnT_C=5krhen44EzMD5pKcDNGhvLYmck=g@xxxxxxxxxxxxxx> <CADWh-PF1BOSN22-Ua41fuRDP9HsHJ3j=T9j7_Kc2Un8XnVMKOQ@xxxxxxxxxxxxxx> <CAFLBxZZ4vqiQjGONJHKmRZqES5SJv71A9_kUkux6qjvo3407Ng@xxxxxxxxxxxxxx> <CADWh-PE=dPG4BJNUJkdr40f0d57brJvu+8wq6aEsd++mK6kAZQ@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, Oct 11, 2011 at 1:57 PM, cc Luit <universalbillow@xxxxxxxxx> wrote:
> appreciate your explanation so much, that's really detail and helpfull!
> but I think for the propagate from GPT to SPT, it's not always need the sync
> all the time, I know in the early version of xen there is not need to do
> that, but just the Lazy mode, which means (just what I understand, but not
> sure):
>  when guest os modify the GPT, do not emulate (there is no write-protected
> PTE, so guest can directly modify it)
>  1) when the access right ascension, the guest OS will INVLPG to shootdown
> TLB, so hypervisor can catch the INPLPG inst to sync  up the SPT/GPT
>  2) when access right down, when guest OS access this page it will trap to
> xen, xen will catch #PF to sync up SPT/GPT,

We already do something like this for L1 pages; search for "SHOPT_OUT_OF_SYNC".

But when you start to do this for higher-level pages (L2 and above),
then you get into a lot of very tricky corner-cases.  Because changes
to higher-level PTs are less common, we went with the simpler route of
simply emulating all accesses to them.

It could be done -- IIRC, version 1 of the shadow code did this
(because there was very limited hypervisor emulation).  But to get it
correct *and* working quickly will be kind of difficult.

>> > bu ke qi! ;-)
>
> feel kind and amazed to see the Chinese Pinyin, really feel kind of you:-)

我学了中文学了两年。我常常要用那个! :-)

 -George

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