From: Olaf Hering <olaf@aepfle.de>
To: hongkaixing@huawei.com
Cc: bicky.shi@huawei.com, xiaowei.yang@huawei.com,
xen-devel@lists.xensource.com, yanqiangjun@huawei.com,
hanweidong@huawei.com
Subject: Re: [PATCH] xenpaging:add the dealing of MEM_EVENT_FLAG_EVICT_FAIL request in
Date: Thu, 9 Feb 2012 10:54:37 +0100 [thread overview]
Message-ID: <20120209095437.GA13435@aepfle.de> (raw)
In-Reply-To: <68eae0b487aef8349f16.1328777959@h00166998.china.huawei.com>
On Thu, Feb 09, hongkaixing@huawei.com wrote:
> xenpaging:add the dealing of MEM_EVENT_FLAG_EVICT_FAIL request in
> tools/xenpaging
>
> If a page is nominated but not evicted,then dom0 accesses the page,it
> will change the page's p2mt to be p2m_ram_paging_in,and the req.flags is
> MEM_EVENT_FLAG_EVICT_FAIL;so it will fail in p2m_mem_paging_evict() because
> of the p2mt;and paging->num_paged_out will not increase in this case;After
> the paging process is terminated, the p2mt p2m_ram_paging_in still remains
> in p2m table.Once domU accesses the nominated page,it will result in BSOD
> or vm'stuck.
> The patch adds the dealing of this request to resume the page before xenpaging
> is ended.
This can happen if p2m_mem_paging_populate() was called by a foreign
domain. In this case MEM_EVENT_FLAG_VCPU_PAUSED is not set and xenpaging
will not sent a response. And in this case the ring is in an
inconsistent state anyway, new requests cant be added, I think.
Acked-by: Olaf Hering <olaf@aepfle.de>
> Signed-off-by??hongkaixing<hongkaixing@huawei.com>,shizhen<bicky.shi@huawei.com>
>
> diff -r 9f4640e40d4f -r 68eae0b487ae tools/xenpaging/xenpaging.c
> --- a/tools/xenpaging/xenpaging.c Thu Feb 09 16:50:52 2012 +0800
> +++ b/tools/xenpaging/xenpaging.c Thu Feb 09 16:58:01 2012 +0800
> @@ -911,7 +911,7 @@
> !!(req.flags & MEM_EVENT_FLAG_EVICT_FAIL) );
>
> /* Tell Xen to resume the vcpu */
> - if ( req.flags & MEM_EVENT_FLAG_VCPU_PAUSED )
> + if (( req.flags & MEM_EVENT_FLAG_VCPU_PAUSED ) || ( req.flags & MEM_EVENT_FLAG_EVICT_FAIL ))
> {
> /* Prepare the response */
> rsp.gfn = req.gfn;
next prev parent reply other threads:[~2012-02-09 9:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 8:59 [PATCH] xenpaging:add the dealing of MEM_EVENT_FLAG_EVICT_FAIL request in hongkaixing
2012-02-09 9:54 ` Olaf Hering [this message]
2012-02-09 18:48 ` [PATCH] xenpaging:add the dealing of MEM_EVENT_FLAG_EVICT_FAIL request in [and 1 more messages] Ian Jackson
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=20120209095437.GA13435@aepfle.de \
--to=olaf@aepfle.de \
--cc=bicky.shi@huawei.com \
--cc=hanweidong@huawei.com \
--cc=hongkaixing@huawei.com \
--cc=xen-devel@lists.xensource.com \
--cc=xiaowei.yang@huawei.com \
--cc=yanqiangjun@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).