Project

General

Profile

Actions

Feature #14821

closed

Add additional AVX512 capabilities

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

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

100%

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

Description

There are several additional AVX512 related features that are starting to come out on recent hardware such as Ice Lake and related. We should add these next set of features. These include:

  • GFNI
  • AVX512 Bit algorithms
  • AVX512 VP2INTERSECT
  • AVX512 BF16
  • AVX512 VBMI2

This pushes us beyond the limits of the HWCAP2 aux vector entry which necessitates doing something more involved to make this happen.


Related issues

Related to illumos gate - Bug #14823: aux vector feature mapping should use x86_featuresetClosedRobert 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 Bug #14823: aux vector feature mapping should use x86_featureset added
Actions #2

Updated by Robert Mustacchi 2 months ago

  • Related to Feature #14822: Need new word of hardware capabilities added
Actions #3

Updated by Robert Mustacchi about 2 months ago

To show that this was properly detected through the system I looked at two things, the pauxv output and isainfo:

$ isainfo -x
amd64: avx512_bf16 avx512_vbmi2 avx512_bitalg gfni vaes vpclmulqdq avx512_vnni clzero monitorx clwb clflushopt fsgsbase sha avx512_vpopcntdq avx512vbmi avx512vl avx512bw avx512cd avx512ifma avx512dq avx512f rdseed adx avx2 fma bmi2 bmi1 rdrand f16c amd_svm avx xsave pclmulqdq aes movbe sse4.2 sse4.1 ssse3 amd_lzcnt popcnt amd_sse4a tscp ahf cx16 sse3 sse2 sse fxsr amd_mmx mmx cmov amd_sysc cx8 tsc fpu
i386: avx512_bf16 avx512_vbmi2 avx512_bitalg gfni vaes vpclmulqdq avx512_vnni clzero monitorx clwb clflushopt sha avx512_vpopcntdq avx512vbmi avx512vl avx512bw avx512cd avx512ifma avx512dq avx512f rdseed adx avx2 fma bmi2 bmi1 rdrand f16c amd_svm avx xsave pclmulqdq aes movbe sse4.2 sse4.1 ssse3 amd_lzcnt popcnt amd_sse4a tscp ahf cx16 sse3 sse2 sse fxsr amd_mmx mmx cmov amd_sysc cx8 tsc fpu
rm@gilgamesh /opt $ pauxv $$
100517: -bash
AT_SUN_PLATFORM 0xfffffc7fffdff8e2 i86pc
AT_SUN_EXECNAME 0xfffffc7fffdff8e8 /usr/bin/bash
AT_PHDR         0x0000000000400040 
AT_PHENT        0x0000000000000038 
AT_PHNUM        0x0000000000000006 
AT_ENTRY        0x0000000000430630 
AT_SUN_LDDATA   0xfffffc7fe5739000 
AT_BASE         0xfffffc7fe56d3000 
AT_FLAGS        0x0000000000000000 
AT_PAGESZ       0x0000000000001000 
AT_SUN_AUXFLAGS 0x0000000000000002 
AT_SUN_HWCAP    0x00000000bfff5cf7 AMD_SVM | AVX | XSAVE | PCLMULQDQ | AES | MOVBE | SSE4.2 | SSE4.1 | SSSE3 | AMD_LZCNT | POPCNT | AMD_SSE4A | TSCP | AHF | CX16 | SSE3 | SSE2 | SSE | FXSR | AMD_MMX | MMX | CMOV | AMD_SYSC | CX8 | TSC | FPU
AT_SUN_HWCAP2   0x00000000bff3e7ff AVX512_BITALG | GFNI | VAES | VPCLMULQDQ | AVX512_VNNI | CLZERO | MONITORX | CLWB | CLFLUSHOPT | FSGSBASE | SHA | AVX512_VPOPCDQ | AVX512VBMI | AVX512VL | AVX512BW | AVX512CD | AVX512IFMA | AVX512DQ | AVX512F | RDSEED | ADX | AVX2 | FMA | BMI2 | BMI1 | RDRAND | F16C
AT_SUN_HWCAP3   0x0000000000000003 AVX512_BF16 | AVX512_VBMI2
AT_SUN_COMMPAGE 0xfffffc7fef3f0000 
AT_SUN_FPTYPE   0x0000000000000002 
AT_SUN_FPSIZE   0x0000000000000988 

Finally, it's worth going through and verifying that AVX512 is enabled just as another sanity check (as part of this cleaned that up particularly in the context of #14823). Here if we look at what the kernel's xsave filter is:

> xsave_bv_all/X
xsave_bv_all:
xsave_bv_all:   e7              

Here, the 0xe0 corresponds to AVX512.

Finally, a spot check of ::x86_featureset in mdb -k does show these values here.

Actions #4

Updated by Electric Monk about 2 months ago

  • Gerrit CR set to 2300
Actions #5

Updated by Electric Monk 18 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