WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] trouble with the new mmap-batch interface

To: "Brendan Cully" <brendan@xxxxxxxxx>, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] trouble with the new mmap-batch interface
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Thu, 21 Jan 2010 08:38:44 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 21 Jan 2010 00:39:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C77D2C2F.6DE5%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20100120213812.GC4658@xxxxxxxxxxxxxxxxx> <C77D2C2F.6DE5%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Keir Fraser <keir.fraser@xxxxxxxxxxxxx> 20.01.10 22:54 >>>
>On 20/01/2010 21:38, "Brendan Cully" <brendan@xxxxxxxxx> wrote:
>
>>> It seems unlikely to me that this is actual breakage, but I've built
>>> world a couple of times. Before I put printfs everywhere I thought I'd
>>> ask if anyone else had seen this or had any ideas.
>> 
>> The attached patch fixes ioemu for me.
>
>So the issue is that the kernel only writes back the err array if there was
>at least one failure in the batch. Given the alternative is pre-zeroing the
>array, shouldn't we just unconditionally copy back the array, even if it is
>all zeroes?
>
>Jan: Is it in fact a bug, because IOCTL_PRIVCMD_MMAPBATCH is similarly
>structured (but legitimately, in that case)?

Generally I intended the caller to zero the array. If that's not a good
idea, I can certainly put together patches (linux and libxc) that remove
that assumption. If you'd like to leave the assumption in, then c/s 20822
(fixing domain save) will also need another adjustment (using realloc()
inside the loop doesn't seem very nice anyway - allocating the array
where the other two arrays get allocated would be more consistent).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel