Received: from [140.186.70.92] (port=42525 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0P1k-0004vf-UP for qemu-devel@nongnu.org; Thu, 17 Mar 2011 22:02:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0P1j-0002YK-B5 for qemu-devel@nongnu.org; Thu, 17 Mar 2011 22:02:56 -0400 Received: from ozlabs.org ([203.10.76.45]:33166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0P1j-0002Xv-0S for qemu-devel@nongnu.org; Thu, 17 Mar 2011 22:02:55 -0400 Date: Fri, 18 Mar 2011 12:58:34 +1100 From: David Gibson Subject: Re: [Qemu-devel] [PATCH 21/26] Implement TCE translation for sPAPR VIO Message-ID: <20110318015834.GB3453@yookeroo> References: <1300251423-6715-1-git-send-email-david@gibson.dropbear.id.au> <1300251423-6715-22-git-send-email-david@gibson.dropbear.id.au> <4D8137C5.3010708@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D8137C5.3010708@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: paulus@samba.org, agraf@suse.de, anton@samba.org, qemu-devel@nongnu.org On Wed, Mar 16, 2011 at 05:20:53PM -0500, Anthony Liguori wrote: > On 03/15/2011 11:56 PM, David Gibson wrote: > >From: Ben Herrenschmidt [snip] > >+static target_ulong h_put_tce(CPUState *env, sPAPREnvironment *spapr, > >+ target_ulong opcode, target_ulong *args) > >+{ > >+ target_ulong liobn = args[0]; > >+ target_ulong ioba = args[1]; > >+ target_ulong tce = args[2]; > >+ VIOsPAPRDevice *dev = spapr_vio_find_by_reg(spapr->vio_bus, liobn); > >+ VIOsPAPR_RTCE *rtce; > >+ > >+ if (!dev) { > >+ fprintf(stderr, "spapr_vio_put_tce on non-existent LIOBN " > >+ TARGET_FMT_lx "\n", > >+ liobn); > > You generally want to avoid guest triggered fprintfs as it can be > exploited in scenarios where qemu's stdout is logged to disk > (libvirt). We usually wrap this in a DPRINTF() of some sort. Ah, good point. I've gone through and audited for this sort of thing. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson