Re: [PATCH 4/6] x86/irq: Process nmi sources in NMI handler

From: H. Peter Anvin
Date: Wed May 29 2024 - 17:13:01 EST


On 5/29/24 13:33, Jacob Pan wrote:
+
+ rcu_read_lock();
+ /* Bit 0 is for unknown NMI sources, skip it. */
+ for_each_set_bit_from(vec, &source_bitmask, NR_NMI_SOURCE_VECTORS) {
+ a = rcu_dereference(nmiaction_src_table[vec]);
+ if (!a) {
+ pr_warn_ratelimited("NMI received %d no handler", vec);
+ continue;
+ }

In this case, you should assume some chipset hardware or VMM is giving you garbage in the event bitmask, and treat it as if bit 0 were set.

-hpa