qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Greg Kurz <groug@kaod.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	"Cédric Le Goater" <clg@kaod.org>
Subject: Re: [Qemu-devel] [PATCH 2/3] spapr/pci: Free MSIs during reset
Date: Sun, 28 Jul 2019 17:06:39 +1000	[thread overview]
Message-ID: <20190728070639.GD5110@umbus> (raw)
In-Reply-To: <156415228410.1064338.4486161194061636096.stgit@bahia.lan>

[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]

On Fri, Jul 26, 2019 at 04:44:44PM +0200, 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.
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>

Applied to ppc-for-4.2, thanks.

> ---
>  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[] = {
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2019-07-28  7:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26 14:44 [Qemu-devel] [PATCH 0/3] spapr/pci: Improve MSI tracking Greg Kurz
2019-07-26 14:44 ` [Qemu-devel] [PATCH 1/3] spapr/pci: Consolidate de-allocation of MSIs Greg Kurz
2019-07-26 14:56   ` Cédric Le Goater
2019-07-28  1:54   ` David Gibson
2019-07-26 14:44 ` [Qemu-devel] [PATCH 2/3] spapr/pci: Free MSIs during reset Greg Kurz
2019-07-26 14:56   ` Cédric Le Goater
2019-07-26 16:17   ` Philippe Mathieu-Daudé
2019-07-26 17:04     ` Greg Kurz
2019-07-28  7:06   ` David Gibson [this message]
2019-07-26 14:44 ` [Qemu-devel] [PATCH 3/3] spapr/irq: Drop spapr_irq_msi_reset() Greg Kurz
2019-07-26 15:01   ` Cédric Le Goater
2019-07-26 15:06     ` Greg Kurz
2019-07-28  7:07   ` David Gibson
2019-07-28  1:51 ` [Qemu-devel] [PATCH 0/3] spapr/pci: Improve MSI tracking David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190728070639.GD5110@umbus \
    --to=david@gibson.dropbear.id.au \
    --cc=clg@kaod.org \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).