diff options
author | Steve Sistare <steven.sistare@oracle.com> | 2024-02-22 09:28:27 -0800 |
---|---|---|
committer | Peter Xu <peterx@redhat.com> | 2024-02-28 11:31:28 +0800 |
commit | be19d836cdd7855ffdb9a48299f5892dea3a1f67 (patch) | |
tree | 8a9551b3c672c547aeafee721d1c6b0588490e65 /hw/virtio | |
parent | c9a7e83c9d64fd5ebc759186789e1b753c919d32 (diff) | |
download | qemu-be19d836cdd7855ffdb9a48299f5892dea3a1f67.zip qemu-be19d836cdd7855ffdb9a48299f5892dea3a1f67.tar.gz qemu-be19d836cdd7855ffdb9a48299f5892dea3a1f67.tar.bz2 |
notify: pass error to notifier with return
Pass an error object as the third parameter to "notifier with return"
notifiers, so clients no longer need to bundle an error object in the
opaque data. The new parameter is used in a later patch.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/1708622920-68779-2-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r-- | hw/virtio/vhost-user.c | 2 | ||||
-rw-r--r-- | hw/virtio/virtio-balloon.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index f214df8..f502345 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -2084,7 +2084,7 @@ static int vhost_user_postcopy_end(struct vhost_dev *dev, Error **errp) } static int vhost_user_postcopy_notifier(NotifierWithReturn *notifier, - void *opaque) + void *opaque, Error **errp) { struct PostcopyNotifyData *pnd = opaque; struct vhost_user *u = container_of(notifier, struct vhost_user, diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 486fe3d..89f853f 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -633,7 +633,8 @@ static void virtio_balloon_free_page_done(VirtIOBalloon *s) } static int -virtio_balloon_free_page_hint_notify(NotifierWithReturn *n, void *data) +virtio_balloon_free_page_hint_notify(NotifierWithReturn *n, void *data, + Error **errp) { VirtIOBalloon *dev = container_of(n, VirtIOBalloon, free_page_hint_notify); VirtIODevice *vdev = VIRTIO_DEVICE(dev); |