[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 02/11] util/vfio-helpers: Let qemu_vfio_verify_mappings() use
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 02/11] util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report() |
Date: |
Thu, 2 Sep 2021 09:00:16 +0200 |
Instead of displaying the error on stderr, use error_report()
which also report to the monitor.
Reviewed-by: Fam Zheng <fam@euphon.net>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
util/vfio-helpers.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c
index 911115b86e6..1d149136299 100644
--- a/util/vfio-helpers.c
+++ b/util/vfio-helpers.c
@@ -660,13 +660,13 @@ static bool qemu_vfio_verify_mappings(QEMUVFIOState *s)
if (QEMU_VFIO_DEBUG) {
for (i = 0; i < s->nr_mappings - 1; ++i) {
if (!(s->mappings[i].host < s->mappings[i + 1].host)) {
- fprintf(stderr, "item %d not sorted!\n", i);
+ error_report("item %d not sorted!", i);
qemu_vfio_dump_mappings(s);
return false;
}
if (!(s->mappings[i].host + s->mappings[i].size <=
s->mappings[i + 1].host)) {
- fprintf(stderr, "item %d overlap with next!\n", i);
+ error_report("item %d overlap with next!", i);
qemu_vfio_dump_mappings(s);
return false;
}
--
2.31.1
- [PATCH v3 00/11] block/nvme: Rework error reporting, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 01/11] block/nvme: Use safer trace format string, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 02/11] util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report(),
Philippe Mathieu-Daudé <=
- [PATCH v3 03/11] util/vfio-helpers: Replace qemu_mutex_lock() calls with QEMU_LOCK_GUARD, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 04/11] util/vfio-helpers: Remove unreachable code in qemu_vfio_dma_map(), Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 05/11] block/nvme: Have nvme_create_queue_pair() report errors consistently, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 06/11] util/vfio-helpers: Pass Error handle to qemu_vfio_dma_map(), Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 07/11] util/vfio-helpers: Extract qemu_vfio_water_mark_reached(), Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 08/11] util/vfio-helpers: Use error_setg in qemu_vfio_find_[fixed/temp]_iova, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 09/11] util/vfio-helpers: Simplify qemu_vfio_dma_map() returning directly, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 10/11] util/vfio-helpers: Let qemu_vfio_do_mapping() propagate Error, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH v3 11/11] block/nvme: Only report VFIO error on failed retry, Philippe Mathieu-Daudé, 2021/09/02