Skip to content

Commit

Permalink
9453 Include KPTI status in kernel boot messages
Browse files Browse the repository at this point in the history
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Youzhong Yang <youzhong@gmail.com>
Reviewed by: Dominik Hassler <hadfl@omniosce.org>
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
citrus-it authored and Dan McDonald committed May 14, 2018
1 parent bfcdb3d commit 39df76f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions usr/src/uts/i86pc/os/mp_startup.c
Expand Up @@ -29,6 +29,7 @@
/*
* Copyright 2018 Joyent, Inc.
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
* Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
*/

#include <sys/types.h>
Expand Down Expand Up @@ -1528,6 +1529,19 @@ start_other_cpus(int cprboot)
cmn_err(CE_CONT, "?cpu%d: %s\n", CPU->cpu_id, CPU->cpu_idstr);
cmn_err(CE_CONT, "?cpu%d: %s\n", CPU->cpu_id, CPU->cpu_brandstr);

/*
* KPTI initialisation happens very early in boot, before logging is
* set up. Output a status message now as the boot CPU comes online.
*/
cmn_err(CE_CONT, "?KPTI %s (PCID %s, INVPCID %s)\n",
kpti_enable ? "enabled" : "disabled",
x86_use_pcid == 1 ? "in use" :
(is_x86_feature(x86_featureset, X86FSET_PCID) ? "disabled" :
"not supported"),
x86_use_pcid == 1 && x86_use_invpcid == 1 ? "in use" :
(is_x86_feature(x86_featureset, X86FSET_INVPCID) ? "disabled" :
"not supported"));

/*
* Initialize our syscall handlers
*/
Expand Down

0 comments on commit 39df76f

Please sign in to comment.