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

Re: [Xen-devel] Problem about dump-core



On 09/17/2014 12:38 AM, Ian Campbell wrote:
> 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@xxxxxxxxxxxxxx>
>> 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.

Yes, we can check it more earlier. If the 4 error bits are set, is it a valid
mfn?

Thanks
Wen Congyang

> 
> Ian.
> 
> .
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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