[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 2/3] spapr/pci: Free MSIs during reset
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-ppc] [PATCH 2/3] spapr/pci: Free MSIs during reset |
Date: |
Fri, 26 Jul 2019 16:56:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 26/07/2019 16:44, Greg Kurz wrote:
> 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.
This is fixing the reset bug.
Reviewed-by: Cédric Le Goater <address@hidden>
Thanks,
C.
>
> Signed-off-by: Greg Kurz <address@hidden>
> ---
> hw/ppc/spapr_pci.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> index bc22568bfa71..e45507bf2b53 100644
> --- a/hw/ppc/spapr_pci.c
> +++ b/hw/ppc/spapr_pci.c
> @@ -2078,6 +2078,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[] = {
>