[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/16] util/vfio-helpers: Let qemu_vfio_verify_mappings() use err
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 12/16] util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report() |
Date: |
Tue, 20 Oct 2020 19:24:24 +0200 |
Instead of displaying the error on stderr, use error_report()
which also report to the monitor.
Reviewed-by: Fam Zheng <fam@euphon.net>
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 fb180becc4f..874d76c2a2a 100644
--- a/util/vfio-helpers.c
+++ b/util/vfio-helpers.c
@@ -691,13 +691,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.26.2
- [PATCH 07/16] util/vfio-helpers: Trace where BARs are mapped, (continued)
- [PATCH 07/16] util/vfio-helpers: Trace where BARs are mapped, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 08/16] util/vfio-helpers: Improve DMA trace events, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 09/16] util/vfio-helpers: Convert vfio_dump_mapping to trace events, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 10/16] util/vfio-helpers: Let qemu_vfio_dma_map() propagate Error, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 11/16] util/vfio-helpers: Let qemu_vfio_do_mapping() propagate Error, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 12/16] util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report(),
Philippe Mathieu-Daudé <=
- [PATCH 13/16] util/vfio-helpers: Introduce qemu_vfio_pci_msix_init_irqs(), Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 15/16] block/nvme: Switch to using the MSIX API, Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 14/16] util/vfio-helpers: Introduce qemu_vfio_pci_msix_set_irq(), Philippe Mathieu-Daudé, 2020/10/20
- [PATCH 16/16] util/vfio-helpers: Remove now unused qemu_vfio_pci_init_irq(), Philippe Mathieu-Daudé, 2020/10/20