]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/ppc: clear pending_events on machine reset
authorDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Wed, 30 Aug 2017 18:21:40 +0000 (15:21 -0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 6 Dec 2017 17:00:55 +0000 (11:00 -0600)
commit0a5a2b938ab29ad80de43ed3548d4374dc612658
tree6f992ebae3a5e503cf20973584e2192d52d101f1
parent0bc76c8d0899f1f3a2bc5092ae9de7a900213a3b
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>
(cherry picked from commit 56258174238eb25df629a53a96e1ac16a32dc7d4)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/spapr.c
hw/ppc/spapr_events.c
include/hw/ppc/spapr.h