Print this page
Bring back LX zones.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/ia32/os/desctbls.c
          +++ new/usr/src/uts/intel/ia32/os/desctbls.c
↓ open down ↓ 153 lines elided ↑ open up ↑
 154  154  struct interposing_handler {
 155  155          int ih_inum;
 156  156          gate_desc_t ih_interp_desc;
 157  157          gate_desc_t ih_default_desc;
 158  158  };
 159  159  
 160  160  /*
 161  161   * The brand infrastructure interposes on two handlers, and we use one as a
 162  162   * NULL signpost.
 163  163   */
 164      -static struct interposing_handler brand_tbl[2];
      164 +static struct interposing_handler brand_tbl[3];
 165  165  
 166  166  /*
 167  167   * software prototypes for default local descriptor table
 168  168   */
 169  169  
 170  170  /*
 171  171   * Routines for loading segment descriptors in format the hardware
 172  172   * can understand.
 173  173   */
 174  174  
↓ open down ↓ 794 lines elided ↑ open up ↑
 969  969          set_gatesegd(&idt[T_STKFLT], &stktrap, KCS_SEL, SDT_SYSIGT, TRP_KPL, 0);
 970  970          set_gatesegd(&idt[T_GPFLT], &gptrap, KCS_SEL, SDT_SYSIGT, TRP_KPL, 0);
 971  971          set_gatesegd(&idt[T_PGFLT], &pftrap, KCS_SEL, SDT_SYSIGT, TRP_KPL, 0);
 972  972          set_gatesegd(&idt[T_EXTERRFLT], &ndperr, KCS_SEL, SDT_SYSIGT, TRP_KPL,
 973  973              0);
 974  974          set_gatesegd(&idt[T_ALIGNMENT], &achktrap, KCS_SEL, SDT_SYSIGT,
 975  975              TRP_KPL, 0);
 976  976          set_gatesegd(&idt[T_MCE], &mcetrap, KCS_SEL, SDT_SYSIGT, TRP_KPL, 0);
 977  977          set_gatesegd(&idt[T_SIMDFPE], &xmtrap, KCS_SEL, SDT_SYSIGT, TRP_KPL, 0);
 978  978  
      979 +        /*
      980 +         * install "int80" handler at, well, 0x80.
      981 +         */
      982 +        set_gatesegd(&idt0[T_INT80], &sys_int80, KCS_SEL, SDT_SYSIGT, TRP_UPL,
      983 +            0);
      984 +
 979  985          /*
 980  986           * install fast trap handler at 210.
 981  987           */
 982  988          set_gatesegd(&idt[T_FASTTRAP], &fasttrap, KCS_SEL, SDT_SYSIGT, TRP_UPL,
 983  989              0);
 984  990  
 985  991          /*
 986  992           * System call handler.
 987  993           */
 988  994  #if defined(__amd64)
↓ open down ↓ 5 lines elided ↑ open up ↑
 994 1000              TRP_UPL, 0);
 995 1001  #endif  /* __i386 */
 996 1002  
 997 1003          /*
 998 1004           * Install the DTrace interrupt handler for the pid provider.
 999 1005           */
1000 1006          set_gatesegd(&idt[T_DTRACE_RET], &dtrace_ret, KCS_SEL,
1001 1007              SDT_SYSIGT, TRP_UPL, 0);
1002 1008  
1003 1009          /*
1004      -         * Prepare interposing descriptor for the syscall handler
1005      -         * and cache copy of the default descriptor.
1006      -         */
1007      -        brand_tbl[0].ih_inum = T_SYSCALLINT;
1008      -        brand_tbl[0].ih_default_desc = idt0[T_SYSCALLINT];
     1010 +-        * Prepare interposing descriptors for the branded "int80"
     1011 +-        * and syscall handlers and cache copies of the default
     1012 +-        * descriptors.
     1013 +         */
     1014 +        brand_tbl[0].ih_inum = T_INT80;
     1015 +        brand_tbl[0].ih_default_desc = idt0[T_INT80];
     1016 +        set_gatesegd(&(brand_tbl[0].ih_interp_desc), &brand_sys_int80, KCS_SEL,
     1017 +            SDT_SYSIGT, TRP_UPL, 0);
     1018 +
     1019 +        brand_tbl[1].ih_inum = T_SYSCALLINT;
     1020 +        brand_tbl[1].ih_default_desc = idt0[T_SYSCALLINT];
1009 1021  
1010 1022  #if defined(__amd64)
1011      -        set_gatesegd(&(brand_tbl[0].ih_interp_desc), &brand_sys_syscall_int,
     1023 +        set_gatesegd(&(brand_tbl[1].ih_interp_desc), &brand_sys_syscall_int,
1012 1024              KCS_SEL, SDT_SYSIGT, TRP_UPL, 0);
1013 1025  #elif defined(__i386)
1014      -        set_gatesegd(&(brand_tbl[0].ih_interp_desc), &brand_sys_call,
     1026 +        set_gatesegd(&(brand_tbl[1].ih_interp_desc), &brand_sys_call,
1015 1027              KCS_SEL, SDT_SYSIGT, TRP_UPL, 0);
1016 1028  #endif  /* __i386 */
1017 1029  
1018      -        brand_tbl[1].ih_inum = 0;
     1030 +        brand_tbl[2].ih_inum = 0;
1019 1031  }
1020 1032  
1021 1033  #if defined(__xpv)
1022 1034  
1023 1035  static void
1024 1036  init_idt(gate_desc_t *idt)
1025 1037  {
1026 1038          init_idt_common(idt);
1027 1039  }
1028 1040  
↓ open down ↓ 365 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX