]> git.proxmox.com Git - mirror_qemu.git/commit
spapr/pci: Consolidate de-allocation of MSIs
authorGreg Kurz <groug@kaod.org>
Fri, 26 Jul 2019 14:44:38 +0000 (16:44 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 21 Aug 2019 07:17:39 +0000 (17:17 +1000)
commit078eb6b05b7f962e43d8bc376e0b96cdd550c17a
treec02351efced0a2c3c32dc0a7a38b2872c79f6411
parent1e8f51e856621d3615a21cfea6f0baf055cbcce8
spapr/pci: Consolidate de-allocation of MSIs

When freeing MSIs, we need to:
- remove them from the machine's MSI bitmap
- remove them from the IC backend
- remove them from the PHB's MSI cache

This is currently open coded in two places in rtas_ibm_change_msi(),
and we're about to need this in spapr_phb_reset() as well. Instead of
duplicating this code again, make it a destroy function for the PHB's
MSI cache. Removing an MSI device from the cache will call the destroy
function internally.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <156415227855.1064338.5657793835271464648.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr_pci.c