From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YOnRr-0004mD-TF for qemu-devel@nongnu.org; Fri, 20 Feb 2015 08:16:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YOnRm-0000PF-Nz for qemu-devel@nongnu.org; Fri, 20 Feb 2015 08:16:51 -0500 Message-ID: <54E733BC.7000304@suse.de> Date: Fri, 20 Feb 2015 14:16:44 +0100 From: Alexander Graf MIME-Version: 1.0 References: <1423128889-18260-1-git-send-email-armbru@redhat.com> <1423128889-18260-3-git-send-email-armbru@redhat.com> In-Reply-To: <1423128889-18260-3-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] spapr: Clean up misuse of qdev_init() in xics-kvm creation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, afaerber@suse.de On 05.02.15 10:34, Markus Armbruster wrote: > We call try_create_xics() to create a "xics-kvm". If it fails, we > call it again to fall back to plain "xics". > > try_create_xics() uses qdev_init(). qdev_init()'s error handling has > an unwanted side effect: it calls qerror_report_err(), which prints to > stderr. Looks like an error, but isn't. > > In QMP context, it would stash the error in the monitor instead, > making the QMP command fail. Fortunately, it's only called from board > initialization, never in QMP context. > > Clean up by cutting out the qdev_init() middle-man: set property > "realized" directly. > > While there, improve the error message when we can't satisfy an > explicit user request for "xics-kvm", and exit(1) instead of abort(). > Simplify the abort when we can't create "xics". > > Cc: Alexander Graf > Cc: qemu-ppc@nongnu.org > Signed-off-by: Markus Armbruster Thanks, applied patches 1 and 2 to ppc-next. Alex