diff for duplicates of <20160825180935.GD11257@localhost> diff --git a/a/1.txt b/N1/1.txt index 89faafd..b1a3b7d 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,34 +1,29 @@ On Thu, Aug 25, 2016 at 04:53:19AM +0000, Po Liu wrote: > > -----Original Message----- -> > From: Bjorn Helgaas [mailto:helgaas@kernel.org] +> > From: Bjorn Helgaas [mailto:helgaas at kernel.org] > > Sent: Thursday, August 25, 2016 4:51 AM > > To: Po Liu -> > Cc: linux-pci@vger.kernel.org; Roy Zang; Arnd Bergmann; Stuart Yoder; -> > Yang-Leo Li; linux-arm-kernel@lists.infradead.org; Bjorn Helgaas; -> > Mingkai Hu; Ley Foon Tan; Michal Simek; S=F6ren Brinkmann; Jingoo Han; +> > Cc: linux-pci at vger.kernel.org; Roy Zang; Arnd Bergmann; Stuart Yoder; +> > Yang-Leo Li; linux-arm-kernel at lists.infradead.org; Bjorn Helgaas; +> > Mingkai Hu; Ley Foon Tan; Michal Simek; S?ren Brinkmann; Jingoo Han; > > Pratyush Anand > > Subject: Re: [PATCH v1] arm64:pci: fix the IOV device enabled crash > > issue in designware -> > = - -> > [+cc Jingoo, Pratyush, Michal, S=F6ren, Ley] -> > = - +> > +> > [+cc Jingoo, Pratyush, Michal, S?ren, Ley] +> > > > On Tue, Aug 23, 2016 at 02:01:12PM +0800, Po Liu wrote: > > > When echo a number to /sys/bus/pci/devices/xxx/sriov_numvfs to enable > > > the VF devices. A crash log occurred. This found to be access the IOV > > > devices config space failure issue. -> > = - +> > > > What was the actual crash? The mere fact that we made a config read > > fail should not cause a crash. We might erroneously prevent access to > > VF devices, but it shouldn't crash. So maybe there's another bug > > elsewhere that we should fix first. -> = - -> I built with CONFIG_PCI_IOV=3Dy and notice a crash when I use it: -> = - +> +> I built with CONFIG_PCI_IOV=y and notice a crash when I use it: +> > centqds-60 cd /sys/class/net/ > centqds-61 ls > enP1p1s0@ enP2p1s0f0@ enP2p1s0f1@ lo@ sit0@ @@ -43,26 +38,23 @@ On Thu, Aug 25, 2016 at 04:53:19AM +0000, Po Liu wrote: > dma_mask_bits modalias resource vendor > driver@ msi_bus rom > centqds-64 zcat /proc/config.gz | grep _IOV -> CONFIG_PCI_IOV=3Dy +> CONFIG_PCI_IOV=y > centqds-65 sudo su -> [root@centqds 0002:01:00.1]# echo 2 > sriov_numvfs +> [root at centqds 0002:01:00.1]# echo 2 > sriov_numvfs > [ 317.604543] ixgbe 0002:01:00.1 enP2p1s0f1: SR-IOV enabled with 2 VFs -> [ 317.714431] (null): of_irq_parse_pci() failed with rc=3D134 +> [ 317.714431] (null): of_irq_parse_pci() failed with rc=134 > [ 317.719906] -----------[ cut here ]----------- -> [ 317.724525] WARNING: CPU: 6 PID: 3179 at drivers/pci/probe.c:1555 pci_d= -evice_add+0x144/0x148() +> [ 317.724525] WARNING: CPU: 6 PID: 3179 at drivers/pci/probe.c:1555 pci_device_add+0x144/0x148() > [ 317.733123] Modules linked in: -> [ 317.736175] CPU: 6 PID: 3179 Comm: bash Not tainted 4.1.8-00024-g0a32d6= -5-dirty #32 +> [ 317.736175] CPU: 6 PID: 3179 Comm: bash Not tainted 4.1.8-00024-g0a32d65-dirty #32 > [ 317.743731] Hardware name: Freescale Layerscape 2088a QDS Board (DT) > [ 317.750077] Call trace: > [ 317.752516] [<fffffe0000096cf8>] dump_backtrace+0x0/0x12c > Message from[ 317.757916] [<fffffe0000096e34>] show_stack+0x10/0x1c -> syslogd@centqds[ 317.764341] [<fffffe00008937fc>] dump_stack+0x84/0xd4 -> at Jul 26 15:51[ 317.770770] [<fffffe00000be590>] warn_slowpath_common+0x= -94/0xcc +> syslogd at centqds[ 317.764341] [<fffffe00008937fc>] dump_stack+0x84/0xd4 +> at Jul 26 15:51[ 317.770770] [<fffffe00000be590>] warn_slowpath_common+0x94/0xcc > :10 ... > kerne[ 317.778067] [<fffffe00000be68c>] warn_slowpath_null+0x14/0x20 > l:Call trace: @@ -79,8 +71,7 @@ evice_add+0x144/0x148() > [ 317.841772] --[ end trace 83725a9784fd702a ]-- > [ 317.846393] BUG: failure at fs/sysfs/file.c:481/sysfs_create_bin_file()! > [ 317.853081] Kernel panic - not syncing: BUG! -> [ 317.857339] CPU: 6 PID: 3179 Comm: bash Tainted: G W 4.1.8-00024-g0a32d= -65-dirty #32 +> [ 317.857339] CPU: 6 PID: 3179 Comm: bash Tainted: G W 4.1.8-00024-g0a32d65-dirty #32 > [ 317.866110] Hardware name: Freescale Layerscape 2088a QDS Board (DT) > [ 317.872451] Call trace: > [ 317.874887] [<fffffe0000096cf8>] dump_backtrace+0x0/0x12c @@ -90,26 +81,15 @@ evice_add+0x144/0x148() > [ 317.895047] [<fffffe0000200988>] sysfs_create_bin_file+0x60/0x64 > [ 317.901041] [<fffffe00003cf52c>] pci_create_sysfs_dev_files+0x48/0x2a8 > [ 317.907556] [<fffffe00003c4238>] pci_bus_add_device+0x20/0x6c -> = - -> The code process is that: "echo 2 > sriov_numvf" makes driver load .sriov= -_configure. At last to load pci_enable_sriov(). -> The first time vf device operate the config space in the pci_setup_device= -() (this function was load in the virtfn_add()) is pci_read_config_byte(dev= -, PCI_HEADER_TYPE, &hdr_type) return failure. So the virtfn didn't initiali= -zed proper. -> = - -> This found to be "bus->primary =3D=3D pp->root_bus_nr && dev > 0" then re= -turn failure in host controller. The dev came from devfn must not zero(is a= -bout 0x10). -> = - -> then read config space failure. This makes the dev->bus is NULL. Lead to = -upper crash. - -I think the crash (BUG: failure at fs/sysfs/file.c:481/sysfs_create_bin_fil= -e()) +> +> The code process is that: "echo 2 > sriov_numvf" makes driver load .sriov_configure. At last to load pci_enable_sriov(). +> The first time vf device operate the config space in the pci_setup_device() (this function was load in the virtfn_add()) is pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type) return failure. So the virtfn didn't initialized proper. +> +> This found to be "bus->primary == pp->root_bus_nr && dev > 0" then return failure in host controller. The dev came from devfn must not zero(is about 0x10). +> +> then read config space failure. This makes the dev->bus is NULL. Lead to upper crash. + +I think the crash (BUG: failure at fs/sysfs/file.c:481/sysfs_create_bin_file()) happens in this path: sriov_numvfs_store @@ -118,7 +98,7 @@ happens in this path: pci_enable_sriov sriov_enable pci_iov_add_virtfn - virtfn =3D pci_alloc_dev() + virtfn = pci_alloc_dev() pci_setup_device(virtfn) if (pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type)) return -EIO @@ -135,8 +115,3 @@ crash, even without your designware patch. Obviously, it won't make SR-IOV work, so we still need both patches. Bjorn - -_______________________________________________ -linux-arm-kernel mailing list -linux-arm-kernel@lists.infradead.org -http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/a/content_digest b/N1/content_digest index 041b5b1..d5e97b1 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,56 +1,38 @@ "ref\01471932072-6980-1-git-send-email-po.liu@nxp.com\0" "ref\020160824205059.GG23914@localhost\0" "ref\0VI1PR0401MB1709E238FDD324547EE8B13D92ED0@VI1PR0401MB1709.eurprd04.prod.outlook.com\0" - "From\0Bjorn Helgaas <helgaas@kernel.org>\0" - "Subject\0Re: [PATCH v1] arm64:pci: fix the IOV device enabled crash issue in designware\0" + "From\0helgaas@kernel.org (Bjorn Helgaas)\0" + "Subject\0[PATCH v1] arm64:pci: fix the IOV device enabled crash issue in designware\0" "Date\0Thu, 25 Aug 2016 13:09:35 -0500\0" - "To\0Po Liu <po.liu@nxp.com>\0" - "Cc\0linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org>" - Roy Zang <roy.zang@nxp.com> - Arnd Bergmann <arnd@arndb.de> - linux-pci@vger.kernel.org <linux-pci@vger.kernel.org> - Pratyush Anand <pratyush.anand@gmail.com> - Stuart Yoder <stuart.yoder@nxp.com> - Yang-Leo Li <leoyang.li@nxp.com> - Mingkai Hu <mingkai.hu@nxp.com> - Jingoo Han <jingoohan1@gmail.com> - Bjorn Helgaas <bhelgaas@google.com> - Ley Foon Tan <lftan@altera.com> - Michal Simek <michal.simek@xilinx.com> - " S?ren Brinkmann <soren.brinkmann@xilinx.com>\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "On Thu, Aug 25, 2016 at 04:53:19AM +0000, Po Liu wrote:\n" "> > -----Original Message-----\n" - "> > From: Bjorn Helgaas [mailto:helgaas@kernel.org]\n" + "> > From: Bjorn Helgaas [mailto:helgaas at kernel.org]\n" "> > Sent: Thursday, August 25, 2016 4:51 AM\n" "> > To: Po Liu\n" - "> > Cc: linux-pci@vger.kernel.org; Roy Zang; Arnd Bergmann; Stuart Yoder;\n" - "> > Yang-Leo Li; linux-arm-kernel@lists.infradead.org; Bjorn Helgaas;\n" - "> > Mingkai Hu; Ley Foon Tan; Michal Simek; S=F6ren Brinkmann; Jingoo Han;\n" + "> > Cc: linux-pci at vger.kernel.org; Roy Zang; Arnd Bergmann; Stuart Yoder;\n" + "> > Yang-Leo Li; linux-arm-kernel at lists.infradead.org; Bjorn Helgaas;\n" + "> > Mingkai Hu; Ley Foon Tan; Michal Simek; S?ren Brinkmann; Jingoo Han;\n" "> > Pratyush Anand\n" "> > Subject: Re: [PATCH v1] arm64:pci: fix the IOV device enabled crash\n" "> > issue in designware\n" - "> > =\n" - "\n" - "> > [+cc Jingoo, Pratyush, Michal, S=F6ren, Ley]\n" - "> > =\n" - "\n" + "> > \n" + "> > [+cc Jingoo, Pratyush, Michal, S?ren, Ley]\n" + "> > \n" "> > On Tue, Aug 23, 2016 at 02:01:12PM +0800, Po Liu wrote:\n" "> > > When echo a number to /sys/bus/pci/devices/xxx/sriov_numvfs to enable\n" "> > > the VF devices. A crash log occurred. This found to be access the IOV\n" "> > > devices config space failure issue.\n" - "> > =\n" - "\n" + "> > \n" "> > What was the actual crash? The mere fact that we made a config read\n" "> > fail should not cause a crash. We might erroneously prevent access to\n" "> > VF devices, but it shouldn't crash. So maybe there's another bug\n" "> > elsewhere that we should fix first.\n" - "> =\n" - "\n" - "> I built with CONFIG_PCI_IOV=3Dy and notice a crash when I use it:\n" - "> =\n" - "\n" + "> \n" + "> I built with CONFIG_PCI_IOV=y and notice a crash when I use it:\n" + "> \n" "> centqds-60 cd /sys/class/net/\n" "> centqds-61 ls\n" "> enP1p1s0@ enP2p1s0f0@ enP2p1s0f1@ lo@ sit0@\n" @@ -65,26 +47,23 @@ "> dma_mask_bits modalias resource vendor\n" "> driver@ msi_bus rom\n" "> centqds-64 zcat /proc/config.gz | grep _IOV\n" - "> CONFIG_PCI_IOV=3Dy\n" + "> CONFIG_PCI_IOV=y\n" "> centqds-65 sudo su\n" - "> [root@centqds 0002:01:00.1]# echo 2 > sriov_numvfs\n" + "> [root at centqds 0002:01:00.1]# echo 2 > sriov_numvfs\n" "> [ 317.604543] ixgbe 0002:01:00.1 enP2p1s0f1: SR-IOV enabled with 2 VFs\n" - "> [ 317.714431] (null): of_irq_parse_pci() failed with rc=3D134\n" + "> [ 317.714431] (null): of_irq_parse_pci() failed with rc=134\n" "\n" "\n" "> [ 317.719906] -----------[ cut here ]-----------\n" - "> [ 317.724525] WARNING: CPU: 6 PID: 3179 at drivers/pci/probe.c:1555 pci_d=\n" - "evice_add+0x144/0x148()\n" + "> [ 317.724525] WARNING: CPU: 6 PID: 3179 at drivers/pci/probe.c:1555 pci_device_add+0x144/0x148()\n" "> [ 317.733123] Modules linked in:\n" - "> [ 317.736175] CPU: 6 PID: 3179 Comm: bash Not tainted 4.1.8-00024-g0a32d6=\n" - "5-dirty #32\n" + "> [ 317.736175] CPU: 6 PID: 3179 Comm: bash Not tainted 4.1.8-00024-g0a32d65-dirty #32\n" "> [ 317.743731] Hardware name: Freescale Layerscape 2088a QDS Board (DT)\n" "> [ 317.750077] Call trace:\n" "> [ 317.752516] [<fffffe0000096cf8>] dump_backtrace+0x0/0x12c\n" "> Message from[ 317.757916] [<fffffe0000096e34>] show_stack+0x10/0x1c\n" - "> syslogd@centqds[ 317.764341] [<fffffe00008937fc>] dump_stack+0x84/0xd4\n" - "> at Jul 26 15:51[ 317.770770] [<fffffe00000be590>] warn_slowpath_common+0x=\n" - "94/0xcc\n" + "> syslogd at centqds[ 317.764341] [<fffffe00008937fc>] dump_stack+0x84/0xd4\n" + "> at Jul 26 15:51[ 317.770770] [<fffffe00000be590>] warn_slowpath_common+0x94/0xcc\n" "> :10 ...\n" "> kerne[ 317.778067] [<fffffe00000be68c>] warn_slowpath_null+0x14/0x20\n" "> l:Call trace:\n" @@ -101,8 +80,7 @@ "> [ 317.841772] --[ end trace 83725a9784fd702a ]--\n" "> [ 317.846393] BUG: failure at fs/sysfs/file.c:481/sysfs_create_bin_file()!\n" "> [ 317.853081] Kernel panic - not syncing: BUG!\n" - "> [ 317.857339] CPU: 6 PID: 3179 Comm: bash Tainted: G W 4.1.8-00024-g0a32d=\n" - "65-dirty #32\n" + "> [ 317.857339] CPU: 6 PID: 3179 Comm: bash Tainted: G W 4.1.8-00024-g0a32d65-dirty #32\n" "> [ 317.866110] Hardware name: Freescale Layerscape 2088a QDS Board (DT)\n" "> [ 317.872451] Call trace:\n" "> [ 317.874887] [<fffffe0000096cf8>] dump_backtrace+0x0/0x12c\n" @@ -112,26 +90,15 @@ "> [ 317.895047] [<fffffe0000200988>] sysfs_create_bin_file+0x60/0x64\n" "> [ 317.901041] [<fffffe00003cf52c>] pci_create_sysfs_dev_files+0x48/0x2a8\n" "> [ 317.907556] [<fffffe00003c4238>] pci_bus_add_device+0x20/0x6c\n" - "> =\n" - "\n" - "> The code process is that: \"echo 2 > sriov_numvf\" makes driver load .sriov=\n" - "_configure. At last to load pci_enable_sriov().\n" - "> The first time vf device operate the config space in the pci_setup_device=\n" - "() (this function was load in the virtfn_add()) is pci_read_config_byte(dev=\n" - ", PCI_HEADER_TYPE, &hdr_type) return failure. So the virtfn didn't initiali=\n" - "zed proper.\n" - "> =\n" - "\n" - "> This found to be \"bus->primary =3D=3D pp->root_bus_nr && dev > 0\" then re=\n" - "turn failure in host controller. The dev came from devfn must not zero(is a=\n" - "bout 0x10).\n" - "> =\n" - "\n" - "> then read config space failure. This makes the dev->bus is NULL. Lead to =\n" - "upper crash.\n" - "\n" - "I think the crash (BUG: failure at fs/sysfs/file.c:481/sysfs_create_bin_fil=\n" - "e())\n" + "> \n" + "> The code process is that: \"echo 2 > sriov_numvf\" makes driver load .sriov_configure. At last to load pci_enable_sriov().\n" + "> The first time vf device operate the config space in the pci_setup_device() (this function was load in the virtfn_add()) is pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type) return failure. So the virtfn didn't initialized proper.\n" + "> \n" + "> This found to be \"bus->primary == pp->root_bus_nr && dev > 0\" then return failure in host controller. The dev came from devfn must not zero(is about 0x10).\n" + "> \n" + "> then read config space failure. This makes the dev->bus is NULL. Lead to upper crash.\n" + "\n" + "I think the crash (BUG: failure at fs/sysfs/file.c:481/sysfs_create_bin_file())\n" "happens in this path:\n" "\n" " sriov_numvfs_store\n" @@ -140,7 +107,7 @@ " pci_enable_sriov\n" " sriov_enable\n" " pci_iov_add_virtfn\n" - " virtfn =3D pci_alloc_dev()\n" + " virtfn = pci_alloc_dev()\n" " pci_setup_device(virtfn)\n" " if (pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type))\n" " return -EIO\n" @@ -156,11 +123,6 @@ "\n" "Obviously, it won't make SR-IOV work, so we still need both patches.\n" "\n" - "Bjorn\n" - "\n" - "_______________________________________________\n" - "linux-arm-kernel mailing list\n" - "linux-arm-kernel@lists.infradead.org\n" - http://lists.infradead.org/mailman/listinfo/linux-arm-kernel + Bjorn -30515328de2a7c55a19c49e003d8c54c3179fb031adb82a8d0958d36fd683a82 +bedf5c9ec13fa250afda6a4bb3ba409796675f89466644aa7612688b68c14389
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.