Print this page
11967 need TAA mitigation
Portions contributed by: Robert Mustacchi <rm@fingolfin.org>
Reviewed by: Dan McDonald <danmcd@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/sys/x86_archext.h
          +++ new/usr/src/uts/intel/sys/x86_archext.h
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
  23   23   * Copyright (c) 2011 by Delphix. All rights reserved.
  24   24   */
  25   25  /*
  26   26   * Copyright (c) 2010, Intel Corporation.
  27   27   * All rights reserved.
  28   28   */
  29   29  /*
  30      - * Copyright 2019 Joyent, Inc.
       30 + * Copyright 2020 Joyent, Inc.
  31   31   * Copyright 2012 Jens Elkner <jel+illumos@cs.uni-magdeburg.de>
  32   32   * Copyright 2012 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
  33   33   * Copyright 2014 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
  34   34   * Copyright 2018 Nexenta Systems, Inc.
  35   35   */
  36   36  
  37   37  #ifndef _SYS_X86_ARCHEXT_H
  38   38  #define _SYS_X86_ARCHEXT_H
  39   39  
  40   40  #if !defined(_ASM)
↓ open down ↓ 416 lines elided ↑ open up ↑
 457  457  /*
 458  458   * Intel IA32_ARCH_CAPABILITIES MSR.
 459  459   */
 460  460  #define MSR_IA32_ARCH_CAPABILITIES              0x10a
 461  461  #define IA32_ARCH_CAP_RDCL_NO                   0x0001
 462  462  #define IA32_ARCH_CAP_IBRS_ALL                  0x0002
 463  463  #define IA32_ARCH_CAP_RSBA                      0x0004
 464  464  #define IA32_ARCH_CAP_SKIP_L1DFL_VMENTRY        0x0008
 465  465  #define IA32_ARCH_CAP_SSB_NO                    0x0010
 466  466  #define IA32_ARCH_CAP_MDS_NO                    0x0020
      467 +#define IA32_ARCH_CAP_IF_PSCHANGE_MC_NO         0x0040
      468 +#define IA32_ARCH_CAP_TSX_CTRL                  0x0080
      469 +#define IA32_ARCH_CAP_TAA_NO                    0x0100
 467  470  
 468  471  /*
 469  472   * Intel Speculation related MSRs
 470  473   */
 471  474  #define MSR_IA32_SPEC_CTRL      0x48
 472  475  #define IA32_SPEC_CTRL_IBRS     0x01
 473  476  #define IA32_SPEC_CTRL_STIBP    0x02
 474  477  #define IA32_SPEC_CTRL_SSBD     0x04
 475  478  
 476  479  #define MSR_IA32_PRED_CMD       0x49
 477  480  #define IA32_PRED_CMD_IBPB      0x01
 478  481  
 479  482  #define MSR_IA32_FLUSH_CMD      0x10b
 480  483  #define IA32_FLUSH_CMD_L1D      0x01
 481  484  
 482  485  /*
      486 + * Intel TSX Control MSRs
      487 + */
      488 +#define MSR_IA32_TSX_CTRL               0x122
      489 +#define IA32_TSX_CTRL_RTM_DISABLE       0x01
      490 +#define IA32_TSX_CTRL_CPUID_CLEAR       0x02
      491 +
      492 +/*
 483  493   * Intel Thermal MSRs
 484  494   */
 485  495  #define MSR_IA32_THERM_INTERRUPT        0x19b
 486  496  #define IA32_THERM_INTERRUPT_HIGH_IE    0x00000001
 487  497  #define IA32_THERM_INTERRUPT_LOW_IE     0x00000002
 488  498  #define IA32_THERM_INTERRUPT_PROCHOT_IE 0x00000004
 489  499  #define IA32_THERM_INTERRUPT_FORCEPR_IE 0x00000008
 490  500  #define IA32_THERM_INTERRUPT_CRIT_IE    0x00000010
 491  501  #define IA32_THERM_INTERRUPT_TR1_VAL(x) (((x) >> 8) & 0x7f)
 492  502  #define IA32_THERM_INTTERUPT_TR1_IE     0x00008000
↓ open down ↓ 183 lines elided ↑ open up ↑
 676  686  #define X86FSET_CLZERO          87
 677  687  #define X86FSET_XOP             88
 678  688  #define X86FSET_FMA4            89
 679  689  #define X86FSET_TBM             90
 680  690  #define X86FSET_AVX512VNNI      91
 681  691  #define X86FSET_AMD_PCEC        92
 682  692  #define X86FSET_MD_CLEAR        93
 683  693  #define X86FSET_MDS_NO          94
 684  694  #define X86FSET_CORE_THERMAL    95
 685  695  #define X86FSET_PKG_THERMAL     96
      696 +#define X86FSET_TSX_CTRL        97
      697 +#define X86FSET_TAA_NO          98
 686  698  
 687  699  /*
 688  700   * Intel Deep C-State invariant TSC in leaf 0x80000007.
 689  701   */
 690  702  #define CPUID_TSC_CSTATE_INVARIANCE     (0x100)
 691  703  
 692  704  /*
 693  705   * Intel TSC deadline timer
 694  706   */
 695  707  #define CPUID_DEADLINE_TSC      (1 << 24)
↓ open down ↓ 341 lines elided ↑ open up ↑
1037 1049   * ABI to hold meaningful values. Adding additional bits here can have serious
1038 1050   * performance implications and cause performance degradations when using the
1039 1051   * FPU vector (xmm) registers.
1040 1052   */
1041 1053  #define XFEATURE_FP_INITIAL     (XFEATURE_LEGACY_FP | XFEATURE_SSE)
1042 1054  
1043 1055  #if !defined(_ASM)
1044 1056  
1045 1057  #if defined(_KERNEL) || defined(_KMEMUSER)
1046 1058  
1047      -#define NUM_X86_FEATURES        97
     1059 +#define NUM_X86_FEATURES        99
1048 1060  extern uchar_t x86_featureset[];
1049 1061  
1050 1062  extern void free_x86_featureset(void *featureset);
1051 1063  extern boolean_t is_x86_feature(void *featureset, uint_t feature);
1052 1064  extern void add_x86_feature(void *featureset, uint_t feature);
1053 1065  extern void remove_x86_feature(void *featureset, uint_t feature);
1054 1066  extern boolean_t compare_x86_featureset(void *setA, void *setB);
1055 1067  extern void print_x86_featureset(void *featureset);
1056 1068  
1057 1069  
↓ open down ↓ 230 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX