Re: pcie hotplug driver probe is not getting called

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bjorn,

Yes, it's a virtual x86 Qemu environment with rtl simulated pcie gen6
switch hooked to the host controller.

The simulation environment is 3rd party and my guess is it's a
passthrough(guessing) .

I can confirm that msi is received to the Qemu host because the USP
port has f0, f1, f2, f3, f4 and f4 is an scsi end point function and
interrupts are used for command/response.

I enabled a few more debugs, now I can see more information from
pciehp dumped into the kernel log.

Thanks for the details, I was not aware that _OSC flags need to be
built by firmware to enable native PCIe hotplug.

On Tue, 1 Oct 2024 at 00:58, Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote:
>
> On Sun, Sep 29, 2024 at 07:29:32PM +0530, Maverickk 78 wrote:
> > Hi Bjorn,
> >
> > I have a switch connecting to the Host bridge, one of the downstream
> > port(02:1.0) on the switch has the slot enabled.
> >
> > Appended pcie_ports=native along with pciehp.pciehp_force=1
> > pciehp.pciehp_debug=1  to the cmdline and I see the driver creating symlink
> > to sysfs device node.
> >
> > Does this mean pciehp can handle the hotplug events? asking this because
> > none of the functions in pciehp_core listed in ftrace?
>
> From the dmesg log you attached:
>
>   [    0.000000] DMI: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.14.0-0-g155821a-20210629_105355-sharpie 04/01/2014
>   [    0.000000] Hypervisor detected: KVM
>   [    0.408755] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.11.0+ root=UUID=f563804b-1b93-4921-90e1-4114c8111e8f ro modprobe.blacklist=mpt3sas ftrace=function_graph ftrace_graph_filter=*pcie* pciehp.pciehp_force=1 pciehp.pciehp_debug=1 pcie_ports=native quite splash crashkernel=512M-:192M vt.handoff=7
>   [    1.640055] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
>   [    1.736168] acpi PNP0A08:00: _OSC: platform does not support [PCIeHotplug LTR DPC]
>   [    1.738096] acpi PNP0A08:00: _OSC: OS now controls [SHPCHotplug PME AER PCIeCapability]
>   [    9.885390] pcieport 0000:02:01.0: pciehp: Slot #0 AttnBtn+ PwrCtrl+ MRL+ AttnInd+ PwrInd+ HotPlug+ Surprise+ Interlock- NoCompl- IbPresDis- LLActRep+
>
> I assume this kernel is running as a KVM guest.  The firmware _OSC
> says the platform (QEMU) doesn't support native PCIe hotplug, so
> host->native_pcie_hotplug will be false.  But of course
> "pcie_ports=native" would set pcie_ports_native, so the portdrv
> get_port_device_capability() will set PCIE_PORT_SERVICE_HP, which
> allows pciehp to bind to 02:01.0.
>
> The "pcieport 0000:02:01.0: pciehp: Slot #0" line shows that
> pciehp_probe() was called.
>
> I don't know whether QEMU supports PCIe hotplug interrupts though.
>
> When do you expect pciehp to do something?  Are you hotplugging a
> physical device that is passed through to this guest?
>
> Bjorn





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux