From: Simon Horman Subject: Re: [PATCH] ioemu: unmap INTx interrupt on hot-remove Date: Fri, 27 Mar 2009 08:26:28 +1100 Message-ID: <20090326212625.GA3769@verge.net.au> References: <20090313134807.66F0.27C06F64@necst.nec.co.jp> <20090326051238.GD24011@verge.net.au> <20090326170847.816E.27C06F64@necst.nec.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20090326170847.816E.27C06F64@necst.nec.co.jp> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Yuji Shimada Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Thu, Mar 26, 2009 at 05:11:29PM +0900, Yuji Shimada wrote: > On Thu, 26 Mar 2009 16:12:38 +1100 > Simon Horman wrote: > > > > +char mapped_machine_irq[PT_NR_IRQS] = {0}; > > > > This only initialises the first element of mapped_machine_irq[] to 0. > > Do you have any issue relating to this code? > I think remaining elements are initialized to 0. My issue is that the code doesn't seem to be correct - though I have not experienced any problems. My understanding is that it may well be the case that the rest of the array is initialised to zero, by virtue of being a page that hasn't been used since being received from the kernel. But I don't believe that there are any guarantees that it doesn't contain non-zero values. If my assumptions are wrong and it is the case that the contents of the array is guaranteed to be zeroed then the "{0}" seems to be misleading and it could just be removed. -- Simon Horman VA Linux Systems Japan K.K., Sydney, Australia Satellite Office H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en