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>,
kengyu@lexical.tw
Subject: Re: [PROBLEM] c5.metal on AWS fails to kexec after "PCI: Explicitly put devices into D0 when initializing"
Date: Tue, 6 Jan 2026 00:06:26 -0600 [thread overview]
Message-ID: <fcc052db-e3da-4c4a-82d3-67e8ffe07f8f@amd.com> (raw)
In-Reply-To: <a69dfa26-9ca8-4f3d-ab27-c28f16130c16@amd.com>
On 12/4/2025 11:31 PM, Mario Limonciello wrote:
>
>
> 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.
>
Hi Bjorn,
Can you review this thread and provide some comments on which way you
want to go to fix this issue?
Here's a full link to the rest of the thread if you don't have it.
https://lore.kernel.org/linux-pci/CAKAwkKvmdKxRRA4cR=jJEdyadon6uKXe+aFXaGSe=PNSgwDf9g@mail.gmail.com/#t
Thanks,
next prev parent reply other threads:[~2026-01-06 6:06 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
2026-01-06 6:06 ` Mario Limonciello [this message]
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=fcc052db-e3da-4c4a-82d3-67e8ffe07f8f@amd.com \
--to=mario.limonciello@amd.com \
--cc=bhelgaas@google.com \
--cc=jay.vosburgh@canonical.com \
--cc=kengyu@lexical.tw \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.