summaryrefslogtreecommitdiffstats
path: root/hw/ppc/spapr_pci.c
diff options
context:
space:
mode:
authorGreg Kurz2019-07-26 16:44:44 +0200
committerDavid Gibson2019-08-21 09:17:39 +0200
commitea52074d3a1c5fbe70f3014dc1b1f2e7d5ced5de (patch)
treefd96234fde82c0a7dc754397b9f8401bdd0df075 /hw/ppc/spapr_pci.c
parentspapr/pci: Consolidate de-allocation of MSIs (diff)
downloadqemu-ea52074d3a1c5fbe70f3014dc1b1f2e7d5ced5de.tar.gz
qemu-ea52074d3a1c5fbe70f3014dc1b1f2e7d5ced5de.tar.xz
qemu-ea52074d3a1c5fbe70f3014dc1b1f2e7d5ced5de.zip
spapr/pci: Free MSIs during reset
When the machine is reset, the MSI bitmap is cleared but the allocated MSIs are not freed. Some operating systems, such as AIX, can detect the previous configuration and assert. Empty the MSI cache, this performs the needed cleanup. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <156415228410.1064338.4486161194061636096.stgit@bahia.lan> Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_pci.c')
-rw-r--r--hw/ppc/spapr_pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 6e6b4d0f60..deb0b0c80c 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -2080,6 +2080,8 @@ static void spapr_phb_reset(DeviceState *qdev)
if (spapr_phb_eeh_available(SPAPR_PCI_HOST_BRIDGE(qdev))) {
spapr_phb_vfio_reset(qdev);
}
+
+ g_hash_table_remove_all(sphb->msi);
}
static Property spapr_phb_properties[] = {