xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Wen Congyang <wency@cn.fujitsu.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	xen devel <xen-devel@lists.xen.org>
Subject: Re: Problem about dump-core
Date: Tue, 16 Sep 2014 17:38:38 +0100	[thread overview]
Message-ID: <1410885518.23505.11.camel@citrix.com> (raw)
In-Reply-To: <5417E58C.3030906@cn.fujitsu.com>

On Tue, 2014-09-16 at 15:23 +0800, Wen Congyang wrote:
> On 09/16/2014 10:35 AM, Wen Congyang wrote:
> > Hi, everyone:
> > 
> > The command 'xl dump-core' will fail after migration. The guest is HVM guest(without pv driver).
> > I use the newest staging branch to test. Both source and dest dom0 use the same kernel.
> 
> The kernel version is 3.2, and it only supports IOCTL_PRIVCMD_MMAPBATCH.
> 
> After more investigation, the reason is that the mfn is ~0UL, and xc_map_foreign_range()
> doesn't return NULL on dest host.
> 
> This patch can fix this problem:
> 
> From: Wen Congyang <wency@cn.fujitsu.com>
> Date: Tue, 16 Sep 2014 14:56:03 +0800
> Subject: [PATCH] check if mfn is valid before checking if PRIVCMD_MMAPBATCH_MFN_ERROR is set
> 
> If mfn is invalid, ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH, ..) also returns 0,
> and we set mfn to mfn | PRIVCMD_MMAPBATCH_MFN_ERROR. But if mfn is ~0UL,
> pfn[i] ^ arr[i] returns 0, and we cannot find this error. So we should
> check if mfn is valid first before testing pfn[i] ^ arr[i].

I don't think we can reliably distinguish between a large MFN and an
error with this approach, can we?

I suspect it would be better to perform a check before making the
hypercall that the 4 (?) error bits are not set in the input.

Ian.

  reply	other threads:[~2014-09-16 16:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-16  2:35 Problem about dump-core Wen Congyang
2014-09-16  7:23 ` Wen Congyang
2014-09-16 16:38   ` Ian Campbell [this message]
2014-09-17  0:50     ` Wen Congyang
2014-09-17  1:11       ` Ian Campbell
2014-09-17  1:14         ` Wen Congyang
2014-09-17  6:56         ` Wen Congyang

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=1410885518.23505.11.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=wency@cn.fujitsu.com \
    --cc=xen-devel@lists.xen.org \
    /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).