diff options
author | Daniel Henrique Barboza | 2017-08-30 20:21:40 +0200 |
---|---|---|
committer | David Gibson | 2017-09-08 01:30:54 +0200 |
commit | 56258174238eb25df629a53a96e1ac16a32dc7d4 (patch) | |
tree | a3a0b0cdb41cf2146fc7da1803cf4debb2f859bd /include/hw/ppc/spapr.h | |
parent | hw/ppc/spapr_drc.c: change spapr_drc_needed to use drc->dev (diff) | |
download | qemu-56258174238eb25df629a53a96e1ac16a32dc7d4.tar.gz qemu-56258174238eb25df629a53a96e1ac16a32dc7d4.tar.xz qemu-56258174238eb25df629a53a96e1ac16a32dc7d4.zip |
hw/ppc: clear pending_events on machine reset
The sPAPR machine isn't clearing up the pending events QTAILQ on
machine reboot. This allows for unprocessed hotplug/epow events
to persist in the queue after reset and, when reasserting the IRQs in
check_exception later on, these will be being processed by the OS.
This patch implements a new function called 'spapr_clear_pending_events'
that clears up the pending_events QTAILQ. This helper is then called
inside ppc_spapr_reset to clear up the events queue, preventing
old/deprecated events from persisting after a reset.
Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc/spapr.h')
-rw-r--r-- | include/hw/ppc/spapr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 2a303a705c..5d161ec580 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -662,6 +662,7 @@ void spapr_cpu_parse_features(sPAPRMachineState *spapr); int spapr_hpt_shift_for_ramsize(uint64_t ramsize); void spapr_reallocate_hpt(sPAPRMachineState *spapr, int shift, Error **errp); +void spapr_clear_pending_events(sPAPRMachineState *spapr); /* CPU and LMB DRC release callbacks. */ void spapr_core_release(DeviceState *dev); |