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

[Xen-devel] Re: mapping problems in xenpaging



On Thu, Sep 29, zhen shi wrote:

> ÂHi,Olaf,
> Â
> ÂWhen we analyze and test xenpaging,we found there are some problemsÂbetween
> mapping and xenpaging.
> Â1) When mapping firstly, then do xenpaging,and the code paths have resolved
> the problems.It's OK.
> Â2) The problems exists if we do address mapping firstly then go to
> xenpaging,and our confusions are as followings:
> ÂÂ a) If the domU's memory is directly mapped to dom0,such as the hypercall
> from pv driver,then it will build a related page-table in dom0,which will not
> change p2m-type.
> ÂÂÂÂ Âand then do the xenpaging to page out the domU's memory pages whose gfn
> address have been already mapped to dom0;So it will cause some problems when
> dom0
> ÂÂÂÂ Âaccesses these pages.Because these pages are paged-out,and dom0 cannot
> tell the p2mt before access the pages.

I'm not entirely sure what you do. xenpaging runs in dom0 and is able to
map paged-out pages. It uses that to trigger a page-in, see
tools/xenpaging/pagein.c in xen-unstable.hg

> Â b)The another situation is that if xen has mapped the domU's page, and get
> the mfn according to pfn_to_mfn.But then the page's p2mt is changed by others,
> so when xen
> ÂÂÂ accesses the page ,it will cause problems such as BSOD or reboot.Because
> the operations of getting mfn and accessing the page are not
> atomic.andÂtheÂsituation exists
> ÂÂÂ inÂmany code paths .

Can you be more specific what you mean? Xen doesnt seem to have a
pfn_to_mfn function, only the tools have some helper macros of that name.


Olaf

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