linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Maverickk 78 <maverickk1778@gmail.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: pcie hotplug driver probe is not getting called
Date: Mon, 30 Sep 2024 14:28:34 -0500	[thread overview]
Message-ID: <20240930192834.GA187120@bhelgaas> (raw)
In-Reply-To: <CALfBBTsmKYf5FT-pxLfM-C1EgdrKKhQU43OhMDBz2ZPtKcxaLQ@mail.gmail.com>

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

  parent reply	other threads:[~2024-09-30 19:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-27 15:20 pcie hotplug driver probe is not getting called Maverickk 78
2024-09-27 17:17 ` Bjorn Helgaas
2024-09-29 13:59   ` Maverickk 78
2024-09-30 12:49     ` Maverickk 78
2024-09-30 19:28     ` Bjorn Helgaas [this message]
2024-10-01 12:48       ` Maverickk 78
2024-10-01 18:09         ` Maverickk 78
2024-10-01 18:19           ` Keith Busch
     [not found]             ` <CALfBBTtxJB1BQkSZ=RBKCiZKNeTxsJHAZ50jdBUjNSmOf79NWw@mail.gmail.com>
2024-10-04 18:20               ` Maverickk 78
2024-10-04 21:56                 ` Bjorn Helgaas
     [not found]                   ` <CALfBBTtjXJiZBSfFTUAPsD+G15nPQQsn-2sCrAt1UwPsrNsqNg@mail.gmail.com>
2024-10-15  8:44                     ` Maverickk 78

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240930192834.GA187120@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=maverickk1778@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).