From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, jiri@resnulli.us, qemu-block@nongnu.org,
mst@redhat.com, jasowang@redhat.com, armbru@redhat.com,
keith.busch@intel.com, alex.williamson@redhat.com,
sfeldma@gmail.com, kraxel@redhat.com, dmitry@daynix.com,
pbonzini@redhat.com, jsnow@redhat.com, hare@suse.de
Subject: Re: [Qemu-devel] [PATCH RFC v2 0/2] MSI/MSIX: fix to catch and report errors
Date: Thu, 17 Dec 2015 16:02:35 +0800 [thread overview]
Message-ID: <56726C1B.50706@cn.fujitsu.com> (raw)
In-Reply-To: <1450176195-9066-1-git-send-email-caoj.fnst@cn.fujitsu.com>
Ping.
About cleanup:
1. When realize()/init() fail, PCI device will free the config space
memory, so the necessary cleanup I can find until now is: MemoryRegion
object. Maybe I missed something to cleanup, hope for comments.
2. certain instance: move the msi/msxi init func to the beginning of the
realize()/init() func, to avoid cleanup work.
@Markus: hope I didn`t miss anything you mentioned in last review;)
On 12/15/2015 06:43 PM, Cao jin wrote:
> msi_init() & msix_init() are supporting functions for PCI devices. catch the
> errors they produced and report.
>
> V2 changelog:
> 1. Modify as per Markus`s review
> a. Try to cleanup on function fail, as possible as I can.
> b. For .init() function, use error_report_err() and return non-zero value.
> c. For .realize(), propagate the error.
> d. Special case: TYPE_ICH9_AHCI, it is a on-board device initialized with
> machine init, so don`t bother to cleanup on failure, as process will exit
> anyway.
>
> Cao jin (2):
> Add param Error** to msi_init() & modify the callers
> Add param Error** to msix_init() & modify the callers
>
> hw/audio/intel-hda.c | 10 ++++-
> hw/block/nvme.c | 32 +++++++++-----
> hw/ide/ich.c | 2 +-
> hw/misc/ivshmem.c | 7 ++-
> hw/net/rocker/rocker.c | 10 +++--
> hw/net/vmxnet3.c | 39 +++++++++++------
> hw/pci-bridge/ioh3420.c | 7 ++-
> hw/pci-bridge/pci_bridge_dev.c | 8 +++-
> hw/pci-bridge/xio3130_downstream.c | 8 +++-
> hw/pci-bridge/xio3130_upstream.c | 8 +++-
> hw/pci/msi.c | 18 ++++++--
> hw/pci/msix.c | 20 ++++++---
> hw/scsi/megasas.c | 35 +++++++++++----
> hw/scsi/vmw_pvscsi.c | 13 ++++--
> hw/usb/hcd-xhci.c | 88 +++++++++++++++++++++-----------------
> hw/vfio/pci.c | 28 ++++++------
> hw/virtio/virtio-bus.c | 3 ++
> hw/virtio/virtio-pci.c | 64 +++++++++++++--------------
> include/hw/pci/msi.h | 4 +-
> include/hw/pci/msix.h | 5 ++-
> 20 files changed, 264 insertions(+), 145 deletions(-)
>
--
Yours Sincerely,
Cao Jin
prev parent reply other threads:[~2015-12-17 8:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 10:43 [Qemu-devel] [PATCH RFC v2 0/2] MSI/MSIX: fix to catch and report errors Cao jin
2015-12-15 10:43 ` [Qemu-devel] [PATCH RFC v2 1/2] Add param Error** to msi_init() & modify the callers Cao jin
2016-03-02 9:13 ` Markus Armbruster
2016-03-03 3:56 ` Cao jin
2016-03-03 10:12 ` Marcel Apfelbaum
2016-03-03 10:45 ` Michael S. Tsirkin
2016-03-03 11:19 ` Marcel Apfelbaum
2016-03-03 11:33 ` Michael S. Tsirkin
2016-03-03 15:03 ` Markus Armbruster
2016-03-03 18:33 ` Michael S. Tsirkin
2016-03-04 8:42 ` Markus Armbruster
2016-03-04 9:24 ` Michael S. Tsirkin
2016-03-04 12:57 ` Markus Armbruster
2016-03-04 13:10 ` Michael S. Tsirkin
2016-03-03 14:24 ` Markus Armbruster
2016-03-23 4:04 ` Cao jin
2016-03-23 8:12 ` Markus Armbruster
2016-03-23 9:23 ` Cao jin
2015-12-15 10:43 ` [Qemu-devel] [PATCH v2 RFC 2/2] Add param Error** to msix_init() " Cao jin
2015-12-17 8:02 ` Cao jin [this message]
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=56726C1B.50706@cn.fujitsu.com \
--to=caoj.fnst@cn.fujitsu.com \
--cc=alex.williamson@redhat.com \
--cc=armbru@redhat.com \
--cc=dmitry@daynix.com \
--cc=hare@suse.de \
--cc=jasowang@redhat.com \
--cc=jiri@resnulli.us \
--cc=jsnow@redhat.com \
--cc=keith.busch@intel.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sfeldma@gmail.com \
/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.