Re: [PATCH v2 4/6] x86/irq: Process nmi sources in NMI handler
From: Sohil Mehta
Date: Mon Jun 24 2024 - 19:38:20 EST
On 6/12/2024 2:54 PM, Jacob Pan wrote:
> Hi H.,
>
> On Tue, 11 Jun 2024 11:41:07 -0700, "H. Peter Anvin" <hpa@xxxxxxxxx> wrote:
>
>> On 6/11/24 09:54, Jacob Pan wrote:
>>> +
>>> + source_bitmask = fred_event_data(regs);
>>> + if (!source_bitmask) {
>>> + pr_warn_ratelimited("NMI without source information!
>>> Disable source reporting.\n");
>>> + setup_clear_cpu_cap(X86_FEATURE_NMI_SOURCE);
>>> + return 0;
>>> + }
>>
>> Is setup_clear_cpu_cap() even meaningful here?
> Right, alternative patching doesn't work here. Let me use a separate flag.
>
You mentioned this somewhere:
"The functionality of NMI source reporting is tied to the FRED. Although
it is enumerated by a unique CPUID feature bit, it cannot be turned off
independently once FRED is activated."
Does this have any implication here? What does disable source reporting
mean if it cannot be turned off?