aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr.c
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>2017-08-30 15:21:40 -0300
committerDavid Gibson <david@gibson.dropbear.id.au>2017-09-08 09:30:54 +1000
commit56258174238eb25df629a53a96e1ac16a32dc7d4 (patch)
treea3a0b0cdb41cf2146fc7da1803cf4debb2f859bd /hw/ppc/spapr.c
parentc618e300eb2276996e7004100686768cf1445128 (diff)
downloadqemu-56258174238eb25df629a53a96e1ac16a32dc7d4.zip
qemu-56258174238eb25df629a53a96e1ac16a32dc7d4.tar.gz
qemu-56258174238eb25df629a53a96e1ac16a32dc7d4.tar.bz2
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 'hw/ppc/spapr.c')
-rw-r--r--hw/ppc/spapr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index cec441c..0e5f29d 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1392,6 +1392,7 @@ static void ppc_spapr_reset(void)
}
qemu_devices_reset();
+ spapr_clear_pending_events(spapr);
/*
* We place the device tree and RTAS just below either the top of the RMA,