From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Liu Ping Fan <kernelfans@gmail.com>, qemu-devel@nongnu.org
Cc: Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] spapr: pci: clean msi info when releasing it
Date: Wed, 07 May 2014 17:20:29 +1000 [thread overview]
Message-ID: <5369DEBD.40306@ozlabs.ru> (raw)
In-Reply-To: <1399445471-23682-1-git-send-email-pingfank@linux.vnet.ibm.com>
On 05/07/2014 04:51 PM, Liu Ping Fan wrote:
> In current code, we use phb->msi_table[ndev].nvec to indicate whether
> this msi entries are used by a device or not. So when unplug a pci
> device, we should reset nvec to zero.
>
> Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
> ---
> hw/ppc/spapr_pci.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> index cbef095..7b1dfe1 100644
> --- a/hw/ppc/spapr_pci.c
> +++ b/hw/ppc/spapr_pci.c
> @@ -316,6 +316,7 @@ static void rtas_ibm_change_msi(PowerPCCPU *cpu, sPAPREnvironment *spapr,
> rtas_st(rets, 0, RTAS_OUT_HW_ERROR);
> return;
> }
> + phb->msi_table[ndev].nvec = 0;
> trace_spapr_pci_msi("Released MSIs", ndev, config_addr);
> rtas_st(rets, 0, RTAS_OUT_SUCCESS);
> rtas_st(rets, 1, 0);
ibm,change-msi is called with 0 to disable MSIs. If later the guest decides
to reenable MSI on the same device (rmmod + modprobe in the guest can do
that I suppose), new block will be allocated because of this patch which is
bad.
And there is no PCI hotplug for SPAPR in upstream QEMU so this patch cannot
possibly fix it :)
--
Alexey
next prev parent reply other threads:[~2014-05-07 7:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 6:51 [Qemu-devel] [PATCH] spapr: pci: clean msi info when releasing it Liu Ping Fan
2014-05-07 7:20 ` Alexey Kardashevskiy [this message]
2014-05-09 7:04 ` liu ping fan
2014-05-09 8:44 ` Alexey Kardashevskiy
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=5369DEBD.40306@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=agraf@suse.de \
--cc=kernelfans@gmail.com \
--cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.