qemu-e2k/hw/ppc
Greg Kurz a005b3ef50 xics: report errors with the QEMU Error API
Using the return value to report errors is error prone:
- xics_alloc() returns -1 on error but spapr_vio_busdev_realize() errors
  on 0
- xics_alloc_block() returns the unclear value of ics->offset - 1 on error
  but both rtas_ibm_change_msi() and spapr_phb_realize() error on 0

This patch adds an errp argument to xics_alloc() and xics_alloc_block() to
report errors. The return value of these functions is a valid IRQ number
if errp is NULL. It is undefined otherwise.

The corresponding error traces get promotted to error messages. Note that
the "can't allocate IRQ" error message in spapr_vio_busdev_realize() also
moves to xics_alloc(). Similar error message consolidation isn't really
applicable to xics_alloc_block() because callers have extra context (device
config address, MSI or MSIX).

This fixes the issues mentioned above.

Based on previous work from Brian W. Hart.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-02-28 16:19:02 +11:00
..
e500-ccsr.h
e500.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
e500.h
e500plat.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
mac_newworld.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
mac_oldworld.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
mac.h cuda: port SET_DEVICE_LIST command to new framework 2016-02-17 09:59:30 +11:00
Makefile.objs
mpc8544_guts.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
mpc8544ds.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc4xx_devs.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc4xx_pci.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc405_boards.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc405_uc.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc405.h
ppc440_bamboo.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc_booke.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppce500_spin.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
prep.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
spapr_drc.c qapi: Drop unused error argument for list and implicit struct 2016-02-08 17:29:57 +01:00
spapr_events.c xics: report errors with the QEMU Error API 2016-02-28 16:19:02 +11:00
spapr_hcall.c hw/ppc/spapr: Implement the h_page_init hypercall 2016-02-25 13:58:44 +11:00
spapr_iommu.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
spapr_pci_vfio.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
spapr_pci.c xics: report errors with the QEMU Error API 2016-02-28 16:19:02 +11:00
spapr_rng.c spapr_rng: disable hotpluggability 2016-02-28 16:19:02 +11:00
spapr_rtas.c hw/ppc/spapr: Halt CPU when powering off via RTAS call 2016-02-18 11:08:43 +11:00
spapr_rtc.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
spapr_vio.c xics: report errors with the QEMU Error API 2016-02-28 16:19:02 +11:00
spapr.c spapr: skip configuration section during migration of older machines 2016-02-28 16:19:02 +11:00
virtex_ml507.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00