[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0467ac99-dd3d-410a-8326-df4396d0cabb@redhat.com>
Date: Tue, 3 Dec 2024 20:39:45 -0500
From: Waiman Long <llong@...hat.com>
To: Rik van Riel <riel@...riel.com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2] x86/nmi: Add an emergency handler in nmi_desc & use it
in nmi_shootdown_cpus()
On 12/3/24 8:00 PM, Rik van Riel wrote:
> On Tue, 2024-12-03 at 10:07 -0500, Waiman Long wrote:
>> Another way to fix this problem while allowing panic() calls from
>> NMI context is by adding a new emergency NMI handler to the nmi_desc
>> structure and provide a new set_emergency_nmi_handler() helper to
>> atomically set crash_nmi_callback() in any context. The new emergency
>> handler will be invoked first before other handlers in the linked
>> list. That will eliminate the need to take any lock and serve the
>> panic
>> in NMI use case.
>>
>> Signed-off-by: Waiman Long <longman@...hat.com>
> I've seen that panic come by a number of times, but
> never came up with a good fix.
>
> Your idea certainly looks like it should work, and
> avoid all the issues along the way.
>
> Acked-by: Rik van Riel <riel@...riel.com>
Thanks for the review.
Cheers,
Longman
Powered by blists - more mailing lists