* [net-next 5/5] PCI: disable FLR for 82579 device [not found] <1474612741-75681-1-git-send-email-jeffrey.t.kirsher@intel.com> @ 2016-09-23 6:39 ` Jeff Kirsher 2016-09-23 11:52 ` Sergei Shtylyov ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Jeff Kirsher @ 2016-09-23 6:39 UTC (permalink / raw) To: davem, bhelgaas Cc: Sasha Neftin, netdev, nhorman, sassmann, jogreene, guru.anbalagane, linux-pci, Jeff Kirsher From: Sasha Neftin <sasha.neftin@intel.com> 82579 has a problem reattaching itself after the device is detached. The bug was reported by Redhat. The suggested fix is to disable FLR capability in PCIe configuration space. Reproduction: Attach the device to a VM, then detach and try to attach again. Fix: Disable FLR capability to prevent the 82579 from hanging. Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> --- drivers/pci/quirks.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 44e0ff3..59fba6e 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -4431,3 +4431,24 @@ static void quirk_intel_qat_vf_cap(struct pci_dev *pdev) } } DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, quirk_intel_qat_vf_cap); +/* + * Workaround FLR issues for 82579 + * This code disables the FLR (Function Level Reset) via PCIe, in order + * to workaround a bug found while using device passthrough, where the + * interface would become non-responsive. + * NOTE: the FLR bit is Read/Write Once (RWO) in config space, so if + * the BIOS or kernel writes this register * then this workaround will + * not work. + */ +static void quirk_intel_flr_cap_dis(struct pci_dev *dev) +{ + int pos = pci_find_capability(dev, PCI_CAP_ID_AF); + if (pos) { + u8 cap; + pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); + cap = cap & (~PCI_AF_CAP_FLR); + pci_write_config_byte(dev, pos + PCI_AF_CAP, cap); + } +} +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_intel_flr_cap_dis); +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_intel_flr_cap_dis); -- 2.7.4 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [net-next 5/5] PCI: disable FLR for 82579 device 2016-09-23 6:39 ` [net-next 5/5] PCI: disable FLR for 82579 device Jeff Kirsher @ 2016-09-23 11:52 ` Sergei Shtylyov 2016-09-23 13:19 ` Alex Williamson 2016-09-23 14:01 ` Bjorn Helgaas 2 siblings, 0 replies; 11+ messages in thread From: Sergei Shtylyov @ 2016-09-23 11:52 UTC (permalink / raw) To: Jeff Kirsher, davem, bhelgaas Cc: Sasha Neftin, netdev, nhorman, sassmann, jogreene, guru.anbalagane, linux-pci Hello. On 9/23/2016 9:39 AM, Jeff Kirsher wrote: > From: Sasha Neftin <sasha.neftin@intel.com> > > 82579 has a problem reattaching itself after the device is detached. > The bug was reported by Redhat. The suggested fix is to disable > FLR capability in PCIe configuration space. > > Reproduction: > Attach the device to a VM, then detach and try to attach again. > > Fix: > Disable FLR capability to prevent the 82579 from hanging. > > Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> > Tested-by: Aaron Brown <aaron.f.brown@intel.com> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> > --- > drivers/pci/quirks.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > index 44e0ff3..59fba6e 100644 > --- a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > @@ -4431,3 +4431,24 @@ static void quirk_intel_qat_vf_cap(struct pci_dev *pdev) > } > } > DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, quirk_intel_qat_vf_cap); > +/* > + * Workaround FLR issues for 82579 > + * This code disables the FLR (Function Level Reset) via PCIe, in order > + * to workaround a bug found while using device passthrough, where the > + * interface would become non-responsive. > + * NOTE: the FLR bit is Read/Write Once (RWO) in config space, so if > + * the BIOS or kernel writes this register * then this workaround will ^ That asterisk shouldn't be there. > + * not work. > + */ > +static void quirk_intel_flr_cap_dis(struct pci_dev *dev) > +{ > + int pos = pci_find_capability(dev, PCI_CAP_ID_AF); Should be an empty line here... > + if (pos) { > + u8 cap; And here... > + pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); > + cap = cap & (~PCI_AF_CAP_FLR); () not needed. > + pci_write_config_byte(dev, pos + PCI_AF_CAP, cap); > + } > +} > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_intel_flr_cap_dis); > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_intel_flr_cap_dis); MBR, Sergei ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [net-next 5/5] PCI: disable FLR for 82579 device 2016-09-23 6:39 ` [net-next 5/5] PCI: disable FLR for 82579 device Jeff Kirsher 2016-09-23 11:52 ` Sergei Shtylyov @ 2016-09-23 13:19 ` Alex Williamson 2016-09-23 14:01 ` Bjorn Helgaas 2 siblings, 0 replies; 11+ messages in thread From: Alex Williamson @ 2016-09-23 13:19 UTC (permalink / raw) To: Jeff Kirsher Cc: davem, bhelgaas, Sasha Neftin, netdev, nhorman, sassmann, jogreene, guru.anbalagane, linux-pci On Thu, 22 Sep 2016 23:39:01 -0700 Jeff Kirsher <jeffrey.t.kirsher@intel.com> wrote: > From: Sasha Neftin <sasha.neftin@intel.com> > > 82579 has a problem reattaching itself after the device is detached. > The bug was reported by Redhat. The suggested fix is to disable > FLR capability in PCIe configuration space. > > Reproduction: > Attach the device to a VM, then detach and try to attach again. > > Fix: > Disable FLR capability to prevent the 82579 from hanging. > > Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> > Tested-by: Aaron Brown <aaron.f.brown@intel.com> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> > --- > drivers/pci/quirks.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > index 44e0ff3..59fba6e 100644 > --- a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > @@ -4431,3 +4431,24 @@ static void quirk_intel_qat_vf_cap(struct pci_dev *pdev) > } > } > DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, quirk_intel_qat_vf_cap); > +/* > + * Workaround FLR issues for 82579 > + * This code disables the FLR (Function Level Reset) via PCIe, in order > + * to workaround a bug found while using device passthrough, where the > + * interface would become non-responsive. > + * NOTE: the FLR bit is Read/Write Once (RWO) in config space, so if > + * the BIOS or kernel writes this register * then this workaround will > + * not work. > + */ > +static void quirk_intel_flr_cap_dis(struct pci_dev *dev) > +{ > + int pos = pci_find_capability(dev, PCI_CAP_ID_AF); > + if (pos) { > + u8 cap; > + pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); > + cap = cap & (~PCI_AF_CAP_FLR); > + pci_write_config_byte(dev, pos + PCI_AF_CAP, cap); > + } > +} > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_intel_flr_cap_dis); > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_intel_flr_cap_dis); This seems like a pretty fragile quirk since we're just hoping that the BIOS hasn't already written this byte. Should we at least re-read and warn if the write didn't take? What about using dev_flags or a device specific reset to make this less fragile? A device specific reset could pick the best reset mechanism for the device, ignoring AF FLR. Thanks, Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [net-next 5/5] PCI: disable FLR for 82579 device 2016-09-23 6:39 ` [net-next 5/5] PCI: disable FLR for 82579 device Jeff Kirsher 2016-09-23 11:52 ` Sergei Shtylyov 2016-09-23 13:19 ` Alex Williamson @ 2016-09-23 14:01 ` Bjorn Helgaas 2016-09-23 21:05 ` Jeff Kirsher 2 siblings, 1 reply; 11+ messages in thread From: Bjorn Helgaas @ 2016-09-23 14:01 UTC (permalink / raw) To: Jeff Kirsher Cc: davem, bhelgaas, Sasha Neftin, netdev, nhorman, sassmann, jogreene, guru.anbalagane, linux-pci On Thu, Sep 22, 2016 at 11:39:01PM -0700, Jeff Kirsher wrote: > From: Sasha Neftin <sasha.neftin@intel.com> > > 82579 has a problem reattaching itself after the device is detached. > The bug was reported by Redhat. The suggested fix is to disable > FLR capability in PCIe configuration space. > > Reproduction: > Attach the device to a VM, then detach and try to attach again. > > Fix: > Disable FLR capability to prevent the 82579 from hanging. Is there a bugzilla or other reference URL to include here? Should this be marked for stable? > Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> > Tested-by: Aaron Brown <aaron.f.brown@intel.com> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> > --- > drivers/pci/quirks.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > index 44e0ff3..59fba6e 100644 > --- a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > @@ -4431,3 +4431,24 @@ static void quirk_intel_qat_vf_cap(struct pci_dev *pdev) > } > } > DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, quirk_intel_qat_vf_cap); > +/* > + * Workaround FLR issues for 82579 > + * This code disables the FLR (Function Level Reset) via PCIe, in order > + * to workaround a bug found while using device passthrough, where the > + * interface would become non-responsive. > + * NOTE: the FLR bit is Read/Write Once (RWO) in config space, so if > + * the BIOS or kernel writes this register * then this workaround will > + * not work. This doesn't sound like a root cause. Is the issue a hardware erratum? Linux PCI core bug? VFIO bug? Device firmware bug? The changelog suggests that the problem only affects passthrough, which suggests some sort of kernel bug related to how passthrough is implemented. > + */ > +static void quirk_intel_flr_cap_dis(struct pci_dev *dev) > +{ > + int pos = pci_find_capability(dev, PCI_CAP_ID_AF); > + if (pos) { > + u8 cap; > + pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); > + cap = cap & (~PCI_AF_CAP_FLR); > + pci_write_config_byte(dev, pos + PCI_AF_CAP, cap); > + } > +} > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, quirk_intel_flr_cap_dis); > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, quirk_intel_flr_cap_dis); > -- > 2.7.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [net-next 5/5] PCI: disable FLR for 82579 device 2016-09-23 14:01 ` Bjorn Helgaas @ 2016-09-23 21:05 ` Jeff Kirsher 2016-09-25 7:02 ` Neftin, Sasha 0 siblings, 1 reply; 11+ messages in thread From: Jeff Kirsher @ 2016-09-23 21:05 UTC (permalink / raw) To: Bjorn Helgaas Cc: davem, bhelgaas, Sasha Neftin, netdev, nhorman, sassmann, jogreene, guru.anbalagane, linux-pci [-- Attachment #1: Type: text/plain, Size: 3107 bytes --] On Fri, 2016-09-23 at 09:01 -0500, Bjorn Helgaas wrote: > On Thu, Sep 22, 2016 at 11:39:01PM -0700, Jeff Kirsher wrote: > > > > From: Sasha Neftin <sasha.neftin@intel.com> > > > > 82579 has a problem reattaching itself after the device is detached. > > The bug was reported by Redhat. The suggested fix is to disable > > FLR capability in PCIe configuration space. > > > > Reproduction: > > Attach the device to a VM, then detach and try to attach again. > > > > Fix: > > Disable FLR capability to prevent the 82579 from hanging. > > Is there a bugzilla or other reference URL to include here? Should > this be marked for stable? So the author is in Israel, meaning it is their weekend now. I do not believe Sasha monitors email over the weekend, so a response to your questions won't happen for a few days. I tried searching my archives for more information, but had no luck finding any additional information. > > Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> > > Tested-by: Aaron Brown <aaron.f.brown@intel.com> > > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> > > --- > > drivers/pci/quirks.c | 21 +++++++++++++++++++++ > > 1 file changed, 21 insertions(+) > > > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > > index 44e0ff3..59fba6e 100644 > > --- a/drivers/pci/quirks.c > > +++ b/drivers/pci/quirks.c > > @@ -4431,3 +4431,24 @@ static void quirk_intel_qat_vf_cap(struct > > pci_dev *pdev) > > } > > } > > DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, > > quirk_intel_qat_vf_cap); > > +/* > > + * Workaround FLR issues for 82579 > > + * This code disables the FLR (Function Level Reset) via PCIe, in > > order > > + * to workaround a bug found while using device passthrough, where the > > + * interface would become non-responsive. > > + * NOTE: the FLR bit is Read/Write Once (RWO) in config space, so if > > + * the BIOS or kernel writes this register * then this workaround will > > + * not work. > > This doesn't sound like a root cause. Is the issue a hardware > erratum? Linux PCI core bug? VFIO bug? Device firmware bug? > > The changelog suggests that the problem only affects passthrough, > which suggests some sort of kernel bug related to how passthrough is > implemented. > > > > > + */ > > +static void quirk_intel_flr_cap_dis(struct pci_dev *dev) > > +{ > > + int pos = pci_find_capability(dev, PCI_CAP_ID_AF); > > + if (pos) { > > + u8 cap; > > + pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); > > + cap = cap & (~PCI_AF_CAP_FLR); > > + pci_write_config_byte(dev, pos + PCI_AF_CAP, cap); > > + } > > +} > > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, > > quirk_intel_flr_cap_dis); > > +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, > > quirk_intel_flr_cap_dis); > > -- > > 2.7.4 > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [net-next 5/5] PCI: disable FLR for 82579 device 2016-09-23 21:05 ` Jeff Kirsher @ 2016-09-25 7:02 ` Neftin, Sasha 2016-09-27 18:17 ` Bjorn Helgaas 0 siblings, 1 reply; 11+ messages in thread From: Neftin, Sasha @ 2016-09-25 7:02 UTC (permalink / raw) To: Jeff Kirsher, Bjorn Helgaas, linux-pci Cc: davem, bhelgaas, netdev, nhorman, sassmann, jogreene, guru.anbalagane On 9/24/2016 12:05 AM, Jeff Kirsher wrote: > On Fri, 2016-09-23 at 09:01 -0500, Bjorn Helgaas wrote: >> On Thu, Sep 22, 2016 at 11:39:01PM -0700, Jeff Kirsher wrote: >>> From: Sasha Neftin <sasha.neftin@intel.com> >>> >>> 82579 has a problem reattaching itself after the device is detached. >>> The bug was reported by Redhat. The suggested fix is to disable >>> FLR capability in PCIe configuration space. >>> >>> Reproduction: >>> Attach the device to a VM, then detach and try to attach again. >>> >>> Fix: >>> Disable FLR capability to prevent the 82579 from hanging. >> Is there a bugzilla or other reference URL to include here? Should >> this be marked for stable? > So the author is in Israel, meaning it is their weekend now. I do not > believe Sasha monitors email over the weekend, so a response to your > questions won't happen for a few days. > > I tried searching my archives for more information, but had no luck finding > any additional information. > >>> Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> >>> Tested-by: Aaron Brown <aaron.f.brown@intel.com> >>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> >>> --- >>> drivers/pci/quirks.c | 21 +++++++++++++++++++++ >>> 1 file changed, 21 insertions(+) >>> >>> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c >>> index 44e0ff3..59fba6e 100644 >>> --- a/drivers/pci/quirks.c >>> +++ b/drivers/pci/quirks.c >>> @@ -4431,3 +4431,24 @@ static void quirk_intel_qat_vf_cap(struct >>> pci_dev *pdev) >>> } >>> } >>> DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, >>> quirk_intel_qat_vf_cap); >>> +/* >>> + * Workaround FLR issues for 82579 >>> + * This code disables the FLR (Function Level Reset) via PCIe, in >>> order >>> + * to workaround a bug found while using device passthrough, where the >>> + * interface would become non-responsive. >>> + * NOTE: the FLR bit is Read/Write Once (RWO) in config space, so if >>> + * the BIOS or kernel writes this register * then this workaround will >>> + * not work. >> This doesn't sound like a root cause. Is the issue a hardware >> erratum? Linux PCI core bug? VFIO bug? Device firmware bug? >> >> The changelog suggests that the problem only affects passthrough, >> which suggests some sort of kernel bug related to how passthrough is >> implemented. >> >>> + */ >>> +static void quirk_intel_flr_cap_dis(struct pci_dev *dev) >>> +{ >>> + int pos = pci_find_capability(dev, PCI_CAP_ID_AF); >>> + if (pos) { >>> + u8 cap; >>> + pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); >>> + cap = cap & (~PCI_AF_CAP_FLR); >>> + pci_write_config_byte(dev, pos + PCI_AF_CAP, cap); >>> + } >>> +} >>> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, >>> quirk_intel_flr_cap_dis); >>> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, >>> quirk_intel_flr_cap_dis); >>> -- >>> 2.7.4 >>> >>> -- >>> To unsubscribe from this list: send the line "unsubscribe linux-pci" in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html Hello, Original bugzilla thread could be found here: https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=966840 This is our HW bug, exist only in 82579 devices. More new devices have no such problem. We have found root cause and suggested this solution. This solution should work for a 95% of cases, so I do not think that this is fragile. For another cases possible solution is get up working system and manually disable FLR, before VM start use our adapter. Thanks, Sasha ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [net-next 5/5] PCI: disable FLR for 82579 device 2016-09-25 7:02 ` Neftin, Sasha @ 2016-09-27 18:17 ` Bjorn Helgaas 2016-09-27 19:13 ` Alex Williamson 0 siblings, 1 reply; 11+ messages in thread From: Bjorn Helgaas @ 2016-09-27 18:17 UTC (permalink / raw) To: Neftin, Sasha Cc: Jeff Kirsher, linux-pci, davem, bhelgaas, netdev, nhorman, sassmann, jogreene, guru.anbalagane On Sun, Sep 25, 2016 at 10:02:43AM +0300, Neftin, Sasha wrote: > On 9/24/2016 12:05 AM, Jeff Kirsher wrote: > >On Fri, 2016-09-23 at 09:01 -0500, Bjorn Helgaas wrote: > >>On Thu, Sep 22, 2016 at 11:39:01PM -0700, Jeff Kirsher wrote: > >>>From: Sasha Neftin <sasha.neftin@intel.com> > >>> > >>>82579 has a problem reattaching itself after the device is detached. > >>>The bug was reported by Redhat. The suggested fix is to disable > >>>FLR capability in PCIe configuration space. > >>> > >>>Reproduction: > >>>Attach the device to a VM, then detach and try to attach again. > >>> > >>>Fix: > >>>Disable FLR capability to prevent the 82579 from hanging. > >>Is there a bugzilla or other reference URL to include here? Should > >>this be marked for stable? > >So the author is in Israel, meaning it is their weekend now. I do not > >believe Sasha monitors email over the weekend, so a response to your > >questions won't happen for a few days. > > > >I tried searching my archives for more information, but had no luck finding > >any additional information. > > > >>>Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> > >>>Tested-by: Aaron Brown <aaron.f.brown@intel.com> > >>>Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> > >>>--- > >>> drivers/pci/quirks.c | 21 +++++++++++++++++++++ > >>> 1 file changed, 21 insertions(+) > >>> > >>>diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > >>>index 44e0ff3..59fba6e 100644 > >>>--- a/drivers/pci/quirks.c > >>>+++ b/drivers/pci/quirks.c > >>>@@ -4431,3 +4431,24 @@ static void quirk_intel_qat_vf_cap(struct > >>>pci_dev *pdev) > >>> } > >>> } > >>> DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, > >>>quirk_intel_qat_vf_cap); > >>>+/* > >>>+ * Workaround FLR issues for 82579 > >>>+ * This code disables the FLR (Function Level Reset) via PCIe, in > >>>order > >>>+ * to workaround a bug found while using device passthrough, where the > >>>+ * interface would become non-responsive. > >>>+ * NOTE: the FLR bit is Read/Write Once (RWO) in config space, so if > >>>+ * the BIOS or kernel writes this register * then this workaround will > >>>+ * not work. > >>This doesn't sound like a root cause. Is the issue a hardware > >>erratum? Linux PCI core bug? VFIO bug? Device firmware bug? > >> > >>The changelog suggests that the problem only affects passthrough, > >>which suggests some sort of kernel bug related to how passthrough is > >>implemented. If this bug affects all scenarios, not just passthrough, the changelog should not mention passthrough. > >>>+ */ > >>>+static void quirk_intel_flr_cap_dis(struct pci_dev *dev) > >>>+{ > >>>+ int pos = pci_find_capability(dev, PCI_CAP_ID_AF); > >>>+ if (pos) { > >>>+ u8 cap; > >>>+ pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); > >>>+ cap = cap & (~PCI_AF_CAP_FLR); > >>>+ pci_write_config_byte(dev, pos + PCI_AF_CAP, cap); > >>>+ } > >>>+} > >>>+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, > >>>quirk_intel_flr_cap_dis); > >>>+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, > >>>quirk_intel_flr_cap_dis); > >>>-- > >>>2.7.4 > >>> > >>>-- > >>>To unsubscribe from this list: send the line "unsubscribe linux-pci" in > >>>the body of a message to majordomo@vger.kernel.org > >>>More majordomo info at http://vger.kernel.org/majordomo-info.html > > Hello, > > Original bugzilla thread could be found here: > https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=966840 That bugzilla is private and I can't read it. > This is our HW bug, exist only in 82579 devices. More new devices > have no such problem. We have found root cause and suggested this > solution. Is there an erratum you can reference? > This solution should work for a 95% of cases, so I do not > think that this is fragile. For another cases possible solution is > get up working system and manually disable FLR, before VM start use > our adapter. I don't think a 95% solution is sufficient. Can you use the pci_dev_specific_reset() framework to make a 100% solution? Bjorn ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [net-next 5/5] PCI: disable FLR for 82579 device 2016-09-27 18:17 ` Bjorn Helgaas @ 2016-09-27 19:13 ` Alex Williamson 2016-09-28 0:26 ` Alexander Duyck 0 siblings, 1 reply; 11+ messages in thread From: Alex Williamson @ 2016-09-27 19:13 UTC (permalink / raw) To: Bjorn Helgaas Cc: Neftin, Sasha, Jeff Kirsher, linux-pci, davem, bhelgaas, netdev, nhorman, sassmann, jogreene, guru.anbalagane On Tue, 27 Sep 2016 13:17:02 -0500 Bjorn Helgaas <helgaas@kernel.org> wrote: > On Sun, Sep 25, 2016 at 10:02:43AM +0300, Neftin, Sasha wrote: > > On 9/24/2016 12:05 AM, Jeff Kirsher wrote: > > >On Fri, 2016-09-23 at 09:01 -0500, Bjorn Helgaas wrote: > > >>On Thu, Sep 22, 2016 at 11:39:01PM -0700, Jeff Kirsher wrote: > > >>>From: Sasha Neftin <sasha.neftin@intel.com> > > >>> > > >>>82579 has a problem reattaching itself after the device is detached. > > >>>The bug was reported by Redhat. The suggested fix is to disable > > >>>FLR capability in PCIe configuration space. > > >>> > > >>>Reproduction: > > >>>Attach the device to a VM, then detach and try to attach again. > > >>> > > >>>Fix: > > >>>Disable FLR capability to prevent the 82579 from hanging. > > >>Is there a bugzilla or other reference URL to include here? Should > > >>this be marked for stable? > > >So the author is in Israel, meaning it is their weekend now. I do not > > >believe Sasha monitors email over the weekend, so a response to your > > >questions won't happen for a few days. > > > > > >I tried searching my archives for more information, but had no luck finding > > >any additional information. > > > > > >>>Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> > > >>>Tested-by: Aaron Brown <aaron.f.brown@intel.com> > > >>>Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> > > >>>--- > > >>> drivers/pci/quirks.c | 21 +++++++++++++++++++++ > > >>> 1 file changed, 21 insertions(+) > > >>> > > >>>diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > > >>>index 44e0ff3..59fba6e 100644 > > >>>--- a/drivers/pci/quirks.c > > >>>+++ b/drivers/pci/quirks.c > > >>>@@ -4431,3 +4431,24 @@ static void quirk_intel_qat_vf_cap(struct > > >>>pci_dev *pdev) > > >>> } > > >>> } > > >>> DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, > > >>>quirk_intel_qat_vf_cap); > > >>>+/* > > >>>+ * Workaround FLR issues for 82579 > > >>>+ * This code disables the FLR (Function Level Reset) via PCIe, in > > >>>order > > >>>+ * to workaround a bug found while using device passthrough, where the > > >>>+ * interface would become non-responsive. > > >>>+ * NOTE: the FLR bit is Read/Write Once (RWO) in config space, so if > > >>>+ * the BIOS or kernel writes this register * then this workaround will > > >>>+ * not work. > > >>This doesn't sound like a root cause. Is the issue a hardware > > >>erratum? Linux PCI core bug? VFIO bug? Device firmware bug? > > >> > > >>The changelog suggests that the problem only affects passthrough, > > >>which suggests some sort of kernel bug related to how passthrough is > > >>implemented. > > If this bug affects all scenarios, not just passthrough, the changelog > should not mention passthrough. > > > >>>+ */ > > >>>+static void quirk_intel_flr_cap_dis(struct pci_dev *dev) > > >>>+{ > > >>>+ int pos = pci_find_capability(dev, PCI_CAP_ID_AF); > > >>>+ if (pos) { > > >>>+ u8 cap; > > >>>+ pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); > > >>>+ cap = cap & (~PCI_AF_CAP_FLR); > > >>>+ pci_write_config_byte(dev, pos + PCI_AF_CAP, cap); > > >>>+ } > > >>>+} > > >>>+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, > > >>>quirk_intel_flr_cap_dis); > > >>>+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, > > >>>quirk_intel_flr_cap_dis); > > >>>-- > > >>>2.7.4 > > >>> > > >>>-- > > >>>To unsubscribe from this list: send the line "unsubscribe linux-pci" in > > >>>the body of a message to majordomo@vger.kernel.org > > >>>More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > Hello, > > > > Original bugzilla thread could be found here: > > https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=966840 > > That bugzilla is private and I can't read it. Hmm, I can, but I don't see anything in it that supports this. Is that really the right bz? It's the right hardware, but has all sorts of FUD about the version of various other components in the stack. > > This is our HW bug, exist only in 82579 devices. More new devices > > have no such problem. We have found root cause and suggested this > > solution. > > Is there an erratum you can reference? > > > This solution should work for a 95% of cases, so I do not > > think that this is fragile. For another cases possible solution is > > get up working system and manually disable FLR, before VM start use > > our adapter. > > I don't think a 95% solution is sufficient. Can you use the > pci_dev_specific_reset() framework to make a 100% solution? Right, plus when this does work I suspect it removes the one mechanism we have to reset the device, which depending on how obscure the failure scenario is, isn't a clear cut improvement for device assignment. Thanks, Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [net-next 5/5] PCI: disable FLR for 82579 device 2016-09-27 19:13 ` Alex Williamson @ 2016-09-28 0:26 ` Alexander Duyck 2016-09-28 15:33 ` Neftin, Sasha 0 siblings, 1 reply; 11+ messages in thread From: Alexander Duyck @ 2016-09-28 0:26 UTC (permalink / raw) To: Alex Williamson Cc: Bjorn Helgaas, Neftin, Sasha, Jeff Kirsher, linux-pci@vger.kernel.org, David Miller, Bjorn Helgaas, Netdev, Neil Horman, sassmann, John Greene, guru.anbalagane Since I worked with Sasha on this I will provide a bit of information from what I understand of this bug as well. On Tue, Sep 27, 2016 at 12:13 PM, Alex Williamson <alex.williamson@redhat.com> wrote: > On Tue, 27 Sep 2016 13:17:02 -0500 > Bjorn Helgaas <helgaas@kernel.org> wrote: > >> On Sun, Sep 25, 2016 at 10:02:43AM +0300, Neftin, Sasha wrote: >> > On 9/24/2016 12:05 AM, Jeff Kirsher wrote: >> > >On Fri, 2016-09-23 at 09:01 -0500, Bjorn Helgaas wrote: >> > >>On Thu, Sep 22, 2016 at 11:39:01PM -0700, Jeff Kirsher wrote: >> > >>>From: Sasha Neftin <sasha.neftin@intel.com> >> > >>> >> > >>>82579 has a problem reattaching itself after the device is detached= . >> > >>>The bug was reported by Redhat. The suggested fix is to disable >> > >>>FLR capability in PCIe configuration space. >> > >>> >> > >>>Reproduction: >> > >>>Attach the device to a VM, then detach and try to attach again. >> > >>> >> > >>>Fix: >> > >>>Disable FLR capability to prevent the 82579 from hanging. >> > >>Is there a bugzilla or other reference URL to include here? Should >> > >>this be marked for stable? >> > >So the author is in Israel, meaning it is their weekend now. I do no= t >> > >believe Sasha monitors email over the weekend, so a response to your >> > >questions won't happen for a few days. >> > > >> > >I tried searching my archives for more information, but had no luck f= inding >> > >any additional information. >> > > I agree that we do probably need to update the patch description since it isn't exactly clear what this is fixing or what was actually broken. >> > >>>Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> >> > >>>Tested-by: Aaron Brown <aaron.f.brown@intel.com> >> > >>>Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> >> > >>>--- >> > >>> drivers/pci/quirks.c | 21 +++++++++++++++++++++ >> > >>> 1 file changed, 21 insertions(+) >> > >>> >> > >>>diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c >> > >>>index 44e0ff3..59fba6e 100644 >> > >>>--- a/drivers/pci/quirks.c >> > >>>+++ b/drivers/pci/quirks.c >> > >>>@@ -4431,3 +4431,24 @@ static void quirk_intel_qat_vf_cap(struct >> > >>>pci_dev *pdev) >> > >>> } >> > >>> } >> > >>> DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, >> > >>>quirk_intel_qat_vf_cap); >> > >>>+/* >> > >>>+ * Workaround FLR issues for 82579 >> > >>>+ * This code disables the FLR (Function Level Reset) via PCIe, in >> > >>>order >> > >>>+ * to workaround a bug found while using device passthrough, where= the >> > >>>+ * interface would become non-responsive. >> > >>>+ * NOTE: the FLR bit is Read/Write Once (RWO) in config space, so = if >> > >>>+ * the BIOS or kernel writes this register * then this workaround = will >> > >>>+ * not work. >> > >>This doesn't sound like a root cause. Is the issue a hardware >> > >>erratum? Linux PCI core bug? VFIO bug? Device firmware bug? >> > >> >> > >>The changelog suggests that the problem only affects passthrough, >> > >>which suggests some sort of kernel bug related to how passthrough is >> > >>implemented. >> >> If this bug affects all scenarios, not just passthrough, the changelog >> should not mention passthrough. >> >> > >>>+ */ >> > >>>+static void quirk_intel_flr_cap_dis(struct pci_dev *dev) >> > >>>+{ >> > >>>+ int pos =3D pci_find_capability(dev, PCI_CAP_ID_AF); >> > >>>+ if (pos) { >> > >>>+ u8 cap; >> > >>>+ pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); >> > >>>+ cap =3D cap & (~PCI_AF_CAP_FLR); >> > >>>+ pci_write_config_byte(dev, pos + PCI_AF_CAP, cap); >> > >>>+ } >> > >>>+} >> > >>>+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, >> > >>>quirk_intel_flr_cap_dis); >> > >>>+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, >> > >>>quirk_intel_flr_cap_dis); >> > >>>-- >> > >>>2.7.4 >> > >>> >> > >>>-- >> > >>>To unsubscribe from this list: send the line "unsubscribe linux-pci= " in >> > >>>the body of a message to majordomo@vger.kernel.org >> > >>>More majordomo info at http://vger.kernel.org/majordomo-info.html >> > >> > Hello, >> > >> > Original bugzilla thread could be found here: >> > https://bugzilla.redhat.com/show_bug.cgi?format=3Dmultiple&id=3D966840 >> >> That bugzilla is private and I can't read it. > > Hmm, I can, but I don't see anything in it that supports this. Is that > really the right bz? It's the right hardware, but has all sorts of FUD > about the version of various other components in the stack. It looks like we had a local copy of the bugzilla saved here, though it only goes up to comment 13 which is where I think we started working this on our side. I believe what this patch is attempting to resolve is related to comment 8 where the driver returned "probe of 0000:00:19.0 failed with error =E2=80=902" instead of correctly probing the interface. So the bug as reported was that e1000e had a problem reattaching itself to the PHY after it was attached to a VM. Sasha, please feel free to correct me if I have this bit wrong. I had been told the problem was the FLR functionality wasn't fully implemented so that was why they were wanting to defeature it. I had assumed that there was support for a reset on D0->D3->D0, but I just realized that probably isn't the case since it looks like my local system sets the NoSoftRST bit. >> > This is our HW bug, exist only in 82579 devices. More new devices >> > have no such problem. We have found root cause and suggested this >> > solution. >> >> Is there an erratum you can reference? >> >> > This solution should work for a 95% of cases, so I do not >> > think that this is fragile. For another cases possible solution is >> > get up working system and manually disable FLR, before VM start use >> > our adapter. >> >> I don't think a 95% solution is sufficient. Can you use the >> pci_dev_specific_reset() framework to make a 100% solution? I can try working with Sasha on this to see what we can do. > Right, plus when this does work I suspect it removes the one mechanism > we have to reset the device, which depending on how obscure the failure > scenario is, isn't a clear cut improvement for device assignment. > Thanks, > > Alex I'll work with Sasha to see what we can do. Odds are there is some sort of problem between the MAC/PHY that needs to be resolved when we perform the function level reset so we will probably need to add code so that we reset the part and re-establish the link with the PHY after the reset. - Alex ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [net-next 5/5] PCI: disable FLR for 82579 device 2016-09-28 0:26 ` Alexander Duyck @ 2016-09-28 15:33 ` Neftin, Sasha 2016-09-28 16:26 ` Bjorn Helgaas 0 siblings, 1 reply; 11+ messages in thread From: Neftin, Sasha @ 2016-09-28 15:33 UTC (permalink / raw) To: Alexander Duyck, Alex Williamson, Duyck, Alexander H, Ruinskiy, Dima, Avargil, Raanan, Neftin, Sasha Cc: Bjorn Helgaas, Kirsher, Jeffrey T, linux-pci@vger.kernel.org, David Miller, Bjorn Helgaas, Netdev, Neil Horman, sassmann@redhat.com, John Greene, guru.anbalagane@oracle.com DQpTaW5jZSBJIHdvcmtlZCB3aXRoIFNhc2hhIG9uIHRoaXMgSSB3aWxsIHByb3ZpZGUgYSBiaXQg b2YgaW5mb3JtYXRpb24gZnJvbSB3aGF0IEkgdW5kZXJzdGFuZCBvZiB0aGlzIGJ1ZyBhcyB3ZWxs Lg0KDQpPbiBUdWUsIFNlcCAyNywgMjAxNiBhdCAxMjoxMyBQTSwgQWxleCBXaWxsaWFtc29uIDxh bGV4LndpbGxpYW1zb25AcmVkaGF0LmNvbT4gd3JvdGU6DQo+IE9uIFR1ZSwgMjcgU2VwIDIwMTYg MTM6MTc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sIHNvIHByb2JhYmx5IHRoZSB3b3JrYXJvdW5kIHdp bGwgd29yayBjbG9zZSB0byAxMDAlLiBBbHNvLCBJIHdvdWxkIGxpa2UgdG8gYWRkIHRoYXQgd2Ug aGF2ZSBydW4gbG90cyBvZiB0ZXN0cyBvdmVyIDgyNTc5IGluIG91ciBsYWIgYW5kIGVuc3VyZWQg dGhhdCBhbGwgZmxvd3Mgd29yayBwcm9wZXJseS4NCg0KMi4gRDAtPkQzLUQwIGZsb3cgaXMgbm90 IGFmZmVjdGVkIGFuZCBpcyBpbiBmYWN0IHN1cHBvcnRlZCBieSA4MjU3OS4NCg0KMy4gSSB3aWxs IGxvb2sgZm9yIGFuIGVycmF0dW0gZXhwbGFpbmluZyB0aGlzLg0KDQpUaGFua3MsDQpTYXNoYQ0K DQoNCg0KDQoNCg== ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [net-next 5/5] PCI: disable FLR for 82579 device 2016-09-28 15:33 ` Neftin, Sasha @ 2016-09-28 16:26 ` Bjorn Helgaas 0 siblings, 0 replies; 11+ messages in thread From: Bjorn Helgaas @ 2016-09-28 16:26 UTC (permalink / raw) To: Neftin, Sasha Cc: Alexander Duyck, Alex Williamson, Duyck, Alexander H, Ruinskiy, Dima, Avargil, Raanan, Kirsher, Jeffrey T, linux-pci@vger.kernel.org, David Miller, Bjorn Helgaas, Netdev, Neil Horman, sassmann@redhat.com, John Greene, guru.anbalagane@oracle.com On Wed, Sep 28, 2016 at 03:33:52PM +0000, Neftin, Sasha wrote: > > Since I worked with Sasha on this I will provide a bit of information from what I understand of this bug as well. > > On Tue, Sep 27, 2016 at 12:13 PM, Alex Williamson <alex.williamson@redhat.com> wrote: > > On Tue, 27 Sep 2016 13:17:02 -0500 > > Bjorn Helgaas <helgaas@kernel.org> wrote: > > > >> On Sun, Sep 25, 2016 at 10:02:43AM +0300, Neftin, Sasha wrote: > >> > On 9/24/2016 12:05 AM, Jeff Kirsher wrote: > >> > >On Fri, 2016-09-23 at 09:01 -0500, Bjorn Helgaas wrote: > >> > >>On Thu, Sep 22, 2016 at 11:39:01PM -0700, Jeff Kirsher wrote: > >> > >>>From: Sasha Neftin <sasha.neftin@intel.com> > >> > >>> > >> > >>>82579 has a problem reattaching itself after the device is detached. > >> > >>>The bug was reported by Redhat. The suggested fix is to disable > >> > >>>FLR capability in PCIe configuration space. > >> > >>> > >> > >>>Reproduction: > >> > >>>Attach the device to a VM, then detach and try to attach again. > >> > >>> > >> > >>>Fix: > >> > >>>Disable FLR capability to prevent the 82579 from hanging. > >> > >>Is there a bugzilla or other reference URL to include here? > >> > >>Should this be marked for stable? > >> > >So the author is in Israel, meaning it is their weekend now. I do > >> > >not believe Sasha monitors email over the weekend, so a response > >> > >to your questions won't happen for a few days. > >> > > > >> > >I tried searching my archives for more information, but had no > >> > >luck finding any additional information. > >> > > > > I agree that we do probably need to update the patch description since it isn't exactly clear what this is fixing or what was actually broken. > > >> > >>>Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> > >> > >>>Tested-by: Aaron Brown <aaron.f.brown@intel.com> > >> > >>>Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> > >> > >>>--- > >> > >>> drivers/pci/quirks.c | 21 +++++++++++++++++++++ > >> > >>> 1 file changed, 21 insertions(+) > >> > >>> > >> > >>>diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index > >> > >>>44e0ff3..59fba6e 100644 > >> > >>>--- a/drivers/pci/quirks.c > >> > >>>+++ b/drivers/pci/quirks.c > >> > >>>@@ -4431,3 +4431,24 @@ static void quirk_intel_qat_vf_cap(struct > >> > >>>pci_dev *pdev) > >> > >>> } > >> > >>> } > >> > >>> DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x443, > >> > >>>quirk_intel_qat_vf_cap); > >> > >>>+/* > >> > >>>+ * Workaround FLR issues for 82579 > >> > >>>+ * This code disables the FLR (Function Level Reset) via PCIe, > >> > >>>+in > >> > >>>order > >> > >>>+ * to workaround a bug found while using device passthrough, > >> > >>>+ where the > >> > >>>+ * interface would become non-responsive. > >> > >>>+ * NOTE: the FLR bit is Read/Write Once (RWO) in config space, > >> > >>>+ so if > >> > >>>+ * the BIOS or kernel writes this register * then this > >> > >>>+ workaround will > >> > >>>+ * not work. > >> > >>This doesn't sound like a root cause. Is the issue a hardware > >> > >>erratum? Linux PCI core bug? VFIO bug? Device firmware bug? > >> > >> > >> > >>The changelog suggests that the problem only affects passthrough, > >> > >>which suggests some sort of kernel bug related to how passthrough > >> > >>is implemented. > >> > >> If this bug affects all scenarios, not just passthrough, the > >> changelog should not mention passthrough. > >> > >> > >>>+ */ > >> > >>>+static void quirk_intel_flr_cap_dis(struct pci_dev *dev) { > >> > >>>+ int pos = pci_find_capability(dev, PCI_CAP_ID_AF); > >> > >>>+ if (pos) { > >> > >>>+ u8 cap; > >> > >>>+ pci_read_config_byte(dev, pos + PCI_AF_CAP, &cap); > >> > >>>+ cap = cap & (~PCI_AF_CAP_FLR); > >> > >>>+ pci_write_config_byte(dev, pos + PCI_AF_CAP, cap); > >> > >>>+ } > >> > >>>+} > >> > >>>+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1502, > >> > >>>quirk_intel_flr_cap_dis); > >> > >>>+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x1503, > >> > >>>quirk_intel_flr_cap_dis); > >> > >>>-- > >> > >>>2.7.4 > >> > >>> > >> > >>>-- > >> > >>>To unsubscribe from this list: send the line "unsubscribe > >> > >>>linux-pci" in the body of a message to majordomo@vger.kernel.org > >> > >>>More majordomo info at > >> > >>>http://vger.kernel.org/majordomo-info.html > >> > > >> > Hello, > >> > > >> > Original bugzilla thread could be found here: > >> > https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=966840 > >> > >> That bugzilla is private and I can't read it. > > > > Hmm, I can, but I don't see anything in it that supports this. Is > > that really the right bz? It's the right hardware, but has all sorts > > of FUD about the version of various other components in the stack. > > It looks like we had a local copy of the bugzilla saved here, though it only goes up to comment 13 which is where I think we started working this on our side. I believe what this patch is attempting to resolve is related to comment 8 where the driver returned "probe of > 0000:00:19.0 failed with error ‐2" instead of correctly probing the interface. > > So the bug as reported was that e1000e had a problem reattaching itself to the PHY after it was attached to a VM. Sasha, please feel free to correct me if I have this bit wrong. I had been told the problem was the FLR functionality wasn't fully implemented so that was why they were wanting to defeature it. I had assumed that there was support for a reset on D0->D3->D0, but I just realized that probably isn't the case since it looks like my local system sets the NoSoftRST bit. > > >> > This is our HW bug, exist only in 82579 devices. More new devices > >> > have no such problem. We have found root cause and suggested this > >> > solution. > >> > >> Is there an erratum you can reference? > >> > >> > This solution should work for a 95% of cases, so I do not think > >> > that this is fragile. For another cases possible solution is get up > >> > working system and manually disable FLR, before VM start use our > >> > adapter. > >> > >> I don't think a 95% solution is sufficient. Can you use the > >> pci_dev_specific_reset() framework to make a 100% solution? > > I can try working with Sasha on this to see what we can do. > > > Right, plus when this does work I suspect it removes the one mechanism > > we have to reset the device, which depending on how obscure the > > failure scenario is, isn't a clear cut improvement for device assignment. > > Thanks, > > > > Alex > > I'll work with Sasha to see what we can do. Odds are there is some sort of problem between the MAC/PHY that needs to be resolved when we perform the function level reset so we will probably need to add code so that we reset the part and re-establish the link with the PHY after the reset. > > - Alex > > > Hello, > I would like clarify a few points. > > 1. 82579 client devices do not support functional level reset (FLR). > Unfortunately, it advertises FLR capability - this is a bug. So, > when VM software even accidentally tries to access FLR, that causes > our device to hang. To eliminate this problem we decided to disable > FLR via drivers/pci/quirks.c That makes sense. To me, the problem is that writing the AF capability to disable FLR is unreliable. We can't tell whether BIOS has already written it, and there's no way to debug the corner cases where BIOS *has* written it and the device doesn't reset correctly. Maybe it is in fact weird for a BIOS to write that, and the corner case will never arise. But I have no way of knowing that, and I don't like making assumptions about what a BIOS will or won't do. Here are two ideas: 1) Implement a device-specific reset quirk. The problem here is that you'd have to duplicate the body of __pci_dev_reset(), omitting the pcie_flr() and pci_af_flr() calls. This might be a maintenance issue because future changes to __pci_dev_reset() should also be made to the quirk. 2) Add some sort of "broken_flr_reset" bit in struct pci_dev, set it with a quirk, and change pci_af_flr() to return -ENOTTY when it is set. > In previous e-mail I wrote that the solution should work for a 95% of cases. Cases where it might not work if BIOS writes FLR capability before the OS (In 82579 device FLR capability is RWO - read write once). But this is a very weird scenario, so probably the workaround will work close to 100%. Also, I would like to add that we have run lots of tests over 82579 in our lab and ensured that all flows work properly. > > 2. D0->D3-D0 flow is not affected and is in fact supported by 82579. > > 3. I will look for an erratum explaining this. > > Thanks, > Sasha > > > > > ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-09-28 16:26 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1474612741-75681-1-git-send-email-jeffrey.t.kirsher@intel.com> 2016-09-23 6:39 ` [net-next 5/5] PCI: disable FLR for 82579 device Jeff Kirsher 2016-09-23 11:52 ` Sergei Shtylyov 2016-09-23 13:19 ` Alex Williamson 2016-09-23 14:01 ` Bjorn Helgaas 2016-09-23 21:05 ` Jeff Kirsher 2016-09-25 7:02 ` Neftin, Sasha 2016-09-27 18:17 ` Bjorn Helgaas 2016-09-27 19:13 ` Alex Williamson 2016-09-28 0:26 ` Alexander Duyck 2016-09-28 15:33 ` Neftin, Sasha 2016-09-28 16:26 ` Bjorn Helgaas
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).