diff options
| author | Cédric Le Goater <clg@redhat.com> | 2024-05-16 14:46:50 +0200 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2024-05-16 16:59:19 +0200 |
| commit | 836bb308685007ca7cccb891ec213a33f478af18 (patch) | |
| tree | 84529ebf954d8c38e718cd6139353097d56a0edd /hw/vfio/container.c | |
| parent | 85ef20f1673feaa083f4acab8cf054df77b0dbed (diff) | |
| download | focaccia-qemu-836bb308685007ca7cccb891ec213a33f478af18.tar.gz focaccia-qemu-836bb308685007ca7cccb891ec213a33f478af18.zip | |
vfio: Add Error** argument to .set_dirty_page_tracking() handler
We will use the Error object to improve error reporting in the .log_global*() handlers of VFIO. Add documentation while at it. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Avihai Horon <avihaih@nvidia.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/container.c')
| -rw-r--r-- | hw/vfio/container.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 77bdec276e..c35221fbe7 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -209,7 +209,7 @@ static int vfio_legacy_dma_map(const VFIOContainerBase *bcontainer, hwaddr iova, static int vfio_legacy_set_dirty_page_tracking(const VFIOContainerBase *bcontainer, - bool start) + bool start, Error **errp) { const VFIOContainer *container = container_of(bcontainer, VFIOContainer, bcontainer); @@ -227,8 +227,8 @@ vfio_legacy_set_dirty_page_tracking(const VFIOContainerBase *bcontainer, ret = ioctl(container->fd, VFIO_IOMMU_DIRTY_PAGES, &dirty); if (ret) { ret = -errno; - error_report("Failed to set dirty tracking flag 0x%x errno: %d", - dirty.flags, errno); + error_setg_errno(errp, errno, "Failed to set dirty tracking flag 0x%x", + dirty.flags); } return ret; |