All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: afaerber@suse.de
Subject: [Qemu-devel] [PATCH 0/3] Clean up misuse of qdev_init() in interrupt controller creation
Date: Thu,  5 Feb 2015 10:34:46 +0100	[thread overview]
Message-ID: <1423128889-18260-1-git-send-email-armbru@redhat.com> (raw)

qdev_init()'s error handling has side effects: it unparents the
device, and it calls qerror_report_err().

Unparenting is wanted in realize methods only when we do unusual
things like trying a set of devices and keeping the first one that
works.  This is the case in PATCH 1+2.

qerror_report_err() is always inappropriate in realize methods,
because it doesn't return the Error object.  It either reports the
error to stderr or the human monitor, or it stores it in the QMP
monitor, where it makes the QMP command fail even though the realize
method succeeded.  Fortunately, none of the realize methods in this
patch are reachable from QMP.

Markus Armbruster (3):
  PPC: Clean up misuse of qdev_init() in kvm-openpic creation
  spapr: Clean up misuse of qdev_init() in xics-kvm creation
  s390x: Replace unchecked qdev_init() by qdev_init_nofail()

 hw/intc/s390_flic.c |  6 +-----
 hw/ppc/e500.c       | 20 +++++++++++---------
 hw/ppc/spapr.c      | 25 ++++++++++++-------------
 3 files changed, 24 insertions(+), 27 deletions(-)

-- 
1.9.3

             reply	other threads:[~2015-02-05  9:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05  9:34 Markus Armbruster [this message]
2015-02-05  9:34 ` [Qemu-devel] [PATCH 1/3] PPC: Clean up misuse of qdev_init() in kvm-openpic creation Markus Armbruster
2015-02-18 14:43   ` Markus Armbruster
2015-02-25  0:04     ` Scott Wood
2015-02-25  9:32       ` Markus Armbruster
2015-02-05  9:34 ` [Qemu-devel] [PATCH 2/3] spapr: Clean up misuse of qdev_init() in xics-kvm creation Markus Armbruster
2015-02-18 14:42   ` Markus Armbruster
2015-02-23  0:31     ` David Gibson
2015-02-20 13:16   ` Alexander Graf
2015-02-05  9:34 ` [Qemu-devel] [PATCH 3/3] s390x: Replace unchecked qdev_init() by qdev_init_nofail() Markus Armbruster
2015-02-18 14:45   ` Markus Armbruster
2015-02-18 15:31     ` Cornelia Huck
2015-03-10 11:56       ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423128889-18260-1-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=afaerber@suse.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.