New: HotPlug does not work on upstream kernel 5.17.0-rc1
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]/
[+cc linux-pci, Hans, Lukas, Naveen, Keith, Nirmal, Jonathan]
Quoted 49 lines · On Mon, Jan 24, 2022 at 11:46:14AM +0000, [email protected]…
https://bugzilla.kernel.org/show_bug.cgi?id=215525
Bug ID: 215525 Summary: HotPlug does not work on upstream kernel 5.17.0-rc1 Product: Drivers Version: 2.5 Kernel Version: 5.17.0-rc1 upstream Hardware: x86-64 OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: PCI Assignee: [email protected] Reporter: [email protected] Regression: NoCreated attachment 300308
--> https://bugzilla.kernel.org/attachment.cgi?id=300308&action=edit
dmesgWhile testing on latest upstream kernel(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/) we noticed that with the merge commit
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0a231f01e5b25bacd23e6edc7c979a18a517b2b)
hotplug and hotunplug of nvme drives stopped working.Rescan PCI does not help.
echo "1" >/sys/bus/pci/rescanIssue does not reproduce on a kernel built on an antecedent commit(88db8458086b1dcf20b56682504bdb34d2bca0e2).
During hot-remove device does not disappear, however when we try to do I/O on the disk then there is an I/O error, and the device disappears.
Before I/O no logs regarding the disk appeared in the dmesg, only after I/O the entries appeared like below:
[ 177.943703] nvme nvme5: controller is down; will reset: CSTS=0xffffffff, PCI_STATUS=0xffff [ 177.971661] nvme 10000:0b:00.0: can't change power state from D3cold to D0 (config space inaccessible) [ 177.981121] pcieport 10000:00:02.0: can't derive routing for PCI INT A [ 177.987749] nvme 10000:0b:00.0: PCI INT A: no GSI [ 177.992633] nvme nvme5: Removing after probe failure status: -19 [ 178.004633] nvme5n1: detected capacity change from 83984375 to 0 [ 178.004677] I/O error, dev nvme5n1, sector 0 op 0x0:(READ) flags 0x0
Quoted 8 lines
phys_seg1 prio class 0OS: RHEL 8.4 GA
Platform: Intel PurleyThe logs are collected on a non-recent upstream kernel, but a issue also occurs on the newest upstream kernel(dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0)
Apparently worked immediately before merging the PCI changes for v5.17 and failed immediately after:
good: 88db8458086b ("Merge tag 'exfat-for-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat")
bad: d0a231f01e5b ("Merge tag 'pci-v5.17-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci")
Only three commits touch pciehp:
085a9f43433f ("PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors") 23584c1ed3e1 ("PCI: pciehp: Fix infinite loop in IRQ handler upon power fault") a3b0f10db148 ("PCI: pciehp: Use PCI_POSSIBLE_ERROR() to check config reads")
None seems obviously related to me. Blazej, could you try setting CONFIG_DYNAMIC_DEBUG=y and booting with 'dyndbg="file pciehp* +p"' to enable more debug messages?
Bjorn
Hi,
Quoted 69 lines · Bjorn Helgaas
[+cc linux-pci, Hans, Lukas, Naveen, Keith, Nirmal, Jonathan]
Quoted 49 lines · On Mon, Jan 24, 2022 at 11:46:14AM +0000, [email protected]…
https://bugzilla.kernel.org/show_bug.cgi?id=215525
Bug ID: 215525 Summary: HotPlug does not work on upstream kernel 5.17.0-rc1 Product: Drivers Version: 2.5 Kernel Version: 5.17.0-rc1 upstream Hardware: x86-64 OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: PCI Assignee: [email protected] Reporter: [email protected] Regression: NoCreated attachment 300308
--> https://bugzilla.kernel.org/attachment.cgi?id=300308&action=edit
dmesgWhile testing on latest upstream kernel(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/) we noticed that with the merge commit
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0a231f01e5b25bacd23e6edc7c979a18a517b2b)
hotplug and hotunplug of nvme drives stopped working.Rescan PCI does not help.
echo "1" >/sys/bus/pci/rescanIssue does not reproduce on a kernel built on an antecedent commit(88db8458086b1dcf20b56682504bdb34d2bca0e2).
During hot-remove device does not disappear, however when we try to do I/O on the disk then there is an I/O error, and the device disappears.
Before I/O no logs regarding the disk appeared in the dmesg, only after I/O the entries appeared like below:
[ 177.943703] nvme nvme5: controller is down; will reset: CSTS=0xffffffff, PCI_STATUS=0xffff [ 177.971661] nvme 10000:0b:00.0: can't change power state from D3cold to D0 (config space inaccessible) [ 177.981121] pcieport 10000:00:02.0: can't derive routing for PCI INT A [ 177.987749] nvme 10000:0b:00.0: PCI INT A: no GSI [ 177.992633] nvme nvme5: Removing after probe failure status: -19 [ 178.004633] nvme5n1: detected capacity change from 83984375 to 0 [ 178.004677] I/O error, dev nvme5n1, sector 0 op 0x0:(READ) flags 0x0Quoted 8 lines
phys_seg1 prio class 0OS: RHEL 8.4 GA
Platform: Intel PurleyThe logs are collected on a non-recent upstream kernel, but a issue also occurs on the newest upstream kernel(dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0)
Apparently worked immediately before merging the PCI changes for v5.17 and failed immediately after:
good:
88db8458086b("Merge tag 'exfat-for-5.17-rc1' ofgit://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat")
bad:d0a231f01e5b("Merge tag 'pci-v5.17-changes' ofgit://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci")Only three commits touch pciehp:
Quoted 7 lines
085a9f43433f("PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors")23584c1ed3e1("PCI: pciehp: Fix infinite loop in IRQ handler upon power fault")a3b0f10db148("PCI: pciehp: UsePCI_POSSIBLE_ERROR()to check config reads")None seems obviously related to me. Blazej, could you try setting
CONFIG_DYNAMIC_DEBUG=yand booting with 'dyndbg="file pciehp* +p"' to enable more debug messages?
Since there are only 3 commits maybe try reverting them 1 by 1 in reverse history order (so revert latest commit first) ? And see if running a kernel with the reverted commit(s) fixes things ?
Regards,
Hans
Quoted 6 lines · Bjorn Helgaas
Quoted 5 lines · On Mon, Jan 24, 2022 at 11:46:14AM +0000, [email protected]…
https://bugzilla.kernel.org/show_bug.cgi?id=215525
While testing on latest upstream kernel we noticed that with the merge commit
d0a231f01e5bhotplug and hotunplug of nvme drives stopped working.
[...]
Quoted 5 lines
Only three commits touch pciehp:
085a9f43433f("PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors")23584c1ed3e1("PCI: pciehp: Fix infinite loop in IRQ handler upon power fault")a3b0f10db148("PCI: pciehp: UsePCI_POSSIBLE_ERROR()to check config reads")
Those commits pertain to *native* hotplug, however the machine in question does not grant hotplug control to OSPM, so pciehp isn't even probed for any ports on that machine:
acpi PNP0A08:09: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
acpi PNP0A08:09: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI]
Are these ports supposed to be handled by native hotplug or acpiphp? Perhaps CONFIG_HOTPLUG_PCI_PCIE was erroneously not enabled?
It's unfortunate that the bugzilla only contains the dmesg dump of broken hotplug, but not of working hotplug. That would make it easier to determine what's going wrong.
Thanks,
Lukas
[TLDR: I'm adding this regression to regzbot, the Linux kernel regression tracking bot; most text you find below is compiled from a few templates paragraphs some of you might have seen already.]
Hi, this is your Linux kernel regression tracker speaking.
Adding the regression mailing list to the list of recipients, as it should be in the loop for all regressions, as explained here:
https://www.kernel.org/doc/html/latest/admin-guide/reporting-issues.html
Quoted 69 lines · Bjorn Helgaas
[+cc linux-pci, Hans, Lukas, Naveen, Keith, Nirmal, Jonathan]
Quoted 49 lines · On Mon, Jan 24, 2022 at 11:46:14AM +0000, [email protected]…
https://bugzilla.kernel.org/show_bug.cgi?id=215525
Bug ID: 215525 Summary: HotPlug does not work on upstream kernel 5.17.0-rc1 Product: Drivers Version: 2.5 Kernel Version: 5.17.0-rc1 upstream Hardware: x86-64 OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: PCI Assignee: [email protected] Reporter: [email protected] Regression: NoCreated attachment 300308
--> https://bugzilla.kernel.org/attachment.cgi?id=300308&action=edit
dmesgWhile testing on latest upstream kernel(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/) we noticed that with the merge commit
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0a231f01e5b25bacd23e6edc7c979a18a517b2b)
hotplug and hotunplug of nvme drives stopped working.Rescan PCI does not help.
echo "1" >/sys/bus/pci/rescanIssue does not reproduce on a kernel built on an antecedent commit(88db8458086b1dcf20b56682504bdb34d2bca0e2).
During hot-remove device does not disappear, however when we try to do I/O on the disk then there is an I/O error, and the device disappears.
Before I/O no logs regarding the disk appeared in the dmesg, only after I/O the entries appeared like below:
[ 177.943703] nvme nvme5: controller is down; will reset: CSTS=0xffffffff, PCI_STATUS=0xffff [ 177.971661] nvme 10000:0b:00.0: can't change power state from D3cold to D0 (config space inaccessible) [ 177.981121] pcieport 10000:00:02.0: can't derive routing for PCI INT A [ 177.987749] nvme 10000:0b:00.0: PCI INT A: no GSI [ 177.992633] nvme nvme5: Removing after probe failure status: -19 [ 178.004633] nvme5n1: detected capacity change from 83984375 to 0 [ 178.004677] I/O error, dev nvme5n1, sector 0 op 0x0:(READ) flags 0x0Quoted 8 lines
phys_seg1 prio class 0OS: RHEL 8.4 GA
Platform: Intel PurleyThe logs are collected on a non-recent upstream kernel, but a issue also occurs on the newest upstream kernel(dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0)
Apparently worked immediately before merging the PCI changes for v5.17 and failed immediately after:
good:
88db8458086b("Merge tag 'exfat-for-5.17-rc1' ofgit://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat")
bad:d0a231f01e5b("Merge tag 'pci-v5.17-changes' ofgit://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci")Only three commits touch pciehp:
Quoted 7 lines
085a9f43433f("PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors")23584c1ed3e1("PCI: pciehp: Fix infinite loop in IRQ handler upon power fault")a3b0f10db148("PCI: pciehp: UsePCI_POSSIBLE_ERROR()to check config reads")None seems obviously related to me. Blazej, could you try setting
CONFIG_DYNAMIC_DEBUG=yand booting with 'dyndbg="file pciehp* +p"' to enable more debug messages?
To be sure this issue doesn't fall through the cracks unnoticed, I'm adding it to regzbot, my Linux kernel regression tracking bot:
#regzbot ^introduced: d0a231f01e5b25bacd23e
#regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=215525
#regzbot from: [email protected]
#regzbot title: pci: HotPlug does not work on upstream kernel 5.17.0-rc1
Ciao, Thorsten (wearing his 'Linux kernel regression tracker' hat)
P.S.: As a Linux kernel regression tracker I'm getting a lot of reports on my table. I can only look briefly into most of them. Unfortunately therefore I sometimes will get things wrong or miss something important. I hope that's not the case here; if you think it is, don't hesitate to tell me about it in a public reply, that's in everyone's interest.
BTW, I have no personal interest in this issue, which is tracked using regzbot, my Linux kernel regression tracking bot
(https://linux-regtracking.leemhuis.info/regzbot/). I'm only posting this mail to get things rolling again and hence don't need to be CC on all further activities wrt to this regression.
---
Additional information about regzbot:
If you want to know more about regzbot, check out its web-interface, the getting start guide, and/or the references documentation:
https://linux-regtracking.leemhuis.info/regzbot/
https://gitlab.com/knurd42/regzbot/-/blob/main/docs/getting_started.md
https://gitlab.com/knurd42/regzbot/-/blob/main/docs/reference.md
The last two documents will explain how you can interact with regzbot yourself if your want to.
Hint for reporters: when reporting a regression it's in your interest to tell #regzbot about it in the report, as that will ensure the regression gets on the radar of regzbot and the regression tracker. That's in your interest, as they will make sure the report won't fall through the cracks unnoticed.
Hint for developers: you normally don't need to care about regzbot once it's involved. Fix the issue as you normally would, just remember to include a 'Link:' tag to the report in the commit message, as explained in Documentation/process/submitting-patches.rst
That aspect was recently was made more explicit in commit 1f57bd42b77c:
https://git.kernel.org/linus/1f57bd42b77c
#regzbot introduced: 04b12ef163d1
#regzbot invalid: according to Bjorn, "it was arguably a bug that it *did* work before", see https://lore.kernel.org/linux-pci/20220202164308.GA17822@bhelgaas/
Quoted 75 lines · On Mon, 24 Jan 2022 15:46:35 -0600 Bjorn Helgaas <[email protected]> wrote:
[+cc linux-pci, Hans, Lukas, Naveen, Keith, Nirmal, Jonathan]
Quoted 54 lines · On Mon, Jan 24, 2022 at 11:46:14AM +0000, [email protected]…
https://bugzilla.kernel.org/show_bug.cgi?id=215525
Bug ID: 215525
Summary: HotPlug does not work on upstream kernel
5.17.0-rc1 Product: DriversVersion: 2.5 Kernel Version: 5.17.0-rc1 upstream Hardware: x86-64 OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: PCI Assignee: [email protected] Reporter: [email protected] Regression: NoCreated attachment 300308
-->
https://bugzilla.kernel.org/attachment.cgi?id=300308&action=edit
dmesgWhile testing on latest upstream kernel(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/) we noticed that with the merge commit
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0a231f01e5b25bacd23e6edc7c979a18a517b2b)
hotplug and hotunplug of nvme drives stopped working.Rescan PCI does not help.
echo "1" >/sys/bus/pci/rescanIssue does not reproduce on a kernel built on an antecedent commit(88db8458086b1dcf20b56682504bdb34d2bca0e2).
During hot-remove device does not disappear, however when we try to do I/O on the disk then there is an I/O error, and the device disappears.
Before I/O no logs regarding the disk appeared in the dmesg, only after I/O the entries appeared like below:
[ 177.943703] nvme nvme5: controller is down; will reset: CSTS=0xffffffff, PCI_STATUS=0xffff [ 177.971661] nvme 10000:0b:00.0: can't change power state from D3cold to D0 (config space inaccessible) [ 177.981121] pcieport 10000:00:02.0: can't derive routing for PCI INT A [ 177.987749] nvme 10000:0b:00.0: PCI INT A: no GSI [ 177.992633] nvme nvme5: Removing after probe failure status: -19 [ 178.004633] nvme5n1: detected capacity change from 83984375 to 0 [ 178.004677] I/O error, dev nvme5n1, sector 0 op 0x0:(READ) flags
0x0phys_seg1 prio class 0Quoted 6 lines
OS: RHEL 8.4 GA
Platform: Intel PurleyThe logs are collected on a non-recent upstream kernel, but a issue also occurs on the newest upstream kernel(dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0)
Apparently worked immediately before merging the PCI changes for v5.17 and failed immediately after:
good:
88db8458086b("Merge tag 'exfat-for-5.17-rc1' ofgit://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat") bad:
d0a231f01e5b("Merge tag 'pci-v5.17-changes' ofgit://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci")Only three commits touch pciehp:
Quoted 9 lines
085a9f43433f("PCI: pciehp: Use down_read/write_nested(reset_lock)
to fix lockdep errors")23584c1ed3e1("PCI: pciehp: Fix infinite loop in IRQ handler upon power fault")a3b0f10db148("PCI: pciehp: UsePCI_POSSIBLE_ERROR()to check config reads")None seems obviously related to me. Blazej, could you try setting
CONFIG_DYNAMIC_DEBUG=yand booting with 'dyndbg="file pciehp* +p"' to enable more debug messages?
Hi Bjorn,
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.
He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Tested on tag pci-v5.17-changes. He have CONFIG_HOTPLUG_PCI_PCIE and CONFIG_DYNAMIC_DEBUG enabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.
Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
He is currently working on email client setup to answer himself.
Thanks,
Mariusz
Quoted 99 lines · Mariusz Tkaczyk
Quoted 75 lines · On Mon, 24 Jan 2022 15:46:35 -0600 Bjorn Helgaas <[email protected]> wrote:
[+cc linux-pci, Hans, Lukas, Naveen, Keith, Nirmal, Jonathan]
Quoted 54 lines · On Mon, Jan 24, 2022 at 11:46:14AM +0000, [email protected]…
https://bugzilla.kernel.org/show_bug.cgi?id=215525
Bug ID: 215525
Summary: HotPlug does not work on upstream kernel
5.17.0-rc1 Product: DriversVersion: 2.5 Kernel Version: 5.17.0-rc1 upstream Hardware: x86-64 OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: PCI Assignee: [email protected] Reporter: [email protected] Regression: NoCreated attachment 300308
-->
https://bugzilla.kernel.org/attachment.cgi?id=300308&action=edit
dmesgWhile testing on latest upstream kernel(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/) we noticed that with the merge commit
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0a231f01e5b25bacd23e6edc7c979a18a517b2b)
hotplug and hotunplug of nvme drives stopped working.Rescan PCI does not help.
echo "1" >/sys/bus/pci/rescanIssue does not reproduce on a kernel built on an antecedent commit(88db8458086b1dcf20b56682504bdb34d2bca0e2).
During hot-remove device does not disappear, however when we try to do I/O on the disk then there is an I/O error, and the device disappears.
Before I/O no logs regarding the disk appeared in the dmesg, only after I/O the entries appeared like below:
[ 177.943703] nvme nvme5: controller is down; will reset: CSTS=0xffffffff, PCI_STATUS=0xffff [ 177.971661] nvme 10000:0b:00.0: can't change power state from D3cold to D0 (config space inaccessible) [ 177.981121] pcieport 10000:00:02.0: can't derive routing for PCI INT A [ 177.987749] nvme 10000:0b:00.0: PCI INT A: no GSI [ 177.992633] nvme nvme5: Removing after probe failure status: -19 [ 178.004633] nvme5n1: detected capacity change from 83984375 to 0 [ 178.004677] I/O error, dev nvme5n1, sector 0 op 0x0:(READ) flags
0x0phys_seg1 prio class 0Quoted 6 lines
OS: RHEL 8.4 GA
Platform: Intel PurleyThe logs are collected on a non-recent upstream kernel, but a issue also occurs on the newest upstream kernel(dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0)
Apparently worked immediately before merging the PCI changes for v5.17 and failed immediately after:
good: 88db8458086b ("Merge tag 'exfat-for-5.17-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat") bad:
d0a231f01e5b("Merge tag 'pci-v5.17-changes' ofgit://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci")Only three commits touch pciehp:
Quoted 9 lines
085a9f43433f ("PCI: pciehp: Use down_read/write_nested(reset_lock)to fix lockdep errors")
23584c1ed3e1("PCI: pciehp: Fix infinite loop in IRQ handler upon power fault")a3b0f10db148("PCI: pciehp: UsePCI_POSSIBLE_ERROR()to check config reads")None seems obviously related to me. Blazej, could you try setting
CONFIG_DYNAMIC_DEBUG=yand booting with 'dyndbg="file pciehp* +p"' to enable more debug messages?Hi Bjorn,
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.
He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Quoted 7 lines
Tested on tag pci-v5.17-changes. He have
CONFIG_HOTPLUG_PCI_PCIEandCONFIG_DYNAMIC_DEBUGenabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
Could it be related to this?
int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 *val)
{
if (domain == 0 && reg < 256 && raw_pci_ops)
return raw_pci_ops->read(domain, bus, devfn, reg, len, val);
if (raw_pci_ext_ops)
return raw_pci_ext_ops->read(domain, bus, devfn, reg, len, val);
return -EINVAL;
}It looks like raw_pci_ext_ops won't be set with nommconf, and VMD subdevice domain will be > 0.
Quoted 7 lines
He is currently working on email client setup to answer himself.
Thanks,
Mariusz
Quoted 99 lines · Mariusz Tkaczyk
Quoted 75 lines · On Mon, 24 Jan 2022 15:46:35 -0600 Bjorn Helgaas <[email protected]> wrote:
[+cc linux-pci, Hans, Lukas, Naveen, Keith, Nirmal, Jonathan]
Quoted 54 lines · On Mon, Jan 24, 2022 at 11:46:14AM +0000, [email protected]…
https://bugzilla.kernel.org/show_bug.cgi?id=215525
Bug ID: 215525
Summary: HotPlug does not work on upstream kernel
5.17.0-rc1 Product: DriversVersion: 2.5 Kernel Version: 5.17.0-rc1 upstream Hardware: x86-64 OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: PCI Assignee: [email protected] Reporter: [email protected] Regression: NoCreated attachment 300308
-->
https://bugzilla.kernel.org/attachment.cgi?id=300308&action=edit
dmesgWhile testing on latest upstream kernel(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/) we noticed that with the merge commit
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0a231f01e5b25bacd23e6edc7c979a18a517b2b)
hotplug and hotunplug of nvme drives stopped working.Rescan PCI does not help.
echo "1" >/sys/bus/pci/rescanIssue does not reproduce on a kernel built on an antecedent commit(88db8458086b1dcf20b56682504bdb34d2bca0e2).
During hot-remove device does not disappear, however when we try to do I/O on the disk then there is an I/O error, and the device disappears.
Before I/O no logs regarding the disk appeared in the dmesg, only after I/O the entries appeared like below:
[ 177.943703] nvme nvme5: controller is down; will reset: CSTS=0xffffffff, PCI_STATUS=0xffff [ 177.971661] nvme 10000:0b:00.0: can't change power state from D3cold to D0 (config space inaccessible) [ 177.981121] pcieport 10000:00:02.0: can't derive routing for PCI INT A [ 177.987749] nvme 10000:0b:00.0: PCI INT A: no GSI [ 177.992633] nvme nvme5: Removing after probe failure status: -19 [ 178.004633] nvme5n1: detected capacity change from 83984375 to 0 [ 178.004677] I/O error, dev nvme5n1, sector 0 op 0x0:(READ) flags
0x0phys_seg1 prio class 0Quoted 6 lines
OS: RHEL 8.4 GA
Platform: Intel PurleyThe logs are collected on a non-recent upstream kernel, but a issue also occurs on the newest upstream kernel(dd81e1c7d5fb126e5fbc5c9e334d7b3ec29a16a0)
Apparently worked immediately before merging the PCI changes for v5.17 and failed immediately after:
good: 88db8458086b ("Merge tag 'exfat-for-5.17-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat") bad:
d0a231f01e5b("Merge tag 'pci-v5.17-changes' ofgit://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci")Only three commits touch pciehp:
Quoted 9 lines
085a9f43433f ("PCI: pciehp: Use down_read/write_nested(reset_lock)to fix lockdep errors")
23584c1ed3e1("PCI: pciehp: Fix infinite loop in IRQ handler upon power fault")a3b0f10db148("PCI: pciehp: UsePCI_POSSIBLE_ERROR()to check config reads")None seems obviously related to me. Blazej, could you try setting
CONFIG_DYNAMIC_DEBUG=yand booting with 'dyndbg="file pciehp* +p"' to enable more debug messages?Hi Bjorn,
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.
He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Quoted 7 lines
Tested on tag pci-v5.17-changes. He have
CONFIG_HOTPLUG_PCI_PCIEandCONFIG_DYNAMIC_DEBUGenabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
Could it be related to this?
int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 *val)
{
if (domain == 0 && reg < 256 && raw_pci_ops)
return raw_pci_ops->read(domain, bus, devfn, reg, len, val);
if (raw_pci_ext_ops)
return raw_pci_ext_ops->read(domain, bus, devfn, reg, len, val);
return -EINVAL;
}It looks like raw_pci_ext_ops won't be set with nommconf, and VMD subdevice domain will be > 0.
Quoted 7 lines
He is currently working on email client setup to answer himself.
Thanks,
Mariusz
Quoted 10 lines · Mariusz Tkaczyk
...
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Quoted 7 lines
Tested on tag pci-v5.17-changes. He have
CONFIG_HOTPLUG_PCI_PCIEandCONFIG_DYNAMIC_DEBUGenabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
Maybe I'm missing something. If I understand correctly, the problem has nothing to do with the kernel version (correct me if I'm wrong!)
PCIe native hotplug doesn't work when booted with "pci=nommconf". When using "pci=nommconf", obviously we can't access the extended PCI config space (offset 0x100-0xfff), so none of the extended capabilities are available.
In that case, we don't even ask the platform for control of PCIe hotplug via _OSC. From the dmesg diff from normal (working) to "pci=nommconf" (not working):
-Command line: BOOT_IMAGE=/boot/vmlinuz-smp ...
+Command line: BOOT_IMAGE=/boot/vmlinuz-smp pci=nommconf ...
...
-acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3] -acpi PNP0A08:00: _OSC: platform does not support [AER LTR]
-acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME PCIeCapability]
+acpi PNP0A08:00: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
+acpi PNP0A08:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI] +acpi PNP0A08:00: MMCONFIG is disabled, can't access extended PCI configuration space under this bridge.
Why are you using "pci=nommconf"? As far as I know, there's no reason to use that except to work around some kind of defect.
Bjorn
Quoted 16 lines · On Thu, 27 Jan 2022 20:52:12 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 15 lines · Mariusz Tkaczyk
...
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Tested on tag pci-v5.17-changes. He have
CONFIG_HOTPLUG_PCI_PCIEandCONFIG_DYNAMIC_DEBUGenabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.
Quoted 6 lines
Quoted 2 lines
Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
Maybe I'm missing something. If I understand correctly, the problem has nothing to do with the kernel version (correct me if I'm wrong!)
Hi Bjorn,
The problem occurred after the merge commit. It is some kind of regression.
Quoted 9 lines
PCIe native hotplug doesn't work when booted with "pci=nommconf". When using "pci=nommconf", obviously we can't access the extended PCI config space (offset 0x100-0xfff), so none of the extended capabilities are available.
In that case, we don't even ask the platform for control of PCIe hotplug via
_OSC. From the dmesg diff from normal (working) to "pci=nommconf" (not working):
Quoted 12 lines
-Command line: BOOT_IMAGE=/boot/vmlinuz-smp ... +Command line: BOOT_IMAGE=/boot/vmlinuz-smp pci=nommconf ...
...
-acpi PNP0A08:00:_OSC: OS supports [ExtendedConfig ASPM ClockPM
Segments MSI HPX-Type3] -acpi PNP0A08:00:_OSC: platform does not support [AER LTR] -acpi PNP0A08:00:_OSC: OS now controls [PCIeHotplug PME PCIeCapability] +acpi PNP0A08:00:_OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3] +acpi PNP0A08:00:_OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI] +acpi PNP0A08:00: MMCONFIG is disabled, can't access extended PCI configuration space under this bridge.
So, it shouldn't work from years but it has been broken recently, that is the only objection I have. Could you tell why it was working? According to your words- it shouldn't. We are using VMD driver, is that matter?
I already saw Jonathan's finding, we can check this. But if nommconf stays against hotplug, is it valuable? Maybe we should accept the regression as desired.
Quoted 2 lines
Why are you using "pci=nommconf"? As far as I know, there's no reason to use that except to work around some kind of defect.
It was added long time ago when it was useful, and sometimes is returning. We need to get rid of it definitely.
Thanks,
Mariusz
[+cc Kai-Heng]
Quoted 18 lines · Mariusz Tkaczyk
Quoted 16 lines · On Thu, 27 Jan 2022 20:52:12 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 15 lines · Mariusz Tkaczyk
...
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Tested on tag pci-v5.17-changes. He have
CONFIG_HOTPLUG_PCI_PCIEandCONFIG_DYNAMIC_DEBUGenabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
Maybe I'm missing something. If I understand correctly, the problem has nothing to do with the kernel version (correct me if I'm wrong!)
The problem occurred after the merge commit. It is some kind of regression.
The bug report doesn't yet contain the evidence showing this. It only contains dmesg logs with "pci=nommconf" where pciehp doesn't work (which is the expected behavior) and a log without "pci=nommconf" where pciehp does work (which is again the expected behavior).
Quoted 21 lines
Quoted 9 lines
PCIe native hotplug doesn't work when booted with "pci=nommconf". When using "pci=nommconf", obviously we can't access the extended PCI config space (offset 0x100-0xfff), so none of the extended capabilities are available.
In that case, we don't even ask the platform for control of PCIe hotplug via
_OSC. From the dmesg diff from normal (working) to "pci=nommconf" (not working):Quoted 11 lines
-Command line: BOOT_IMAGE=/boot/vmlinuz-smp ... +Command line: BOOT_IMAGE=/boot/vmlinuz-smp pci=nommconf ...
...
-acpi PNP0A08:00:_OSC: OS supports [ExtendedConfig ASPM ClockPM
Segments MSI HPX-Type3] -acpi PNP0A08:00:_OSC: platform does not support [AER LTR] -acpi PNP0A08:00:_OSC: OS now controls [PCIeHotplug PME PCIeCapability] +acpi PNP0A08:00:_OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3] +acpi PNP0A08:00:_OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI] +acpi PNP0A08:00: MMCONFIG is disabled, can't access extended PCI configuration space under this bridge.
Quoted 4 lines
So, it shouldn't work from years but it has been broken recently, that is the only objection I have. Could you tell why it was working? According to your words- it shouldn't. We are using VMD driver, is that matter?
04b12ef163d1 ("PCI: vmd: Honor ACPI _OSC on PCIe features") looks like a it could be related. Try reverting that commit and see whether it makes a difference.
Bjorn
Quoted 57 lines · Bjorn Helgaas
[+cc Kai-Heng]
Quoted 18 lines · Mariusz Tkaczyk
Quoted 16 lines · On Thu, 27 Jan 2022 20:52:12 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 15 lines · Mariusz Tkaczyk
...
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Tested on tag pci-v5.17-changes. He have
CONFIG_HOTPLUG_PCI_PCIEandCONFIG_DYNAMIC_DEBUGenabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
Maybe I'm missing something. If I understand correctly, the problem has nothing to do with the kernel version (correct me if I'm wrong!)
The problem occurred after the merge commit. It is some kind of regression.
The bug report doesn't yet contain the evidence showing this. It only contains dmesg logs with "pci=nommconf" where pciehp doesn't work (which is the expected behavior) and a log without "pci=nommconf" where pciehp does work (which is again the expected behavior).
Quoted 21 lines
Quoted 20 lines
PCIe native hotplug doesn't work when booted with "pci=nommconf". When using "pci=nommconf", obviously we can't access the extended PCI config space (offset 0x100-0xfff), so none of the extended capabilities are available.
In that case, we don't even ask the platform for control of PCIe hotplug via
_OSC. From the dmesg diff from normal (working) to "pci=nommconf" (not working):-Command line: BOOT_IMAGE=/boot/vmlinuz-smp ... +Command line: BOOT_IMAGE=/boot/vmlinuz-smp pci=nommconf ...
...
-acpi PNP0A08:00:_OSC: OS supports [ExtendedConfig ASPM ClockPM
Segments MSI HPX-Type3] -acpi PNP0A08:00:_OSC: platform does not support [AER LTR] -acpi PNP0A08:00:_OSC: OS now controls [PCIeHotplug PME PCIeCapability] +acpi PNP0A08:00:_OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3] +acpi PNP0A08:00:_OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI] +acpi PNP0A08:00: MMCONFIG is disabled, can't access extended PCI configuration space under this bridge.
Quoted 8 lines
Quoted 4 lines
So, it shouldn't work from years but it has been broken recently, that is the only objection I have. Could you tell why it was working? According to your words- it shouldn't. We are using VMD driver, is that matter?
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") looks like a it could be related. Try reverting that commit and see whether it makes a difference.
The affected NVMe is indeed behind VMD domain, so I think the commit can make a difference.
Does VMD behave differently on laptops and servers? Anyway, I agree that the issue really lies in "pci=nommconf".
Kai-Heng
Quoted 2 lines
Bjorn
Quoted 64 lines · Kai-Heng Feng
Quoted 54 lines · Bjorn Helgaas
Quoted 18 lines · Mariusz Tkaczyk
Quoted 16 lines · On Thu, 27 Jan 2022 20:52:12 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 15 lines · Mariusz Tkaczyk
...
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Tested on tag pci-v5.17-changes. He have
CONFIG_HOTPLUG_PCI_PCIEandCONFIG_DYNAMIC_DEBUGenabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
Maybe I'm missing something. If I understand correctly, the problem has nothing to do with the kernel version (correct me if I'm wrong!)
The problem occurred after the merge commit. It is some kind of regression.
The bug report doesn't yet contain the evidence showing this. It only contains dmesg logs with "pci=nommconf" where pciehp doesn't work (which is the expected behavior) and a log without "pci=nommconf" where pciehp does work (which is again the expected behavior).
Quoted 21 lines
Quoted 20 lines
PCIe native hotplug doesn't work when booted with "pci=nommconf". When using "pci=nommconf", obviously we can't access the extended PCI config space (offset 0x100-0xfff), so none of the extended capabilities are available.
In that case, we don't even ask the platform for control of PCIe hotplug via
_OSC. From the dmesg diff from normal (working) to "pci=nommconf" (not working):-Command line: BOOT_IMAGE=/boot/vmlinuz-smp ... +Command line: BOOT_IMAGE=/boot/vmlinuz-smp pci=nommconf ...
...
-acpi PNP0A08:00:_OSC: OS supports [ExtendedConfig ASPM ClockPM
Segments MSI HPX-Type3] -acpi PNP0A08:00:_OSC: platform does not support [AER LTR] -acpi PNP0A08:00:_OSC: OS now controls [PCIeHotplug PME PCIeCapability] +acpi PNP0A08:00:_OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3] +acpi PNP0A08:00:_OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI] +acpi PNP0A08:00: MMCONFIG is disabled, can't access extended PCI configuration space under this bridge.Quoted 8 lines
Quoted 4 lines
So, it shouldn't work from years but it has been broken recently, that is the only objection I have. Could you tell why it was working? According to your words- it shouldn't. We are using VMD driver, is that matter?
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") looks like a it could be related. Try reverting that commit and see whether it makes a difference.
Quoted 5 lines
The affected NVMe is indeed behind VMD domain, so I think the commit can make a difference.
Does VMD behave differently on laptops and servers? Anyway, I agree that the issue really lies in "pci=nommconf".
Oh, I have a guess:
- With "pci=nommconf", prior to v5.17-rc1, pciehp did not work in general, but *did* work for NVMe behind a VMD. As of v5.17-rc1, pciehp no longer works for NVMe behind VMD.
- Without "pci=nommconf", pciehp works as expected for all devices including NVMe behind VMD, both before and after v5.17-rc1.
Is that what you're observing?
If so, I doubt there's anything to fix other than getting rid of "pci=nommconf".
Bjorn
Quoted 87 lines · On Fri, 28 Jan 2022 08:03:28 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 71 lines · Kai-Heng Feng
Quoted 60 lines · Bjorn Helgaas
Quoted 25 lines · Mariusz Tkaczyk
Quoted 23 lines · On Thu, 27 Jan 2022 20:52:12 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 20 lines · Mariusz Tkaczyk
...
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Tested on tag pci-v5.17-changes. He have
CONFIG_HOTPLUG_PCI_PCIEandCONFIG_DYNAMIC_DEBUGenabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
Quoted 6 lines
Quoted 3 lines
Maybe I'm missing something. If I understand correctly, the problem has nothing to do with the kernel version (correct me if I'm wrong!)
The problem occurred after the merge commit. It is some kind of regression.
The bug report doesn't yet contain the evidence showing this. It only contains dmesg logs with "pci=nommconf" where pciehp doesn't work (which is the expected behavior) and a log without "pci=nommconf" where pciehp does work (which is again the expected behavior).
Quoted 22 lines
Quoted 21 lines
PCIe native hotplug doesn't work when booted with "pci=nommconf". When using "pci=nommconf", obviously we can't access the extended PCI config space (offset 0x100-0xfff), so none of the extended capabilities are available.
In that case, we don't even ask the platform for control of PCIe hotplug via
_OSC. From the dmesg diff from normal (working) to "pci=nommconf" (not working):-Command line: BOOT_IMAGE=/boot/vmlinuz-smp ... +Command line: BOOT_IMAGE=/boot/vmlinuz-smp pci=nommconf ...
...
-acpi PNP0A08:00:_OSC: OS supports [ExtendedConfig ASPM
ClockPM Segments MSI HPX-Type3] -acpi PNP0A08:00:_OSC:
platform does not support [AER LTR] -acpi PNP0A08:00:_OSC:
OS now controls [PCIeHotplug PME PCIeCapability] +acpi PNP0A08:00:_OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3] +acpi PNP0A08:00:_OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI] +acpi PNP0A08:00: MMCONFIG is disabled, can't access extended PCI configuration space under this bridge.Quoted 8 lines
Quoted 4 lines
So, it shouldn't work from years but it has been broken recently, that is the only objection I have. Could you tell why it was working? According to your words- it shouldn't. We are using VMD driver, is that matter?
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") looks like a it could be related. Try reverting that commit and see whether it makes a difference.Quoted 5 lines
The affected NVMe is indeed behind VMD domain, so I think the commit can make a difference.
Does VMD behave differently on laptops and servers? Anyway, I agree that the issue really lies in "pci=nommconf".
Oh, I have a guess:
- With "pci=nommconf", prior to v5.17-rc1, pciehp did not work in general, but *did* work for NVMe behind a VMD. As of v5.17-rc1, pciehp no longer works for NVMe behind VMD.
- Without "pci=nommconf", pciehp works as expected for all devices including NVMe behind VMD, both before and after v5.17-rc1.
Quoted 6 lines
Is that what you're observing?
If so, I doubt there's anything to fix other than getting rid of "pci=nommconf".
Bjorn
I haven't tested with VMD disabled earlier. I verified it and my observations are as follows:
OS: RHEL 8.4
NO - hotplug not working
YES - hotplug working
pci=nommconf added:
+--------------+-------------------+---------------------+--------------+ | | pci-v5.17-changes | revert-04b12ef163d1 | inbox kernel +--------------+-------------------+---------------------+--------------+ | VMD enabled | NO | YES | YES +--------------+-------------------+---------------------+--------------+ | VMD disabled | NO | NO | NO +--------------+-------------------+---------------------+--------------+
without pci=nommconf:
+--------------+-------------------+---------------------+--------------+ | | pci-v5.17-changes | revert-04b12ef163d1 | inbox kernel +--------------+-------------------+---------------------+--------------+ | VMD enabled | YES | YES | YES +--------------+-------------------+---------------------+--------------+ | VMD disabled | YES | YES | YES +--------------+-------------------+---------------------+--------------+
So, results confirmed your assumptions, but I also confirmed that revert of 04b12ef163d1 ("PCI: vmd: Honor ACPI _OSC on PCIe features") makes it to work as in inbox kernel.
We will drop the legacy parameter in our tests. According to my results there is a regression in VMD caused by: 04b12ef163d1 commit, even if it is not working for nvme anyway. Should it be fixed?
Thanks,
Blazej
Quoted 119 lines · Blazej Kucman
Quoted 84 lines · On Fri, 28 Jan 2022 08:03:28 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 71 lines · Kai-Heng Feng
Quoted 60 lines · Bjorn Helgaas
Quoted 25 lines · Mariusz Tkaczyk
Quoted 23 lines · On Thu, 27 Jan 2022 20:52:12 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 20 lines · Mariusz Tkaczyk
...
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Tested on tag pci-v5.17-changes. He have
CONFIG_HOTPLUG_PCI_PCIEandCONFIG_DYNAMIC_DEBUGenabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
Quoted 6 lines
Quoted 3 lines
Maybe I'm missing something. If I understand correctly, the problem has nothing to do with the kernel version (correct me if I'm wrong!)
The problem occurred after the merge commit. It is some kind of regression.
The bug report doesn't yet contain the evidence showing this. It only contains dmesg logs with "pci=nommconf" where pciehp doesn't work (which is the expected behavior) and a log without "pci=nommconf" where pciehp does work (which is again the expected behavior).
Quoted 22 lines
Quoted 21 lines
PCIe native hotplug doesn't work when booted with "pci=nommconf". When using "pci=nommconf", obviously we can't access the extended PCI config space (offset 0x100-0xfff), so none of the extended capabilities are available.
In that case, we don't even ask the platform for control of PCIe hotplug via
_OSC. From the dmesg diff from normal (working) to "pci=nommconf" (not working):-Command line: BOOT_IMAGE=/boot/vmlinuz-smp ... +Command line: BOOT_IMAGE=/boot/vmlinuz-smp pci=nommconf ...
...
-acpi PNP0A08:00:_OSC: OS supports [ExtendedConfig ASPM
ClockPM Segments MSI HPX-Type3] -acpi PNP0A08:00:_OSC:
platform does not support [AER LTR] -acpi PNP0A08:00:_OSC:
OS now controls [PCIeHotplug PME PCIeCapability] +acpi PNP0A08:00:_OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3] +acpi PNP0A08:00:_OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI] +acpi PNP0A08:00: MMCONFIG is disabled, can't access extended PCI configuration space under this bridge.Quoted 8 lines
Quoted 4 lines
So, it shouldn't work from years but it has been broken recently, that is the only objection I have. Could you tell why it was working? According to your words- it shouldn't. We are using VMD driver, is that matter?
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") looks like a it could be related. Try reverting that commit and see whether it makes a difference.Quoted 5 lines
The affected NVMe is indeed behind VMD domain, so I think the commit can make a difference.
Does VMD behave differently on laptops and servers? Anyway, I agree that the issue really lies in "pci=nommconf".
Oh, I have a guess:
- With "pci=nommconf", prior to v5.17-rc1, pciehp did not work in general, but *did* work for NVMe behind a VMD. As of v5.17-rc1, pciehp no longer works for NVMe behind VMD.
Quoted 7 lines
- Without "pci=nommconf", pciehp works as expected for all devices including NVMe behind VMD, both before and after v5.17-rc1.
Is that what you're observing?
If so, I doubt there's anything to fix other than getting rid of "pci=nommconf".
I haven't tested with VMD disabled earlier. I verified it and my observations are as follows:
OS: RHEL 8.4
NO - hotplug not working
YES - hotplug workingpci=nommconf added:
+--------------+-------------------+---------------------+--------------+ | | pci-v5.17-changes | revert-04b12ef163d1 | inbox kernel +--------------+-------------------+---------------------+--------------+ | VMD enabled | NO | YES | YES +--------------+-------------------+---------------------+--------------+ | VMD disabled | NO | NO | NO +--------------+-------------------+---------------------+--------------+without pci=nommconf:
+--------------+-------------------+---------------------+--------------+ | | pci-v5.17-changes | revert-04b12ef163d1 | inbox kernel +--------------+-------------------+---------------------+--------------+ | VMD enabled | YES | YES | YES +--------------+-------------------+---------------------+--------------+ | VMD disabled | YES | YES | YES +--------------+-------------------+---------------------+--------------+
Quoted 7 lines
So, results confirmed your assumptions, but I also confirmed that revert of
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") makes it to work as in inbox kernel.We will drop the legacy parameter in our tests. According to my results there is a regression in VMD caused by:
04b12ef163d1commit, even if it is not working for nvme anyway. Should it be fixed?
I don't know what the "inbox kernel" is. I guess that's unmodified RHEL 8.4?
And revert-04b12ef163d1 means the pci-v5.17-changes tag plus a revert of 04b12ef163d1?
I think your "hotplug working" or "hotplug not working" notes refer specifically to devices behind VMD, right? They do not refer to devices outside the VMD hierarchy?
So IIUC, the regression is that hotplug of devices behind VMD used to work with "pci=nommconf", but it does not work after 04b12ef163d1. IMO that does not need to be fixed because it was arguably a bug that it *did* work before.
That said, I'm not 100% confident about 04b12ef163d1 because _OSC is a way to negotiate ownership of things that could be owned either by platform firmware or by the OS, and the commit log doesn't make it clear that's the situation here. It's more of a "the problem doesn't happen when we do this" sort of commit log.
If there's anything more to do here, it would be helpful to attach complete dmesg logs from the scenarios of interest to the bugzilla. That will help remove ambiguity about what's being tested and what the results are.
Bjorn
Hi, this is your Linux kernel regression tracker speaking.
Quoted 134 lines · Bjorn Helgaas
Quoted 119 lines · Blazej Kucman
Quoted 84 lines · On Fri, 28 Jan 2022 08:03:28 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 71 lines · Kai-Heng Feng
Quoted 60 lines · Bjorn Helgaas
Quoted 25 lines · Mariusz Tkaczyk
Quoted 23 lines · On Thu, 27 Jan 2022 20:52:12 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 20 lines · Mariusz Tkaczyk
...
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Tested on tag pci-v5.17-changes. He have
CONFIG_HOTPLUG_PCI_PCIEandCONFIG_DYNAMIC_DEBUGenabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
Quoted 6 lines
Quoted 3 lines
Maybe I'm missing something. If I understand correctly, the problem has nothing to do with the kernel version (correct me if I'm wrong!)
The problem occurred after the merge commit. It is some kind of regression.
The bug report doesn't yet contain the evidence showing this. It only contains dmesg logs with "pci=nommconf" where pciehp doesn't work (which is the expected behavior) and a log without "pci=nommconf" where pciehp does work (which is again the expected behavior).
Quoted 22 lines
Quoted 21 lines
PCIe native hotplug doesn't work when booted with "pci=nommconf". When using "pci=nommconf", obviously we can't access the extended PCI config space (offset 0x100-0xfff), so none of the extended capabilities are available.
In that case, we don't even ask the platform for control of PCIe hotplug via
_OSC. From the dmesg diff from normal (working) to "pci=nommconf" (not working):-Command line: BOOT_IMAGE=/boot/vmlinuz-smp ... +Command line: BOOT_IMAGE=/boot/vmlinuz-smp pci=nommconf ...
...
-acpi PNP0A08:00:_OSC: OS supports [ExtendedConfig ASPM
ClockPM Segments MSI HPX-Type3] -acpi PNP0A08:00:_OSC:
platform does not support [AER LTR] -acpi PNP0A08:00:_OSC:
OS now controls [PCIeHotplug PME PCIeCapability] +acpi PNP0A08:00:_OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3] +acpi PNP0A08:00:_OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI] +acpi PNP0A08:00: MMCONFIG is disabled, can't access extended PCI configuration space under this bridge.Quoted 8 lines
Quoted 4 lines
So, it shouldn't work from years but it has been broken recently, that is the only objection I have. Could you tell why it was working? According to your words- it shouldn't. We are using VMD driver, is that matter?
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") looks like a it could be related. Try reverting that commit and see whether it makes a difference.Quoted 5 lines
The affected NVMe is indeed behind VMD domain, so I think the commit can make a difference.
Does VMD behave differently on laptops and servers? Anyway, I agree that the issue really lies in "pci=nommconf".
Oh, I have a guess:
- With "pci=nommconf", prior to v5.17-rc1, pciehp did not work in general, but *did* work for NVMe behind a VMD. As of v5.17-rc1, pciehp no longer works for NVMe behind VMD.
Quoted 7 lines
- Without "pci=nommconf", pciehp works as expected for all devices including NVMe behind VMD, both before and after v5.17-rc1.
Is that what you're observing?
If so, I doubt there's anything to fix other than getting rid of "pci=nommconf".
I haven't tested with VMD disabled earlier. I verified it and my observations are as follows:
OS: RHEL 8.4
NO - hotplug not working
YES - hotplug workingpci=nommconf added:
+--------------+-------------------+---------------------+--------------+ | | pci-v5.17-changes | revert-04b12ef163d1 | inbox kernel +--------------+-------------------+---------------------+--------------+ | VMD enabled | NO | YES | YES +--------------+-------------------+---------------------+--------------+ | VMD disabled | NO | NO | NO +--------------+-------------------+---------------------+--------------+without pci=nommconf:
+--------------+-------------------+---------------------+--------------+ | | pci-v5.17-changes | revert-04b12ef163d1 | inbox kernel +--------------+-------------------+---------------------+--------------+ | VMD enabled | YES | YES | YES +--------------+-------------------+---------------------+--------------+ | VMD disabled | YES | YES | YES +--------------+-------------------+---------------------+--------------+Quoted 7 lines
So, results confirmed your assumptions, but I also confirmed that revert of
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") makes it to work as in inbox kernel.We will drop the legacy parameter in our tests. According to my results there is a regression in VMD caused by:
04b12ef163d1commit, even if it is not working for nvme anyway. Should it be fixed?I don't know what the "inbox kernel" is. I guess that's unmodified RHEL 8.4?
And revert-04b12ef163d1 means the pci-v5.17-changes tag plus a revert of
04b12ef163d1?
Quoted 8 lines
I think your "hotplug working" or "hotplug not working" notes refer specifically to devices behind VMD, right? They do not refer to devices outside the VMD hierarchy?
So IIUC, the regression is that hotplug of devices behind VMD used to work with "pci=nommconf", but it does not work after
04b12ef163d1. IMO that does not need to be fixed because it was arguably a bug that it *did* work before.
FWIW, that afaics does matter. To quote Linus:
``` Users are literally the _only_ thing that matters. No amount of "you shouldn't have used this" or "that behavior was undefined, it's your own fault your app broke" or "that used to work simply because of a kernel bug" is at all relevant. ```
That quote is from:
https://lore.kernel.org/all/CAHk-=wiVi7mSrsMP=fLXQrXK_UimybW=ziLOwSzFTtoXUacWVQ@mail.gmail.com/
So from my point of view as a regression tracker I currently think this still needs to be fixed.
Quoted 10 lines
That said, I'm not 100% confident about
04b12ef163d1because_OSCis a way to negotiate ownership of things that could be owned either by platform firmware or by the OS, and the commit log doesn't make it clear that's the situation here. It's more of a "the problem doesn't happen when we do this" sort of commit log.If there's anything more to do here, it would be helpful to attach complete dmesg logs from the scenarios of interest to the bugzilla. That will help remove ambiguity about what's being tested and what the results are.
Ciao, Thorsten (wearing his 'Linux kernel regression tracker' hat)
P.S.: As a Linux kernel regression tracker I'm getting a lot of reports on my table. I can only look briefly into most of them. Unfortunately therefore I sometimes will get things wrong or miss something important. I hope that's not the case here; if you think it is, don't hesitate to tell me about it in a public reply, that's in everyone's interest.
BTW, I have no personal interest in this issue, which is tracked using regzbot, my Linux kernel regression tracking bot
(https://linux-regtracking.leemhuis.info/regzbot/). I'm only posting this mail to get things rolling again and hence don't need to be CC on all further activities wrt to this regression.
Quoted 138 lines · On Thu, 3 Feb 2022 10:13:15 +0100 Thorsten Leemhuis…
Hi, this is your Linux kernel regression tracker speaking.
Quoted 135 lines · Bjorn Helgaas
Quoted 123 lines · Blazej Kucman
Quoted 85 lines · On Fri, 28 Jan 2022 08:03:28 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 72 lines · Kai-Heng Feng
Quoted 61 lines · Bjorn Helgaas
Quoted 25 lines · Mariusz Tkaczyk
Quoted 23 lines · On Thu, 27 Jan 2022 20:52:12 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 20 lines · Mariusz Tkaczyk
...
Thanks for your suggestions. Blazej did some tests and results were inconclusive. He tested it on two same platforms. On the first one it didn't work, even if he reverted all suggested patches. On the second one hotplugs always worked.He noticed that on first platform where issue has been found initally, there was boot parameter "pci=nommconf". After adding this parameter on the second platform, hotplugs stopped working too.
Tested on tag pci-v5.17-changes. He have
CONFIG_HOTPLUG_PCI_PCIEandCONFIG_DYNAMIC_DEBUGenabled in config. He also attached two dmesg logs to bugzilla with boot parameter 'dyndbg="file pciehp* +p" as requested. One with "pci=nommconf" and one without.Issue seems to related to "pci=nommconf" and it is probably caused by change outside pciehp.
Quoted 6 lines
Quoted 3 lines
Maybe I'm missing something. If I understand correctly, the problem has nothing to do with the kernel version (correct me if I'm wrong!)
The problem occurred after the merge commit. It is some kind of regression.
The bug report doesn't yet contain the evidence showing this. It only contains dmesg logs with "pci=nommconf" where pciehp doesn't work (which is the expected behavior) and a log without "pci=nommconf" where pciehp does work (which is again the expected behavior).
Quoted 22 lines
Quoted 21 lines
PCIe native hotplug doesn't work when booted with "pci=nommconf". When using "pci=nommconf", obviously we can't access the extended PCI config space (offset 0x100-0xfff), so none of the extended capabilities are available.
In that case, we don't even ask the platform for control of PCIe hotplug via
_OSC. From the dmesg diff from normal (working) to "pci=nommconf" (not working):-Command line: BOOT_IMAGE=/boot/vmlinuz-smp ... +Command line: BOOT_IMAGE=/boot/vmlinuz-smp pci=nommconf ...
...
-acpi PNP0A08:00:_OSC: OS supports [ExtendedConfig ASPM
ClockPM Segments MSI HPX-Type3] -acpi PNP0A08:00:_OSC:
platform does not support [AER LTR] -acpi PNP0A08:00:_OSC:
OS now controls [PCIeHotplug PME PCIeCapability] +acpi PNP0A08:00:_OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3] +acpi PNP0A08:00:_OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI] +acpi PNP0A08:00: MMCONFIG is disabled, can't access extended PCI configuration space under this bridge.Quoted 8 lines
Quoted 4 lines
So, it shouldn't work from years but it has been broken recently, that is the only objection I have. Could you tell why it was working? According to your words- it shouldn't. We are using VMD driver, is that matter?
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") looks like a it could be related. Try reverting that commit and see whether it makes a difference.Quoted 5 lines
The affected NVMe is indeed behind VMD domain, so I think the commit can make a difference.
Does VMD behave differently on laptops and servers? Anyway, I agree that the issue really lies in "pci=nommconf".
Oh, I have a guess:
- With "pci=nommconf", prior to v5.17-rc1, pciehp did not work
in general, but *did* work for NVMe behind a VMD. As of v5.17-rc1, pciehp no longer works for NVMe behind VMD.Quoted 8 lines
- Without "pci=nommconf", pciehp works as expected for all
devices including NVMe behind VMD, both before and after v5.17-rc1.Is that what you're observing?
If so, I doubt there's anything to fix other than getting rid of "pci=nommconf".
I haven't tested with VMD disabled earlier. I verified it and my observations are as follows:
OS: RHEL 8.4
NO - hotplug not working
YES - hotplug workingpci=nommconf added:
+--------------+-------------------+---------------------+--------------+ | | pci-v5.17-changes | revert-04b12ef163d1 | inbox kernel +--------------+-------------------+---------------------+--------------+ | VMD enabled | NO | YES | YES +--------------+-------------------+---------------------+--------------+ | VMD disabled | NO | NO | NO +--------------+-------------------+---------------------+--------------+without pci=nommconf:
+--------------+-------------------+---------------------+--------------+ | | pci-v5.17-changes | revert-04b12ef163d1 | inbox kernel +--------------+-------------------+---------------------+--------------+ | VMD enabled | YES | YES | YES +--------------+-------------------+---------------------+--------------+ | VMD disabled | YES | YES | YES +--------------+-------------------+---------------------+--------------+Quoted 8 lines
So, results confirmed your assumptions, but I also confirmed that revert of
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") makes it to work as in inbox kernel.We will drop the legacy parameter in our tests. According to my results there is a regression in VMD caused by:
04b12ef163d1commit, even if it is not working for nvme anyway. Should it be fixed?I don't know what the "inbox kernel" is. I guess that's unmodified RHEL 8.4?
Yes
Quoted 3 lines
Quoted 3 lines
And revert-04b12ef163d1 means the pci-v5.17-changes tag plus a revert of
04b12ef163d1?
Yes
Quoted 4 lines
Quoted 4 lines
I think your "hotplug working" or "hotplug not working" notes refer specifically to devices behind VMD, right? They do not refer to devices outside the VMD hierarchy?
Row in tables with "VMD disabled", means that the VMD is off in UEFI, and VMD is not exposed to OS, so NVME device is not in VMD hierarchy then.
"hotplug working" or "hotplug not working" refers only to the hotplug behaviour.
Quoted 47 lines
Quoted 5 lines
So IIUC, the regression is that hotplug of devices behind VMD used to work with "pci=nommconf", but it does not work after
04b12ef163d1. IMO that does not need to be fixed because it was arguably a bug that it *did* work before.FWIW, that afaics does matter. To quote Linus:
``` Users are literally the _only_ thing that matters. No amount of "you shouldn't have used this" or "that behavior was undefined, it's your own fault your app broke" or "that used to work simply because of a kernel bug" is at all relevant. ```That quote is from:
https://lore.kernel.org/all/CAHk-=wiVi7mSrsMP=fLXQrXK_UimybW=ziLOwSzFTtoXUacWVQ@mail.gmail.com/So from my point of view as a regression tracker I currently think this still needs to be fixed.
Quoted 10 lines
That said, I'm not 100% confident about
04b12ef163d1because_OSCis a way to negotiate ownership of things that could be owned either by platform firmware or by the OS, and the commit log doesn't make it clear that's the situation here. It's more of a "the problem doesn't happen when we do this" sort of commit log.If there's anything more to do here, it would be helpful to attach complete dmesg logs from the scenarios of interest to the bugzilla. That will help remove ambiguity about what's being tested and what the results are.
Ciao, Thorsten (wearing his 'Linux kernel regression tracker' hat)
P.S.: As a Linux kernel regression tracker I'm getting a lot of reports on my table. I can only look briefly into most of them. Unfortunately therefore I sometimes will get things wrong or miss something important. I hope that's not the case here; if you think it is, don't hesitate to tell me about it in a public reply, that's in everyone's interest.BTW, I have no personal interest in this issue, which is tracked using regzbot, my Linux kernel regression tracking bot
(https://linux-regtracking.leemhuis.info/regzbot/). I'm only posting this mail to get things rolling again and hence don't need to be CC on all further activities wrt to this regression.
Quoted 38 lines · Blazej Kucman
Quoted 38 lines
Quoted 38 lines · Blazej Kucman
Quoted 37 lines
Quoted 19 lines · On Fri, 28 Jan 2022 08:03:28 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 7 lines
Quoted 3 lines · Bjorn Helgaas
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") looks like a it could be related. Try reverting that commit and see whether it makes a difference.Quoted 5 lines
The affected NVMe is indeed behind VMD domain, so I think the commit can make a difference.
Does VMD behave differently on laptops and servers? Anyway, I agree that the issue really lies in "pci=nommconf".
Oh, I have a guess:
- With "pci=nommconf", prior to v5.17-rc1, pciehp did not work
in general, but *did* work for NVMe behind a VMD. As of v5.17-rc1, pciehp no longer works for NVMe behind VMD.Quoted 8 lines
- Without "pci=nommconf", pciehp works as expected for all
devices including NVMe behind VMD, both before and after v5.17-rc1.Is that what you're observing?
If so, I doubt there's anything to fix other than getting rid of "pci=nommconf".
I haven't tested with VMD disabled earlier. I verified it and my observations are as follows:
OS: RHEL 8.4
NO - hotplug not working
YES - hotplug working
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
pci=nommconf added:
+--------------+-------------------+---------------------+--------------+ | | pci-v5.17-changes | revert-04b12ef163d1 | inbox kernel +--------------+-------------------+---------------------+--------------+ | VMD enabled | NO | YES | YES +--------------+-------------------+---------------------+--------------+ | VMD disabled | NO | NO | NO +--------------+-------------------+---------------------+--------------+
OK, so the only possible problem case is that booting with VMD enabled and "pci=nommconf". In that case, hotplug for devices below VMD worked before 04b12ef163d1 and doesn't work after.
Your table doesn't show it, but hotplug for devices *not* behind VMD should not work either before or after 04b12ef163d1 because Linux doesn't request PCIe hotplug control when booting with "pci=nommconf".
Why were you testing with "pci=nommconf"? Do you think anybody uses that with VMD and NVMe?
Bjorn
Quoted 56 lines · On Thu, 3 Feb 2022 09:58:04 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 40 lines · Blazej Kucman
Quoted 40 lines
Quoted 40 lines · Blazej Kucman
Quoted 39 lines
Quoted 20 lines · On Fri, 28 Jan 2022 08:03:28 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 7 lines
Quoted 3 lines · Bjorn Helgaas
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") looks like a it could be related. Try reverting that commit and see whether it makes a difference.Quoted 6 lines
The affected NVMe is indeed behind VMD domain, so I think the commit can make a difference.
Does VMD behave differently on laptops and servers? Anyway, I agree that the issue really lies in "pci=nommconf".
Oh, I have a guess:
- With "pci=nommconf", prior to v5.17-rc1, pciehp did not
work in general, but *did* work for NVMe behind a VMD. As of v5.17-rc1, pciehp no longer works for NVMe behind VMD.Quoted 8 lines
- Without "pci=nommconf", pciehp works as expected for all
devices including NVMe behind VMD, both before and after v5.17-rc1.Is that what you're observing?
If so, I doubt there's anything to fix other than getting rid of "pci=nommconf".
I haven't tested with VMD disabled earlier. I verified it and my observations are as follows:
OS: RHEL 8.4
NO - hotplug not working
YES - hotplug workingQuoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
pci=nommconf added:
+--------------+-------------------+---------------------+--------------+ | | pci-v5.17-changes | revert-04b12ef163d1 | inbox kernel +--------------+-------------------+---------------------+--------------+ | VMD enabled | NO | YES | YES +--------------+-------------------+---------------------+--------------+ | VMD disabled | NO | NO | NO +--------------+-------------------+---------------------+--------------+OK, so the only possible problem case is that booting with VMD enabled and "pci=nommconf". In that case, hotplug for devices below VMD worked before
04b12ef163d1and doesn't work after.
Quoted 6 lines
Your table doesn't show it, but hotplug for devices *not* behind VMD should not work either before or after
04b12ef163d1because Linux doesn't request PCIe hotplug control when booting with "pci=nommconf".Why were you testing with "pci=nommconf"? Do you think anybody uses that with VMD and NVMe?
It was added long time ago when it was useful.
On our side we will drop the parameter, and that resolves issue for us.
Bugzilla report can be closed if you don't consider it as regression.
Thanks,
Blazej
Quoted 7 lines · Blazej Kucman
Quoted 2 lines · On Thu, 3 Feb 2022 09:58:04 -0600 Bjorn Helgaas <[email protected]> wrote:
Why were you testing with "pci=nommconf"? Do you think anybody uses that with VMD and NVMe?
It was added long time ago when it was useful.
I'm curious about why it was useful. It suggests a possible MMCONFIG issue in firmware or in Linux. If it was a Linux issue, ideally we would fix that. If it's a firmware issue, ideally we would work around it or automatically turn on "pci=nommconf" so the user wouldn't have to figure that out.
Quoted 1 line
Bugzilla report can be closed if you don't consider it as regression.
OK, I closed it with the details. I'm not entirely convinced that 04b12ef163d1 ("PCI: vmd: Honor ACPI _OSC on PCIe features") was the right thing, but I'll pursue that elsewhere.
Thanks for your patience in working through this, and sorry for the hassle it caused you.
Bjorn
Quoted 7 lines · On Wed, 9 Feb 2022 15:02:18 -0600 Bjorn Helgaas <[email protected]> wrote:
Quoted 6 lines · Blazej Kucman
Quoted 2 lines · On Thu, 3 Feb 2022 09:58:04 -0600 Bjorn Helgaas <[email protected]> wrote:
Why were you testing with "pci=nommconf"? Do you think anybody uses that with VMD and NVMe?
Quoted 8 lines
Quoted 1 line
It was added long time ago when it was useful.
I'm curious about why it was useful. It suggests a possible MMCONFIG issue in firmware or in Linux. If it was a Linux issue, ideally we would fix that. If it's a firmware issue, ideally we would work around it or automatically turn on "pci=nommconf" so the user wouldn't have to figure that out.
The parameter was added many years ago (project has more than 10 years) and I don't know the reason. Probably it was useful on pre-production platforms, for software validation. It was added to our internal BKMs. It didn't cause any real issue in our workflow until now.
Unfortunately, I'm unable to answer more precisely.
We scheduled steps to remove it definitely from our work environment.
Quoted 11 lines
Quoted 2 lines
Bugzilla report can be closed if you don't consider it as regression.
OK, I closed it with the details. I'm not entirely convinced that
04b12ef163d1("PCI: vmd: Honor ACPI_OSCon PCIe features") was the right thing, but I'll pursue that elsewhere.Thanks for your patience in working through this, and sorry for the hassle it caused you.
Bjorn
Thanks,
Blazej