All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: zhen shi <bickys1986@gmail.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: mapping problems in xenpaging
Date: Thu, 29 Sep 2011 19:02:44 +0200	[thread overview]
Message-ID: <20110929170244.GA29163@aepfle.de> (raw)
In-Reply-To: <CACavRyB4kvMLZK1-vv9bJnVdnpKJBHTmnhJxt6g3eh88xY6FTg@mail.gmail.com>

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

  reply	other threads:[~2011-09-29 17:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 14:55 mapping problems in xenpaging zhen shi
2011-09-29 17:02 ` Olaf Hering [this message]
2011-09-30 21:02   ` Adin Scannell
2011-09-30 22:19     ` Tim Deegan
2011-10-03 14:56     ` Olaf Hering
2011-10-06 11:10       ` Tim Deegan
2011-10-09 16:40         ` zhen shi
2011-10-01  3:52   ` zhen shi

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=20110929170244.GA29163@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=bickys1986@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.