From: Keir Fraser Subject: Re: trouble with the new mmap-batch interface Date: Wed, 20 Jan 2010 21:54:55 +0000 Message-ID: References: <20100120213812.GC4658@kremvax.cs.ubc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100120213812.GC4658@kremvax.cs.ubc.ca> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Brendan Cully , "xen-devel@lists.xensource.com" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 20/01/2010 21:38, "Brendan Cully" 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)? -- Keir