Bug 215525
Summary: | HotPlug does not work on upstream kernel 5.17.0-rc1 | ||
---|---|---|---|
Product: | Drivers | Reporter: | blazej.kucman |
Component: | PCI | Assignee: | drivers_pci (drivers_pci) |
Status: | RESOLVED DOCUMENTED | ||
Severity: | normal | CC: | bjorn, blazej.kucman, nirmal.patel |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 5.17.0-rc1 upstream | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
dmesg
dmesg when hotplugs not works, parameter pci=nommconf and dyndbg added. dmesg when hotplugs works, without parameter pci=nommconf, dyndbg added. |
Description
blazej.kucman
2022-01-24 11:46:14 UTC
Created attachment 300338 [details]
dmesg when hotplugs not works, parameter pci=nommconf and dyndbg added.
Created attachment 300339 [details]
dmesg when hotplugs works, without parameter pci=nommconf, dyndbg added.
Summary from the email thread at https://lore.kernel.org/r/20220124214635.GA1553164@bhelgaas: Issue only occurs when booting with "pci=nommconf" and is related to 04b12ef163d1 ("PCI: vmd: Honor ACPI _OSC on PCIe features") [1]. Prior to 04b12ef163d1, when booting with "pci=nommconf", pciehp hotplug did not work for devices in general because Linux requires support for extended config before it requests control of PCIe features [2, 3, 4]. However, hotplug *did* work for devices below a VMD because VMD acts like a host bridge and inherited the default "native_pcie_hotplug" setting [5], lwhich is "OS owns pciehp". After 04b12ef163d1, VMD inherits the real ACPI host bridge "native_pcie_hotplug" setting, which is "platform owns pciehp" since Linux didn't ask for control of it. Therefore, pciehp hotplug doesn't work for *any* devices. We can avoid the issue by omitting the "pci=nommconf" parameter. In that case, Linux *will* request control of pciehp, and hotplug will work for all devices, including those below a VMD. [1] https://git.kernel.org/linus/04b12ef163d1 [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/acpi/pci_root.c?id=v5.16#n41 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/acpi/pci_root.c?id=v5.16#n388 [4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/acpi/pci_root.c?id=v5.16#n450 [5] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/probe.c?id=v5.16#n581 |