Re: [PATCH v2 1/6] x86/irq: Add enumeration of NMI source reporting CPU feature
From: Sohil Mehta
Date: Thu Jun 27 2024 - 19:21:06 EST
On 6/27/2024 3:23 PM, Jacob Pan wrote:
> I don't think this is true. For a simplified example:
> cpuid_deps has the following feature-depends pairs.
> [1, 3]
> [2, 3]
> now, do_clear_cpu_cap(c, 2)
>
> Before the loop below __set_bit(feature, disable), bit 2 is set.
>
> Since there is no other features depend on 2, the loop below will not clear
> any other features. no?
>
You are right. The table-scan only processes the dependencies of the
feature that is being disabled but not of any other features that might
have a missing dependency.
Maybe it might be useful to have a common function that scans through
all the dependencies at boot. It would mainly help detect hardware (or
VMM) inconsistencies sooner than later.