Project

General

Profile

Actions

Bug #14823

closed

aux vector feature mapping should use x86_featureset

Added by Robert Mustacchi 2 months ago. Updated 20 days ago.

Status:
Closed
Priority:
Normal
Category:
kernel
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

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 struct cpuid_info.

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.


Related issues

Related to illumos gate - Feature #14821: Add additional AVX512 capabilitiesClosedRobert Mustacchi

Actions
Related to illumos gate - Feature #14822: Need new word of hardware capabilitiesClosedRobert Mustacchi

Actions
Actions #1

Updated by Robert Mustacchi 2 months ago

  • Related to Feature #14821: Add additional AVX512 capabilities added
  • Related to Feature #14822: Need new word of hardware capabilities added
Actions #2

Updated by Electric Monk about 2 months ago

  • Gerrit CR set to 2300
Actions #3

Updated by Robert Mustacchi 24 days ago

I tested this as part of #14821 and went through a couple of different system and verified that the set of bits we saw in isainfo hadn't changed (except to add new features with #14821).

Actions #4

Updated by Electric Monk 20 days ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 56726c7e321b6e5ecb2f10215f5386016547e68c

commit  56726c7e321b6e5ecb2f10215f5386016547e68c
Author: Robert Mustacchi <rm@fingolfin.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 <richlowe@richlowe.net>
    Reviewed by: Patrick Mooney <pmooney@pfmooney.com>
    Approved by: Dan McDonald <danmcd@mnx.io>

Actions

Also available in: Atom PDF