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>
@@ -21,10 +21,11 @@
/*
* Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
* Copyright 2014 Igor Kozhukhov <ikozhukhov@gmail.com>.
+ * Copyright 2018 Joyent, Inc.
* Copyright 2017 RackTop Systems.
* Copyright 2019 Joyent, Inc.
*/
#ifndef _SYS_CPUVAR_H
@@ -527,17 +528,23 @@
#else
#define CPU (curthread->t_cpu) /* Pointer to current CPU */
#endif
/*
- * CPU_CURRENT indicates to thread_affinity_set to use CPU->cpu_id
- * as the target and to grab cpu_lock instead of requiring the caller
- * to grab it.
+ * CPU_CURRENT indicates to thread_affinity_set() to use whatever curthread's
+ * current CPU is; holding cpu_lock is not required.
*/
#define CPU_CURRENT -3
/*
+ * CPU_BEST can be used by thread_affinity_set() callers to set affinity to a
+ * good CPU (in particular, an ht_acquire()-friendly choice); holding cpu_lock
+ * is not required.
+ */
+#define CPU_BEST -4
+
+/*
* Per-CPU statistics
*
* cpu_stats_t contains numerous system and VM-related statistics, in the form
* of gauges or monotonically-increasing event occurrence counts.
*/