aux vector feature mapping should use x86_featureset
While on a system, I saw several items that were showing up in isainfo, but were not in the corresponding x86_featureset. The problem here is that most of the way cpuid_pass4 today works is by trying to work with things in two ways. The x86_featureset represents things that the kernel may want to know about or be involved in using. Over time, almost everything that we're passing through is showing up in there because it simplifies some of the overall handling. Originally the x86_featureset worked by when items were not present in it for whatever reason we would clear the corresponding cpuid bits that we had stored.
This has ultimately turned into a maintenance issue and allowed things like the above to creep in. It also makes it more complicated as every new thing that we add we have to make sure when it's removed (say due to disabling xsave) that not only do we get the features removed but we also clear out the information from the corresponding fields of the
While not every aux vector entry is driven by the
x86_featureset, almost all of them are. This gives us an opportunity to just phrase this as a mapping between one and the other. This allows entries to be more table driven and should simplify and eliminate most of the cpuid clearing logic, hopefully simplifying and easing maintenance here as well as making it less likely for things to get out of sync in this way. This also allows the
struct cpuid_info state to reflect what we actually read from the cpu.
Updated by Electric Monk 20 days ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 56726c7e321b6e5ecb2f10215f5386016547e68c Author: Robert Mustacchi <firstname.lastname@example.org> Date: 2022-09-11T04:06:00.000Z 14821 Add additional AVX512 capabilities 14822 Need new word of hardware capabilities 14823 aux vector feature mapping should use x86_featureset Reviewed by: Richard Lowe <email@example.com> Reviewed by: Patrick Mooney <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>