[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH v1 1/1] spapr_pci: remove all child f
From: |
Eric Blake |
Subject: |
Re: [Qemu-ppc] [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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
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
signature.asc
Description: OpenPGP digital signature