Lines Matching refs:selector
138 int selector)
144 if (selector & 0x4)
148 index = selector & ~7;
179 static inline void load_seg_vm(int seg, int selector)
181 selector &= 0xffff;
182 cpu_x86_load_seg_cache(env, seg, selector,
183 (selector << 4), 0xffff, 0);
211 raise_exception_err(EXCP0A_TSS, env->tr.selector & 0xfffc);
222 static void tss_load_seg(int seg_reg, int selector)
227 if ((selector & 0xfffc) != 0) {
228 if (load_segment(&e1, &e2, selector) != 0)
229 raise_exception_err(EXCP0A_TSS, selector & 0xfffc);
231 raise_exception_err(EXCP0A_TSS, selector & 0xfffc);
232 rpl = selector & 3;
237 raise_exception_err(EXCP0A_TSS, selector & 0xfffc);
240 raise_exception_err(EXCP0A_TSS, selector & 0xfffc);
242 raise_exception_err(EXCP0A_TSS, selector & 0xfffc);
246 raise_exception_err(EXCP0A_TSS, selector & 0xfffc);
248 raise_exception_err(EXCP0A_TSS, selector & 0xfffc);
252 raise_exception_err(EXCP0A_TSS, selector & 0xfffc);
256 raise_exception_err(EXCP0A_TSS, selector & 0xfffc);
260 raise_exception_err(EXCP0B_NOSEG, selector & 0xfffc);
261 cpu_x86_load_seg_cache(env, seg_reg, selector,
267 raise_exception_err(EXCP0A_TSS, selector & 0xfffc);
367 ptr = env->gdt.base + (env->tr.selector & ~7);
390 stw_kernel(env->tr.base + (0x48 + i * 4), env->segs[i].selector);
404 stw_kernel(env->tr.base + (0x22 + i * 4), env->segs[i].selector);
411 stw_kernel(tss_base, env->tr.selector);
429 env->tr.selector = tss_selector;
468 env->ldt.selector = new_ldt & ~4;
662 int type, dpl, selector, ss_dpl, cpl;
725 selector = e1 >> 16;
727 if ((selector & 0xfffc) == 0)
730 if (load_segment(&e1, &e2, selector) != 0)
731 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
733 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
736 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
738 raise_exception_err(EXCP0B_NOSEG, selector & 0xfffc);
763 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
770 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
789 PUSHL(ssp, esp, sp_mask, env->segs[R_GS].selector);
790 PUSHL(ssp, esp, sp_mask, env->segs[R_FS].selector);
791 PUSHL(ssp, esp, sp_mask, env->segs[R_DS].selector);
792 PUSHL(ssp, esp, sp_mask, env->segs[R_ES].selector);
794 PUSHL(ssp, esp, sp_mask, env->segs[R_SS].selector);
798 PUSHL(ssp, esp, sp_mask, env->segs[R_CS].selector);
806 PUSHW(ssp, esp, sp_mask, env->segs[R_GS].selector);
807 PUSHW(ssp, esp, sp_mask, env->segs[R_FS].selector);
808 PUSHW(ssp, esp, sp_mask, env->segs[R_DS].selector);
809 PUSHW(ssp, esp, sp_mask, env->segs[R_ES].selector);
811 PUSHW(ssp, esp, sp_mask, env->segs[R_SS].selector);
815 PUSHW(ssp, esp, sp_mask, env->segs[R_CS].selector);
835 selector = (selector & ~3) | dpl;
836 cpu_x86_load_seg_cache(env, R_CS, selector,
877 raise_exception_err(EXCP0A_TSS, env->tr.selector & 0xfffc);
887 int type, dpl, selector, cpl, ist;
925 selector = e1 >> 16;
928 if ((selector & 0xfffc) == 0)
931 if (load_segment(&e1, &e2, selector) != 0)
932 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
934 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
937 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
939 raise_exception_err(EXCP0B_NOSEG, selector & 0xfffc);
941 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
954 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
963 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
968 PUSHQ(esp, env->segs[R_SS].selector);
971 PUSHQ(esp, env->segs[R_CS].selector);
983 selector = (selector & ~3) | dpl;
984 cpu_x86_load_seg_cache(env, R_CS, selector,
1010 int selector;
1015 selector = (env->star >> 32) & 0xffff;
1025 cpu_x86_load_seg_cache(env, R_CS, selector & 0xfffc,
1030 cpu_x86_load_seg_cache(env, R_SS, (selector + 8) & 0xfffc,
1045 cpu_x86_load_seg_cache(env, R_CS, selector & 0xfffc,
1050 cpu_x86_load_seg_cache(env, R_SS, (selector + 8) & 0xfffc,
1065 int cpl, selector;
1074 selector = (env->star >> 48) & 0xffff;
1077 cpu_x86_load_seg_cache(env, R_CS, (selector + 16) | 3,
1085 cpu_x86_load_seg_cache(env, R_CS, selector | 3,
1092 cpu_x86_load_seg_cache(env, R_SS, selector + 8,
1101 cpu_x86_load_seg_cache(env, R_CS, selector | 3,
1107 cpu_x86_load_seg_cache(env, R_SS, selector + 8,
1132 int selector;
1142 selector = lduw_kernel(ptr + 2);
1149 old_cs = env->segs[R_CS].selector;
1158 env->segs[R_CS].selector = selector;
1159 env->segs[R_CS].base = (selector << 4);
1229 env->segs[R_CS].selector, EIP,
1231 env->segs[R_SS].selector, ESP);
1401 stw_phys(sm_state + offset, dt->selector);
1410 stw_phys(sm_state + 0x7e70, env->ldt.selector);
1418 stw_phys(sm_state + 0x7e90, env->tr.selector);
1462 stl_phys(sm_state + 0x7fc4, env->tr.selector);
1467 stl_phys(sm_state + 0x7fc0, env->ldt.selector);
1484 stl_phys(sm_state + 0x7fa8 + i * 4, dt->selector);
1538 env->ldt.selector = lduw_phys(sm_state + 0x7e70);
1546 env->tr.selector = lduw_phys(sm_state + 0x7e90);
1592 env->tr.selector = ldl_phys(sm_state + 0x7fc4) & 0xffff;
1597 env->ldt.selector = ldl_phys(sm_state + 0x7fc0) & 0xffff;
2014 void helper_lldt(int selector)
2021 selector &= 0xffff;
2022 if ((selector & 0xfffc) == 0) {
2023 /* XXX: NULL selector case: invalid LDT */
2027 if (selector & 0x4)
2028 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2030 index = selector & ~7;
2038 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2043 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2045 raise_exception_err(EXCP0B_NOSEG, selector & 0xfffc);
2058 env->ldt.selector = selector;
2061 void helper_ltr(int selector)
2068 selector &= 0xffff;
2069 if ((selector & 0xfffc) == 0) {
2070 /* NULL selector case: invalid TR */
2075 if (selector & 0x4)
2076 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2078 index = selector & ~7;
2086 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2093 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2095 raise_exception_err(EXCP0B_NOSEG, selector & 0xfffc);
2102 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2113 env->tr.selector = selector;
2117 void helper_load_seg(int seg_reg, int selector)
2125 selector &= 0xffff;
2127 if ((selector & 0xfffc) == 0) {
2128 /* null selector case */
2135 cpu_x86_load_seg_cache(env, seg_reg, selector, 0, 0, 0);
2138 if (selector & 0x4)
2142 index = selector & ~7;
2144 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2150 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2151 rpl = selector & 3;
2156 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2158 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2162 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2167 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2173 raise_exception_err(EXCP0C_STACK, selector & 0xfffc);
2175 raise_exception_err(EXCP0B_NOSEG, selector & 0xfffc);
2184 cpu_x86_load_seg_cache(env, seg_reg, selector,
2190 selector, (unsigned long)sc->base, sc->limit, sc->flags);
2298 PUSHL(ssp, esp, esp_mask, env->segs[R_CS].selector);
2301 PUSHW(ssp, esp, esp_mask, env->segs[R_CS].selector);
2307 env->segs[R_CS].selector = new_cs;
2316 uint32_t e1, e2, cpl, dpl, rpl, selector, offset, param_count;
2355 PUSHQ(rsp, env->segs[R_CS].selector);
2370 PUSHL(ssp, sp, sp_mask, env->segs[R_CS].selector);
2373 PUSHW(ssp, sp, sp_mask, env->segs[R_CS].selector);
2414 selector = e1 >> 16;
2417 if ((selector & 0xfffc) == 0)
2420 if (load_segment(&e1, &e2, selector) != 0)
2421 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2423 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2426 raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
2428 raise_exception_err(EXCP0B_NOSEG, selector & 0xfffc);
2459 PUSHL(ssp, sp, sp_mask, env->segs[R_SS].selector);
2466 PUSHW(ssp, sp, sp_mask, env->segs[R_SS].selector);
2484 PUSHL(ssp, sp, sp_mask, env->segs[R_CS].selector);
2487 PUSHW(ssp, sp, sp_mask, env->segs[R_CS].selector);
2501 selector = (selector & ~3) | dpl;
2502 cpu_x86_load_seg_cache(env, R_CS, selector,
2541 env->segs[R_CS].selector = new_cs;
2563 (env->segs[seg_reg].selector & 0xfffc) == 0)
3302 uint32_t e1, e2, eflags, selector;
3305 selector = selector1 & 0xffff;
3307 if ((selector & 0xfffc) == 0)
3309 if (load_segment(&e1, &e2, selector) != 0)
3311 rpl = selector & 3;
3346 uint32_t e1, e2, eflags, selector;
3349 selector = selector1 & 0xffff;
3351 if ((selector & 0xfffc) == 0)
3353 if (load_segment(&e1, &e2, selector) != 0)
3355 rpl = selector & 3;
3392 uint32_t e1, e2, eflags, selector;
3395 selector = selector1 & 0xffff;
3397 if ((selector & 0xfffc) == 0)
3399 if (load_segment(&e1, &e2, selector) != 0)
3403 rpl = selector & 3;
3425 uint32_t e1, e2, eflags, selector;
3428 selector = selector1 & 0xffff;
3430 if ((selector & 0xfffc) == 0)
3432 if (load_segment(&e1, &e2, selector) != 0)
3436 rpl = selector & 3;
4904 stw_phys(addr + offsetof(struct vmcb_seg, selector),
4905 sc->selector);
4918 sc->selector = lduw_phys(addr + offsetof(struct vmcb_seg, selector));
4930 cpu_x86_load_seg_cache(env, seg_reg, sc->selector,