From: Alex Williamson <alex.williamson@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 1/3] vfio/pci: Report errors from qdev_unplug() via device request
Date: Thu, 23 Feb 2017 12:33:04 -0700 [thread overview]
Message-ID: <20170223193258.16909.52582.stgit@gimli.home> (raw)
In-Reply-To: <20170223193048.16909.25661.stgit@gimli.home>
Currently we ignore this error, report it with error_reportf_err()
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/vfio/pci.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 332f41d6627f..f2ba9b6cfafc 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -2506,12 +2506,16 @@ static void vfio_unregister_err_notifier(VFIOPCIDevice *vdev)
static void vfio_req_notifier_handler(void *opaque)
{
VFIOPCIDevice *vdev = opaque;
+ Error *err = NULL;
if (!event_notifier_test_and_clear(&vdev->req_notifier)) {
return;
}
- qdev_unplug(&vdev->pdev.qdev, NULL);
+ qdev_unplug(&vdev->pdev.qdev, &err);
+ if (err) {
+ error_reportf_err(err, WARN_PREFIX, vdev->vbasedev.name);
+ }
}
static void vfio_register_req_notifier(VFIOPCIDevice *vdev)
next prev parent reply other threads:[~2017-02-23 19:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 19:32 [Qemu-devel] [PULL 0/3] VFIO updates 2017-02-23 Alex Williamson
2017-02-23 19:33 ` Alex Williamson [this message]
2017-02-23 19:36 ` [Qemu-devel] [PULL 2/3] vfio/pci: Improve extended capability comments, skip masked caps Alex Williamson
2017-02-23 19:37 ` [Qemu-devel] [PULL 3/3] vfio/pci-quirks.c: Disable stolen memory for igd VFIO Alex Williamson
2017-02-24 18:34 ` [Qemu-devel] [PULL 0/3] VFIO updates 2017-02-23 Peter Maydell
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=20170223193258.16909.52582.stgit@gimli.home \
--to=alex.williamson@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).