[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/28] pseries: Clean up error reporting in htab migr
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 18/28] pseries: Clean up error reporting in htab migration functions |
Date: |
Mon, 25 Jan 2016 12:15:17 +1100 |
The functions for migrating the hash page table on pseries machine type
(htab_save_setup() and htab_load()) can report some errors with an
explicit fprintf() before returning an appropriate error code. Change some
of these to use error_report() instead. htab_save_setup() is omitted for
now to avoid conflicts with some other in-progress work.
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
---
hw/ppc/spapr.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 4d88a29..5df9274 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1533,7 +1533,7 @@ static int htab_load(QEMUFile *f, void *opaque, int
version_id)
int fd = -1;
if (version_id < 1 || version_id > 1) {
- fprintf(stderr, "htab_load() bad version\n");
+ error_report("htab_load() bad version");
return -EINVAL;
}
@@ -1554,8 +1554,8 @@ static int htab_load(QEMUFile *f, void *opaque, int
version_id)
fd = kvmppc_get_htab_fd(true);
if (fd < 0) {
- fprintf(stderr, "Unable to open fd to restore KVM hash table:
%s\n",
- strerror(errno));
+ error_report("Unable to open fd to restore KVM hash table: %s",
+ strerror(errno));
}
}
@@ -1575,9 +1575,9 @@ static int htab_load(QEMUFile *f, void *opaque, int
version_id)
if ((index + n_valid + n_invalid) >
(HTAB_SIZE(spapr) / HASH_PTE_SIZE_64)) {
/* Bad index in stream */
- fprintf(stderr, "htab_load() bad index %d (%hd+%hd entries) "
- "in htab stream (htab_shift=%d)\n", index, n_valid,
n_invalid,
- spapr->htab_shift);
+ error_report(
+ "htab_load() bad index %d (%hd+%hd entries) in htab stream
(htab_shift=%d)",
+ index, n_valid, n_invalid, spapr->htab_shift);
return -EINVAL;
}
--
2.5.0
- [Qemu-devel] [PULL 13/28] pseries: Clean up error handling in spapr_validate_node_memory(), (continued)
- [Qemu-devel] [PULL 13/28] pseries: Clean up error handling in spapr_validate_node_memory(), David Gibson, 2016/01/24
- [Qemu-devel] [PULL 06/28] cuda: add missing fields to VMStateDescription, David Gibson, 2016/01/24
- [Qemu-devel] [PULL 03/28] macio: use the existing IDEDMA aiocb to hold the active DMA aiocb, David Gibson, 2016/01/24
- [Qemu-devel] [PULL 07/28] spapr: Small fixes to rtas_ibm_get_system_parameter, remove rtas_st_buffer, David Gibson, 2016/01/24
- [Qemu-devel] [PULL 05/28] mac_dbdma: add DBDMA controller state to VMStateDescription, David Gibson, 2016/01/24
- [Qemu-devel] [PULL 02/28] target-ppc: use cpu_write_xer() helper in cpu_post_load, David Gibson, 2016/01/24
- [Qemu-devel] [PULL 11/28] ppc: Clean up error handling in ppc_set_compat(), David Gibson, 2016/01/24
- [Qemu-devel] [PULL 10/28] spapr: Don't create ibm, dynamic-reconfiguration-memory w/o DR LMBs, David Gibson, 2016/01/24
- [Qemu-devel] [PULL 08/28] spapr: Remove rtas_st_buffer_direct(), David Gibson, 2016/01/24
- [Qemu-devel] [PULL 19/28] target-ppc: kvm: fix floating point registers sync on little-endian hosts, David Gibson, 2016/01/24
- [Qemu-devel] [PULL 18/28] pseries: Clean up error reporting in htab migration functions,
David Gibson <=
- [Qemu-devel] [PULL 20/28] target-ppc: rename and export maybe_bswap_register(), David Gibson, 2016/01/24
- [Qemu-devel] [PULL 26/28] pseries: Allow TCG h_enter to work with hotplugged memory, David Gibson, 2016/01/24
- [Qemu-devel] [PULL 01/28] target-ppc: Use sensible POWER8/POWER8E versions, David Gibson, 2016/01/24
- [Qemu-devel] [PULL 15/28] pseries: Clean up error handling in spapr_rtas_register(), David Gibson, 2016/01/24
- [Qemu-devel] [PULL 14/28] pseries: Clean up error handling in spapr_vga_init(), David Gibson, 2016/01/24
- [Qemu-devel] [PULL 21/28] target-ppc: gdbstub: fix float registers for little-endian guests, David Gibson, 2016/01/24