Print this page
10924 Need mitigation of L1TF (CVE-2018-3646)
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Peter Tribble <peter.tribble@gmail.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/thread.h
          +++ new/usr/src/uts/common/sys/thread.h
↓ open down ↓ 343 lines elided ↑ open up ↑
 344  344  #ifdef __amd64
 345  345          uint64_t        t_dtrace_regv;  /* DTrace saved reg from fasttrap */
 346  346          uint64_t        t_useracc;      /* SMAP state saved across swtch() */
 347  347  #endif
 348  348          hrtime_t        t_hrtime;       /* high-res last time on cpu */
 349  349          kmutex_t        t_ctx_lock;     /* protects t_ctx in removectx() */
 350  350          struct waitq    *t_waitq;       /* wait queue */
 351  351          kmutex_t        t_wait_mutex;   /* used in CV wait functions */
 352  352  
 353  353          char            *t_name;        /* thread name */
      354 +
      355 +        uint64_t        t_unsafe;       /* unsafe to run with HT VCPU thread */
 354  356  } kthread_t;
 355  357  
 356  358  /*
 357  359   * Thread flag (t_flag) definitions.
 358  360   *      These flags must be changed only for the current thread,
 359  361   *      and not during preemption code, since the code being
 360  362   *      preempted could be modifying the flags.
 361  363   *
 362  364   *      For the most part these flags do not need locking.
 363  365   *      The following flags will only be changed while the thread_lock is held,
↓ open down ↓ 42 lines elided ↑ open up ↑
 406  408   * Thread scheduler flag (t_schedflag) definitions.
 407  409   *      The thread must be locked via thread_lock() or equiv. to change these.
 408  410   */
 409  411  #define TS_LOAD         0x0001  /* thread is in memory */
 410  412  #define TS_DONT_SWAP    0x0002  /* thread/lwp should not be swapped */
 411  413  #define TS_SWAPENQ      0x0004  /* swap thread when it reaches a safe point */
 412  414  #define TS_ON_SWAPQ     0x0008  /* thread is on the swap queue */
 413  415  #define TS_SIGNALLED    0x0010  /* thread was awakened by cv_signal() */
 414  416  #define TS_PROJWAITQ    0x0020  /* thread is on its project's waitq */
 415  417  #define TS_ZONEWAITQ    0x0040  /* thread is on its zone's waitq */
      418 +#define TS_VCPU         0x0080  /* thread will enter guest context */
 416  419  #define TS_CSTART       0x0100  /* setrun() by continuelwps() */
 417  420  #define TS_UNPAUSE      0x0200  /* setrun() by unpauselwps() */
 418  421  #define TS_XSTART       0x0400  /* setrun() by SIGCONT */
 419  422  #define TS_PSTART       0x0800  /* setrun() by /proc */
 420  423  #define TS_RESUME       0x1000  /* setrun() by CPR resume process */
 421  424  #define TS_CREATE       0x2000  /* setrun() by syslwp_create() */
 422  425  #define TS_RUNQMATCH    0x4000  /* exact run queue balancing by setbackdq() */
 423  426  #define TS_ALLSTART     \
 424  427          (TS_CSTART|TS_UNPAUSE|TS_XSTART|TS_PSTART|TS_RESUME|TS_CREATE)
 425  428  #define TS_ANYWAITQ     (TS_PROJWAITQ|TS_ZONEWAITQ)
↓ open down ↓ 309 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX