Project

General

Profile

Feature #10226

Need support for new EPYC ISA extensions

Added by Robert Mustacchi 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
kernel
Start date:
2019-01-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

There are a number of ISA extensions present in EPYC. We need to make sure that these are all plumbed through.

I went through and compared what we detect today on an EPYC (naples) system and what is supposed to exist in the standard systems programming manual. The following instructions extensions aren't detected, but are already plumbed up for Intel:

  • xsaveopt
  • xsavec
  • xsaves
  • smap
  • smep
  • adx
  • rdseed
  • bmi1
  • bmi2
  • avx2

The following are shipping on both, but aren't being detected for either:

  • fsgsbase
  • sha
  • clflopt
  • xgetbc

The following are specific to AMD and have are present on EPYC:

  • monitorx
  • skinit
  • clzero

The following used to exist on AMD systems, are missing from illumos and aren't in EPYC:

  • xop
  • fma4

I've ended up adding support for most of these and plumbed through a number of the user features. Notably, the following have not been plumbed through in isainfo:

  • xop
  • fma4
  • tbm

The reason I did this was that they were removed from newer ISAs. As such it didn't seem worth adding them especially when in some ways they've been supplanted by avx and logically they should have a lower bit range than AVX.

To test these changes I compared what changed from before and after on the following CPUs:

  • Haswell E3 (addition of fsgsbase)
  • Skylake Gold (addition of clwb clflushopt fsgsbase)
  • AMD EPYC (addition of clzero monitorx clflushopt fsgsbase)

I also ran through the dis test suite.

History

#1

Updated by Electric Monk 9 months ago

  • Status changed from New to Closed

git commit cff040f3ef42d16ae655969398f5a5e6e700b85e

commit  cff040f3ef42d16ae655969398f5a5e6e700b85e
Author: Robert Mustacchi <rm@joyent.com>
Date:   2019-01-18T21:39:51.000Z

    10226 Need support for new EPYC ISA extensions
    Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
    Reviewed by: Jason King <jason.king@joyent.com>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF