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>

@@ -349,10 +349,12 @@
         kmutex_t        t_ctx_lock;     /* protects t_ctx in removectx() */
         struct waitq    *t_waitq;       /* wait queue */
         kmutex_t        t_wait_mutex;   /* used in CV wait functions */
 
         char            *t_name;        /* thread name */
+
+        uint64_t        t_unsafe;       /* unsafe to run with HT VCPU thread */
 } kthread_t;
 
 /*
  * Thread flag (t_flag) definitions.
  *      These flags must be changed only for the current thread,

@@ -411,10 +413,11 @@
 #define TS_SWAPENQ      0x0004  /* swap thread when it reaches a safe point */
 #define TS_ON_SWAPQ     0x0008  /* thread is on the swap queue */
 #define TS_SIGNALLED    0x0010  /* thread was awakened by cv_signal() */
 #define TS_PROJWAITQ    0x0020  /* thread is on its project's waitq */
 #define TS_ZONEWAITQ    0x0040  /* thread is on its zone's waitq */
+#define TS_VCPU         0x0080  /* thread will enter guest context */
 #define TS_CSTART       0x0100  /* setrun() by continuelwps() */
 #define TS_UNPAUSE      0x0200  /* setrun() by unpauselwps() */
 #define TS_XSTART       0x0400  /* setrun() by SIGCONT */
 #define TS_PSTART       0x0800  /* setrun() by /proc */
 #define TS_RESUME       0x1000  /* setrun() by CPR resume process */