[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] why xen use x86_emulat ion() in page_fault





On Tue, Oct 11, 2011 at 9:20 PM, George Dunlap <George.Dunlap@xxxxxxxxxxxxx> wrote:
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.
 
Yeah, I see~

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

我学了中文学了两年。我常常要用那个! :-)
haha~你竟然会用到中文,第一次在Xen-devel上看到中文好兴奋啊。。。

 -George



--
- Luit @ Parallel Processing Institute, Fudan University 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.