From: Eric Blake <eblake@redhat.com>
To: Daniel Henrique Barboza <danielhb413@gmail.com>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH v1 1/1] spapr_pci: remove all child functions in function zero unplug
Date: Thu, 22 Aug 2019 16:11:45 -0500 [thread overview]
Message-ID: <63a2fef4-3e9d-5dfc-9ccb-2924bb1fe808@redhat.com> (raw)
In-Reply-To: <20190822195918.3307-1-danielhb413@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1516 bytes --]
On 8/22/19 2:59 PM, Daniel Henrique Barboza wrote:
> There is nothing wrong with how sPAPR handles multifunction PCI
> hot unplugs. The problem is that x86 does it simpler. Instead of
> removing each non-zero function and then removing function zero,
> x86 can remove any function of the slot to trigger the hot unplug.
>
> +++ b/hw/ppc/spapr_pci.c
> @@ -1700,11 +1700,13 @@ static void spapr_pci_unplug_request(HotplugHandler *plug_handler,
> state = func_drck->dr_entity_sense(func_drc);
> if (state == SPAPR_DR_ENTITY_SENSE_PRESENT
> && !spapr_drc_unplug_requested(func_drc)) {
> - error_setg(errp,
> - "PCI: slot %d, function %d still present. "
> - "Must unplug all non-0 functions first.",
> - slotnr, i);
> - return;
> + /*
> + * Attempting to remove function 0 of a multifunction
> + * device will will cascade into removing all child
> + * functions, even if their unplug weren't requested
s/weren't/wasn't/
> + * beforehand.
> + */
> + spapr_drc_detach(func_drc);
> }
> }
> }
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-08-22 21:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 19:59 [Qemu-devel] [PATCH v1 1/1] spapr_pci: remove all child functions in function zero unplug Daniel Henrique Barboza
2019-08-22 21:11 ` Eric Blake [this message]
2019-08-23 5:29 ` David Gibson
2019-08-23 5:31 ` 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=63a2fef4-3e9d-5dfc-9ccb-2924bb1fe808@redhat.com \
--to=eblake@redhat.com \
--cc=danielhb413@gmail.com \
--cc=david@gibson.dropbear.id.au \
--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).