Received: from eggs.gnu.org ([2001:4830:134:3::10]:42016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y20Qm-0007lL-BY for qemu-devel@nongnu.org; Fri, 19 Dec 2014 11:29:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y20Qg-000073-7h for qemu-devel@nongnu.org; Fri, 19 Dec 2014 11:29:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y20Qg-00006s-0E for qemu-devel@nongnu.org; Fri, 19 Dec 2014 11:29:26 -0500 Date: Fri, 19 Dec 2014 14:29:04 -0200 From: Eduardo Habkost Message-ID: <20141219162904.GB5002@thinpad.lan.raisama.net> References: <1418956884-24022-1-git-send-email-ehabkost@redhat.com> <1418956884-24022-6-git-send-email-ehabkost@redhat.com> <54940A76.7050802@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54940A76.7050802@redhat.com> Subject: Re: [Qemu-devel] [PATCH 5/8] target-i386: Set APIC ID using cpu_index on CONFIG_USER List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Gu Zheng , Igor Mammedov , qemu-devel@nongnu.org On Fri, Dec 19, 2014 at 12:22:30PM +0100, Paolo Bonzini wrote: > On 19/12/2014 03:41, Eduardo Habkost wrote: > > + object_property_set_int(OBJECT(cpu), CPU(cpu)->cpu_index, "apic-id", > > + &error); > > + if (error) { > > + goto out; > > + } > > + > > Should this use &error_abort? I normally use &error_abort only if there is no way to indicate errors to the caller at all. In this case, we print the error message and return NULL. However, I was assuming that all callers of cpu_init() check for NULL properly, and cpu_copy() at linux-user/main.c doesn't. As I don't want to touch linux-user code or change the cpu_init() signature, I will use &error_abort in the next version. -- Eduardo