[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 18/39] pseries: Clean up error reporting in htab migrat
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 18/39] pseries: Clean up error reporting in htab migration functions |
Date: |
Fri, 29 Jan 2016 16:06:50 +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 f8404d3..a9c9a95 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-ppc] [PULL 16/39] pseries: Clean up error handling in xics_system_init(), (continued)
- [Qemu-ppc] [PULL 16/39] pseries: Clean up error handling in xics_system_init(), David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 17/39] pseries: Clean up error reporting in ppc_spapr_init(), David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 12/39] pseries: Clean up error handling of spapr_cpu_init(), David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 07/39] spapr: Small fixes to rtas_ibm_get_system_parameter, remove rtas_st_buffer, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 08/39] spapr: Remove rtas_st_buffer_direct(), David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 19/39] target-ppc: kvm: fix floating point registers sync on little-endian hosts, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 39/39] target-ppc: Make every FPSCR_ macro have a corresponding FP_ macro, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 31/39] target-ppc: Rework ppc_store_slb, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 35/39] target-ppc: Split 44x tlbiva from ppc_tlb_invalidate_one(), David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 29/39] target-ppc: Remove unused kvmppc_read_segment_page_sizes() stub, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 18/39] pseries: Clean up error reporting in htab migration functions,
David Gibson <=
- [Qemu-ppc] [PULL 24/39] target-ppc: gdbstub: fix spe registers for little-endian guests, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 38/39] target-ppc: Allow more page sizes for POWER7 & POWER8 in TCG, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 36/39] target-ppc: Add new TLB invalidate by HPTE call for hash64 MMUs, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 30/39] target-ppc: Convert mmu-hash{32, 64}.[ch] from CPUPPCState to PowerPCCPU, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 03/39] macio: use the existing IDEDMA aiocb to hold the active DMA aiocb, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 06/39] cuda: add missing fields to VMStateDescription, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 01/39] target-ppc: Use sensible POWER8/POWER8E versions, David Gibson, 2016/01/29
- [Qemu-ppc] [PULL 15/39] pseries: Clean up error handling in spapr_rtas_register(), David Gibson, 2016/01/29