From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>,
aik@ozlabs.ru, groug@kaod.org
Cc: qemu-ppc@nongnu.org, clg@kaod.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] spapr: Don't allow unplug of NVLink2 devices
Date: Tue, 31 Mar 2020 09:56:41 +0200 [thread overview]
Message-ID: <abfad294-aef3-9750-7bc7-e15006659f79@redhat.com> (raw)
In-Reply-To: <20200331032709.112476-1-david@gibson.dropbear.id.au>
On 3/31/20 5:27 AM, David Gibson wrote:
> Currently, we can't properly handle unplug of NVLink2 devices, because we
> don't have code to tear down their special memory resources. There's not
> a lot of impetus to implement that: since hardware NVLink2 devices can't
> be hot unplugged, the guest side drivers don't usually support unplug
> anyway.
>
> Therefore, simply prevent unplug of NVLink2 devices.
Safe for 5.0, right?
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> hw/ppc/spapr_pci.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> index 55ca9dee1e..61b84a392d 100644
> --- a/hw/ppc/spapr_pci.c
> +++ b/hw/ppc/spapr_pci.c
> @@ -1665,6 +1665,10 @@ static void spapr_pci_unplug_request(HotplugHandler *plug_handler,
> error_setg(errp, "PCI: Hot unplug of PCI bridges not supported");
> return;
> }
> + if (object_property_get_uint(OBJECT(pdev), "nvlink2-tgt", NULL)) {
> + error_setg(errp, "PCI: Cannot unplug NVLink2 devices");
> + return;
> + }
>
> /* ensure any other present functions are pending unplug */
> if (PCI_FUNC(pdev->devfn) == 0) {
>
next prev parent reply other threads:[~2020-03-31 7:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 3:27 [PATCH] spapr: Don't allow unplug of NVLink2 devices David Gibson
2020-03-31 5:11 ` Alexey Kardashevskiy
2020-03-31 7:56 ` Philippe Mathieu-Daudé [this message]
2020-03-31 10:30 ` 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=abfad294-aef3-9750-7bc7-e15006659f79@redhat.com \
--to=philmd@redhat.com \
--cc=aik@ozlabs.ru \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--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).