aboutsummaryrefslogtreecommitdiff
path: root/hw/remote
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-08-27 09:57:28 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-08-27 09:57:28 +0100
commit0289f62335b2af49f6c30296cc00d009995b35f6 (patch)
tree02681ec7cfe183e7db19e53785acd4dd69e37f00 /hw/remote
parentf214d8e0150766c31172e16ef4b17674f549d852 (diff)
parentf9dfae9cb6b27649085f662a863f6167650402e0 (diff)
downloadqemu-0289f62335b2af49f6c30296cc00d009995b35f6.zip
qemu-0289f62335b2af49f6c30296cc00d009995b35f6.tar.gz
qemu-0289f62335b2af49f6c30296cc00d009995b35f6.tar.bz2
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2021-08-26' into staging
Error reporting patches for 2021-08-26 # gpg: Signature made Thu 26 Aug 2021 16:17:05 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-error-2021-08-26: vl: Clean up -smp error handling Remove superfluous ERRP_GUARD() vhost: Clean up how VhostOpts method vhost_backend_init() fails vhost: Clean up how VhostOpts method vhost_get_config() fails microvm: Drop dead error handling in microvm_machine_state_init() migration: Handle migration_incoming_setup() errors consistently migration: Unify failure check for migrate_add_blocker() whpx nvmm: Drop useless migrate_del_blocker() vfio: Avoid error_propagate() after migrate_add_blocker() i386: Never free migration blocker objects instead of sometimes vhost-scsi: Plug memory leak on migrate_add_blocker() failure multi-process: Fix pci_proxy_dev_realize() error handling spapr: Explain purpose of ->fwnmi_migration_blocker more clearly spapr: Plug memory leak when we can't add a migration blocker error: Use error_fatal to simplify obvious fatal errors (again) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/remote')
-rw-r--r--hw/remote/mpqemu-link.c3
-rw-r--r--hw/remote/proxy.c10
2 files changed, 9 insertions, 4 deletions
diff --git a/hw/remote/mpqemu-link.c b/hw/remote/mpqemu-link.c
index e67a5de..7e84182 100644
--- a/hw/remote/mpqemu-link.c
+++ b/hw/remote/mpqemu-link.c
@@ -34,7 +34,6 @@
*/
bool mpqemu_msg_send(MPQemuMsg *msg, QIOChannel *ioc, Error **errp)
{
- ERRP_GUARD();
bool iolock = qemu_mutex_iothread_locked();
bool iothread = qemu_in_iothread();
struct iovec send[2] = {};
@@ -97,7 +96,6 @@ bool mpqemu_msg_send(MPQemuMsg *msg, QIOChannel *ioc, Error **errp)
static ssize_t mpqemu_read(QIOChannel *ioc, void *buf, size_t len, int **fds,
size_t *nfds, Error **errp)
{
- ERRP_GUARD();
struct iovec iov = { .iov_base = buf, .iov_len = len };
bool iolock = qemu_mutex_iothread_locked();
bool iothread = qemu_in_iothread();
@@ -192,7 +190,6 @@ fail:
uint64_t mpqemu_msg_send_and_await_reply(MPQemuMsg *msg, PCIProxyDev *pdev,
Error **errp)
{
- ERRP_GUARD();
MPQemuMsg msg_reply = {0};
uint64_t ret = UINT64_MAX;
diff --git a/hw/remote/proxy.c b/hw/remote/proxy.c
index 6dda705..499f540 100644
--- a/hw/remote/proxy.c
+++ b/hw/remote/proxy.c
@@ -102,10 +102,18 @@ static void pci_proxy_dev_realize(PCIDevice *device, Error **errp)
}
dev->ioc = qio_channel_new_fd(fd, errp);
+ if (!dev->ioc) {
+ close(fd);
+ return;
+ }
error_setg(&dev->migration_blocker, "%s does not support migration",
TYPE_PCI_PROXY_DEV);
- migrate_add_blocker(dev->migration_blocker, errp);
+ if (migrate_add_blocker(dev->migration_blocker, errp) < 0) {
+ error_free(dev->migration_blocker);
+ object_unref(dev->ioc);
+ return;
+ }
qemu_mutex_init(&dev->io_mutex);
qio_channel_set_blocking(dev->ioc, true, NULL);