Print this page
OS-6546 Use PCID if KPTI is enabled

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/os/mp_startup.c
          +++ new/usr/src/uts/i86pc/os/mp_startup.c
↓ open down ↓ 1788 lines elided ↑ open up ↑
1789 1789           * because the cpu_lock is held by the control CPU which is running
1790 1790           * mp_start_cpu_common().
1791 1791           * Need to clear CPU_QUIESCED flag before calling any function which
1792 1792           * may cause thread context switching, such as kmem_alloc() etc.
1793 1793           * The idle thread checks for CPU_QUIESCED flag and loops for ever if
1794 1794           * it's set. So the startup thread may have no chance to switch back
1795 1795           * again if it's switched away with CPU_QUIESCED set.
1796 1796           */
1797 1797          cp->cpu_flags &= ~(CPU_POWEROFF | CPU_QUIESCED);
1798 1798  
     1799 +        enable_pcid();
     1800 +
1799 1801          /*
1800 1802           * Setup this processor for XSAVE.
1801 1803           */
1802 1804          if (fp_save_mech == FP_XSAVE) {
1803 1805                  xsave_setup_msr(cp);
1804 1806          }
1805 1807  
1806 1808          cpuid_pass2(cp);
1807 1809          cpuid_pass3(cp);
1808 1810          cpuid_pass4(cp, NULL);
↓ open down ↓ 301 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX