From: Mario Limonciello <mario.limonciello@amd.com>
To: Matthew Ruffell <matthew.ruffell@canonical.com>,
"bhelgaas@google.com" <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>,
Jay Vosburgh <jay.vosburgh@canonical.com>
Subject: Re: [PROBLEM] c5.metal on AWS fails to kexec after "PCI: Explicitly put devices into D0 when initializing"
Date: Thu, 4 Dec 2025 23:31:01 -0600 [thread overview]
Message-ID: <a69dfa26-9ca8-4f3d-ab27-c28f16130c16@amd.com> (raw)
In-Reply-To: <CAKAwkKvoRW9QE5tt+B59sYYpW5DcGP6f_+0nObzVhw15-KhbNw@mail.gmail.com>
On 12/4/2025 9:10 PM, Matthew Ruffell wrote:
> Sorry accidentally sent the message.
>
> The nvme was still in state 0 / PCI_D0:
>
> [ 109.801025] mruffell: vendor: 1d0f, device: 61, state: 0
> [ 109.819542] nvme 0000:90:00.0: mruffell: Current PCI device.
>
> /sys/bus/pci/devices$ ll
> lrwxrwxrwx 1 root root 0 Dec 4 23:24 0000:90:00.0@ ->
> ../../../devices/pci0000:7a/0000:7a:02.0/0000:8d:00.0/0000:8e:01.0/0000:90:00.0
>
> All of these devices are also state 0. Interesting.
>
>>> I have a relatively ignorant question. Can you reproduce with kdump and
>>> a crash too?
>>>
>>> I don't actually know if you configure kdump and then crash the kernel
>>> (say magic sys-rq key), does pci_device_shutdown() get called in order
>>> to do the kexec? Or because the kernel is already in a crash state is
>>> there just a jump into the crash kernel image location?
>>
>
> I did check this. I triggered a crash with magic sysrq, and
> pci_device_shutdown()
> was never called. It never printed out my debug messages from
> pci_device_shutdown(), instead it just oopsed and booted straight to the crash
> kernel.
>
> Thanks,
> Matthew
OK so to me we have two options that you proved both work.
1) Call pci_set_master() during startup.
2) Drop pci_clear_master() for the kexec case during shutdown.
I think we need comments from Bjorn here on which direction is safer
generally speaking.
next prev parent reply other threads:[~2025-12-05 5:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 3:52 [PROBLEM] c5.metal on AWS fails to kexec after "PCI: Explicitly put devices into D0 when initializing" Matthew Ruffell
2025-09-19 5:02 ` Mario Limonciello
2025-12-04 5:04 ` Matthew Ruffell
2025-12-04 5:29 ` Mario Limonciello
2025-12-05 3:06 ` Matthew Ruffell
2025-12-05 3:10 ` Matthew Ruffell
2025-12-05 5:31 ` Mario Limonciello [this message]
2026-01-06 6:06 ` Mario Limonciello
2026-02-13 5:54 ` Matthew Ruffell
2026-02-13 19:26 ` Bjorn Helgaas
2026-02-17 14:36 ` Mario Limonciello
2026-02-23 6:04 ` Mario Limonciello
2026-02-25 5:21 ` Matthew Ruffell
2026-02-25 5:42 ` Mario Limonciello
2025-12-05 5:28 ` Mario Limonciello
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=a69dfa26-9ca8-4f3d-ab27-c28f16130c16@amd.com \
--to=mario.limonciello@amd.com \
--cc=bhelgaas@google.com \
--cc=jay.vosburgh@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=matthew.ruffell@canonical.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