[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 4/4] pcie: don't assert when hotplug a PCIe d
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH v5 4/4] pcie: don't assert when hotplug a PCIe device with 'function != 0' |
Date: |
Wed, 3 Sep 2014 16:48:26 +0300 |
On Tue, Sep 02, 2014 at 08:03:08PM +0800, address@hidden wrote:
> From: Gonglei <address@hidden>
>
> It's enough to report an error. Assert() is not acceptable
> because the error is not a fatal error.
>
> Signed-off-by: Gonglei <address@hidden>
I think it's an unrelated issue, don't send this
as part of a bugfix qdev patchset pls.
> ---
> hw/pci/pcie.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
> index 1babddf..ab7f8a2 100644
> --- a/hw/pci/pcie.c
> +++ b/hw/pci/pcie.c
> @@ -254,7 +254,11 @@ void pcie_cap_slot_hotplug_cb(HotplugHandler
> *hotplug_dev, DeviceState *dev,
> * Right now, only a device of function = 0 is allowed to be
> * hot plugged/unplugged.
> */
> - assert(PCI_FUNC(pci_dev->devfn) == 0);
> + if (PCI_FUNC(pci_dev->devfn) != 0) {
> + error_setg(errp, "Unsupported device function %d for PCIe
> hotplugging, "
> + "only supported function 0", PCI_FUNC(pci_dev->devfn));
> + return;
> + }
>
> pci_word_test_and_set_mask(exp_cap + PCI_EXP_SLTSTA,
> PCI_EXP_SLTSTA_PDS);
> --
> 1.7.12.4
>
- [Qemu-devel] [PATCH v5 0/4] Refactor device_set_realized to avoid resource leak., arei.gonglei, 2014/09/02
- [Qemu-devel] [PATCH v5 3/4] qdev: add cleanup logic in device_set_realized() to avoid resource leak, arei.gonglei, 2014/09/02
- [Qemu-devel] [PATCH v5 1/4] qdev: using error_abort instead of using local_err, arei.gonglei, 2014/09/02
- [Qemu-devel] [PATCH v5 2/4] qdev: using NULL instead of local_err for qbus_child unrealize, arei.gonglei, 2014/09/02
- [Qemu-devel] [PATCH v5 4/4] pcie: don't assert when hotplug a PCIe device with 'function != 0', arei.gonglei, 2014/09/02
- Re: [Qemu-devel] [PATCH v5 4/4] pcie: don't assert when hotplug a PCIe device with 'function != 0',
Michael S. Tsirkin <=
- Re: [Qemu-devel] [PATCH v5 0/4] Refactor device_set_realized to avoid resource leak., Michael S. Tsirkin, 2014/09/02