qemu-e2k/hw/ppc
Greg Kurz a4e3a7c02b spapr: Improve spapr_reallocate_hpt() error reporting
spapr_reallocate_hpt() has three users, two of which pass &error_fatal
and the third one, htab_load(), passes &local_err, uses it to detect
failures and simply propagates -EINVAL up to vmstate_load(), which will
cause QEMU to exit. It is thus confusing that spapr_reallocate_hpt()
doesn't return right away when an error is detected in some cases. Also,
the comment suggesting that the caller is welcome to try to carry on
seems like a remnant in this respect.

This can be improved:
- change spapr_reallocate_hpt() to always report a negative errno on
  failure, either as reported by KVM or -ENOSPC if the HPT is smaller
  than what was asked,
- use that to detect failures in htab_load() which is preferred over
  checking &local_err,
- propagate this negative errno to vmstate_load() because it is more
  accurate than propagating -EINVAL for all possible errors.

[dwg: Fix compile error due to omitted prelim patch]
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <160371605460.305923.5890143959901241157.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-10-28 01:08:53 +11:00
..
e500-ccsr.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
e500.c ppc/e500: Use start-powered-off CPUState property 2020-09-08 10:08:43 +10:00
e500.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
e500plat.c
fdt.c
fw_cfg.c
Kconfig
mac_newworld.c mac_newworld: Allow loading binary ROM image 2020-10-19 08:11:21 +01:00
mac_oldworld.c mac_oldworld: Change PCI address of macio to match real hardware 2020-10-19 08:11:21 +01:00
mac.h mac_newworld: Allow loading binary ROM image 2020-10-19 08:11:21 +01:00
meson.build ppc: introducing spapr_numa.c NUMA code helper 2020-09-08 10:08:43 +10:00
mpc8544_guts.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
mpc8544ds.c
pnv_bmc.c
pnv_core.c
pnv_homer.c
pnv_lpc.c
pnv_occ.c
pnv_pnor.c
pnv_psi.c
pnv_xscom.c
pnv.c ppc/pnv: Increase max firmware size 2020-10-09 10:15:06 +11:00
ppc4xx_devs.c
ppc4xx_pci.c Pull request trivial patches 20200919 2020-09-22 15:42:23 +01:00
ppc405_boards.c ppc405_boards: use qdev properties instead of legacy m48t59_init() function 2020-10-18 16:21:42 +01:00
ppc405_uc.c
ppc405.h
ppc440_bamboo.c load_elf: Remove unused address variables from callers 2020-09-25 16:52:08 -07:00
ppc440_pcix.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
ppc440_uc.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
ppc440.h
ppc_booke.c
ppc.c
ppce500_spin.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
prep_systemio.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
prep.c
rs6000_mc.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
sam460ex.c load_elf: Remove unused address variables from callers 2020-09-25 16:52:08 -07:00
spapr_caps.c spapr: Add a return value to spapr_check_pagesize() 2020-10-09 10:15:06 +11:00
spapr_cpu_core.c spapr: Simplify spapr_cpu_core_realize() and spapr_cpu_core_unrealize() 2020-10-28 01:08:53 +11:00
spapr_drc.c spapr: Clarify why DR connectors aren't user creatable 2020-10-28 01:08:53 +11:00
spapr_events.c ppc/spapr: re-assert IRQs during event-scan if there are pending 2020-10-28 01:08:53 +11:00
spapr_hcall.c spapr: Simplify error handling in do_client_architecture_support() 2020-10-09 10:15:06 +11:00
spapr_iommu.c
spapr_irq.c
spapr_numa.c spapr_numa: consider user input when defining associativity 2020-10-09 15:06:11 +11:00
spapr_nvdimm.c spapr: Simplify error handling in spapr_memory_plug() 2020-10-28 01:08:53 +11:00
spapr_ovec.c
spapr_pci_nvlink2.c spapr_numa: move NVLink2 associativity handling to spapr_numa.c 2020-09-08 10:08:43 +10:00
spapr_pci_vfio.c
spapr_pci.c hw/pci: Fix typo in PCI hot-plug error message 2020-10-13 13:33:45 +02:00
spapr_rng.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
spapr_rtas_ddw.c
spapr_rtas.c
spapr_rtc.c
spapr_tpm_proxy.c
spapr_vio.c spapr: Simplify error handling in spapr_vio_busdev_realize() 2020-10-09 10:15:06 +11:00
spapr.c spapr: Improve spapr_reallocate_hpt() error reporting 2020-10-28 01:08:53 +11:00
trace-events trace-events: Fix attribution of trace points to source 2020-09-09 17:17:58 +01:00
trace.h
virtex_ml507.c load_elf: Remove unused address variables from callers 2020-09-25 16:52:08 -07:00