qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 00/16] PCI device assignment: improve error reporting over QMP
Date: Wed, 7 May 2014 09:52:09 -0400	[thread overview]
Message-ID: <20140507095209.02fc5377@redhat.com> (raw)
In-Reply-To: <5360FF1D.6020300@redhat.com>

On Wed, 30 Apr 2014 15:48:13 +0200
Laszlo Ersek <lersek@redhat.com> wrote:

> Hi Luiz,
> 
> On 04/10/14 10:24, Laszlo Ersek wrote:
> > This is for <https://bugzilla.redhat.com/show_bug.cgi?id=616415>.
> > 
> > In general, we want to propagate non-fatal (ie. non-exit()ing,
> > non-abort()ing) errors to the QMP caller, rather than printing them
> > on-site. The series focuses on errors raised at PCI assignment time (ie.
> > reachable from assigned_initfn()), other errors are not converted.
> > 
> > Errors are not propagated through assigned_initfn(); let's wait for
> > someone else to convert "kvm-pci-assign" from qdev to QOM. The series is
> > nonetheless an improvement, because the forwarding of initialization
> > errors now stops just before device_realize(). We set the
> > stored/persistent monitor error there.
> > 
> > Informative and warning messages (that report about circumstances that
> > don't break the assignment operation) cannot terminate in
> > qerror_report_err(), because that would set the persistent monitor
> > error, breaking the high level (QMP) operation.
> > 
> > A call graph rooted in assigned_initfn() was generated with cflow.
> > Leaves that could never fail were removed from the graph (and this
> > property similarly propagated upwards as far as possible).
> > 
> > The patchset loosely follows a bottom-up algorithm on this calltree. Any
> > leaf that reports an error internally and returns a related failure is
> > converted to "throw" an Error structure instead. All direct callers of
> > the converted leaf are addressed at once, in the same patch, to consume
> > the error (and they become the new leaves gradually).
> > 
> > When the leaf to be converted is also called outside of
> > "hw/i386/kvm/pci-assign.c", the conversion keeps a compatibility
> > function under the original name, so that conversion of callers
> > unrelated to PCI assignment can be deferred.
> > 
> > Reviewers should copy the call graph to a text file, and mark, as the
> > series progresses, fully converted functions. (Ie. functions that now
> > report their terminating error messages with Error objects only.)
> > 
> >   assigned_initfn()
> >       error_report()
> >       get_real_device()
> >           monitor_handle_fd_param()
> >           error_report()
> >           get_real_vendor_id()
> >               get_real_id()
> >                   error_report()
> >           get_real_device_id()
> >               get_real_id()
> >                   error_report()
> >       assigned_device_pci_cap_init()
> >           check_irqchip_in_kernel()
> >               error_report()
> >           pci_add_capability()
> >           error_report()
> >       assigned_dev_register_msix_mmio()
> >           error_report()
> >       assigned_dev_register_regions()
> >           error_report()
> >       assign_device()
> >           error_report()
> >           assign_failed_examine()
> >               get_real_vendor_id()
> >                   get_real_id()
> >                       error_report()
> >               get_real_device_id()
> >                   get_real_id()
> >                       error_report()
> >               error_printf()
> >               error_report()
> >       assign_intx()
> >           check_irqchip_in_kernel()
> >               error_report()
> >           error_report()
> >           error_printf()
> > 
> > Laszlo Ersek (16):
> >   cutils: tighten qemu_parse_fd()
> >   monitor: add Error-propagating monitor_handle_fd_param2()
> >   pci-assign: accept Error from monitor_handle_fd_param2()
> >   pci-assign: make assign_failed_examine() just format the cause
> >   pci-assign: propagate errors from get_real_id()
> >   pci-assign: propagate Error from check_irqchip_in_kernel()
> >   pci: add Error-propagating pci_add_capability2()
> >   pci-assign: accept Error from pci_add_capability2()
> >   pci-assign: assignment should fail if we can't read config space
> >   pci-assign: propagate errors from get_real_device()
> >   pci-assign: propagate errors from assigned_device_pci_cap_init()
> >   pci-assign: propagate errors from assigned_dev_register_msix_mmio()
> >   pci-assign: propagate errors from assigned_dev_register_regions()
> >   pci-assign: propagate errors from assign_device()
> >   pci-assign: propagate errors from assign_intx()
> >   pci-assign: assigned_initfn(): set monitor error in common error
> >     handler
> > 
> >  include/hw/pci/pci.h      |   4 +
> >  include/monitor/monitor.h |   1 +
> >  hw/i386/kvm/pci-assign.c  | 273 ++++++++++++++++++++++++++++------------------
> >  hw/pci/pci.c              |  32 +++++-
> >  monitor.c                 |  29 ++++-
> >  util/cutils.c             |  13 ++-
> >  6 files changed, 232 insertions(+), 120 deletions(-)
> > 
> 
> I forgot to CC you on this.

Applied to the qmp branch, thanks.

> 
> Thanks
> Laszlo
> 

  parent reply	other threads:[~2014-05-07 14:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10  8:24 [Qemu-devel] [PATCH 00/16] PCI device assignment: improve error reporting over QMP Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 01/16] cutils: tighten qemu_parse_fd() Laszlo Ersek
2014-04-10 11:51   ` Eric Blake
2014-04-10  8:24 ` [Qemu-devel] [PATCH 02/16] monitor: add Error-propagating monitor_handle_fd_param2() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 03/16] pci-assign: accept Error from monitor_handle_fd_param2() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 04/16] pci-assign: make assign_failed_examine() just format the cause Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 05/16] pci-assign: propagate errors from get_real_id() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 06/16] pci-assign: propagate Error from check_irqchip_in_kernel() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 07/16] pci: add Error-propagating pci_add_capability2() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 08/16] pci-assign: accept Error from pci_add_capability2() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 09/16] pci-assign: assignment should fail if we can't read config space Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 10/16] pci-assign: propagate errors from get_real_device() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 11/16] pci-assign: propagate errors from assigned_device_pci_cap_init() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 12/16] pci-assign: propagate errors from assigned_dev_register_msix_mmio() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 13/16] pci-assign: propagate errors from assigned_dev_register_regions() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 14/16] pci-assign: propagate errors from assign_device() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 15/16] pci-assign: propagate errors from assign_intx() Laszlo Ersek
2014-04-10  8:24 ` [Qemu-devel] [PATCH 16/16] pci-assign: assigned_initfn(): set monitor error in common error handler Laszlo Ersek
     [not found]   ` <536034EB.5010400@redhat.com>
     [not found]     ` <53604550.1000202@redhat.com>
2014-05-07 13:52       ` Luiz Capitulino
2014-05-07 15:17         ` Laszlo Ersek
     [not found] ` <5360FF1D.6020300@redhat.com>
2014-05-07 13:52   ` Luiz Capitulino [this message]
2014-05-07 15:18     ` [Qemu-devel] [PATCH 00/16] PCI device assignment: improve error reporting over QMP Laszlo Ersek

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=20140507095209.02fc5377@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=lersek@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).