qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/3] spapr: Clean up misuse of qdev_init() in xi


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH 2/3] spapr: Clean up misuse of qdev_init() in xics-kvm creation
Date: Fri, 20 Feb 2015 14:16:44 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


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 <address@hidden>
> Cc: address@hidden
> Signed-off-by: Markus Armbruster <address@hidden>

Thanks, applied patches 1 and 2 to ppc-next.


Alex



reply via email to

[Prev in Thread] Current Thread [Next in Thread]