From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKfMU-0002JX-5I for qemu-devel@nongnu.org; Sun, 30 Oct 2011 20:04:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKfMS-00046g-P5 for qemu-devel@nongnu.org; Sun, 30 Oct 2011 20:04:22 -0400 Date: Mon, 31 Oct 2011 11:01:18 +1100 From: David Gibson Message-ID: <20111031000118.GB9698@truffala.fritz.box> References: <1319766992-2596-1-git-send-email-david@gibson.dropbear.id.au> <1319766992-2596-2-git-send-email-david@gibson.dropbear.id.au> <03D779A2-03B3-42B7-A36B-33D0DB41CAF3@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <03D779A2-03B3-42B7-A36B-33D0DB41CAF3@suse.de> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/3] ppc: Correctly handle errors reading ibm, vmx and ibm, dfp properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On Sun, Oct 30, 2011 at 05:53:13PM +0100, Alexander Graf wrote: > > On 28.10.2011, at 03:56, David Gibson wrote: > > > kvmppc_read_int_cpu_dt() returns -1 on errors. However > > kvmppc_host_cpu_def() assumes that it can use the return value > > directly for setting the corresponding instruction support bits. This > > will give invalid results when kvmppc_read_int_cpu_dt() returns -1 > > (i.e. 0xffffffff). > > > > In fact, it gets worse: the common case for -1 return values is when > > the properties are simply not present. On some machines this means > > the features are not available but in other cases it just means that > > the firmware on this platform does not provide this information. So, > > when there's an error reading the properties we really can't tell if > > vmx or dfp is supported. > > > > Therefore, this patch checks for -1 return values and falls back to > > qemu's built in table of CPU capabilities in that case. > > > > Reported-by: Nishanth Aravamudan > > Signed-off-by: David Gibson > > I already have this patch in my tree, though with different > author. Yeah, I realised that not long after I sent it. > I've added Nishanth as Reported-by on it now and you as > Acked-by, if you're ok with that. Ok, thanks. -- 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