Lines Matching full:dpl
52 /* XXX: use mmu_index to have proper DPL support */
196 uint32_t *esp_ptr, int dpl, in get_ss_esp_from_tss() argument
224 index = (dpl * 4 + 2) << shift; in get_ss_esp_from_tss()
241 int rpl, dpl; in tss_load_seg() local
251 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in tss_load_seg()
256 if (dpl != rpl) { in tss_load_seg()
264 if (dpl != cpl || dpl != rpl) { in tss_load_seg()
274 if (dpl < cpl || dpl < rpl) { in tss_load_seg()
649 int type, dpl, selector, ss_dpl, cpl; in do_interrupt_protected() local
689 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in do_interrupt_protected()
692 if (is_int && dpl < cpl) { in do_interrupt_protected()
744 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in do_interrupt_protected()
745 if (dpl > cpl) { in do_interrupt_protected()
752 dpl = cpl; in do_interrupt_protected()
754 sa.mmu_index = x86_mmu_index_pl(env, dpl); in do_interrupt_protected()
755 if (dpl < cpl) { in do_interrupt_protected()
758 get_ss_esp_from_tss(env, &ss, &esp, dpl, 0); in do_interrupt_protected()
762 if ((ss & 3) != dpl) { in do_interrupt_protected()
769 if (ss_dpl != dpl) { in do_interrupt_protected()
863 ss = (ss & ~3) | dpl; in do_interrupt_protected()
869 selector = (selector & ~3) | dpl; in do_interrupt_protected()
930 int type, dpl, selector, cpl, ist; in do_interrupt64() local
967 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in do_interrupt64()
970 if (is_int && dpl < cpl) { in do_interrupt64()
990 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in do_interrupt64()
991 if (dpl > cpl) { in do_interrupt64()
1001 dpl = cpl; in do_interrupt64()
1006 sa.mmu_index = x86_mmu_index_pl(env, dpl); in do_interrupt64()
1009 if (dpl < cpl || ist != 0) { in do_interrupt64()
1012 sa.sp = get_rsp_from_tss(env, ist != 0 ? ist + 3 : dpl); in do_interrupt64()
1045 uint32_t ss = 0 | dpl; /* SS = NULL selector with RPL = new CPL */ in do_interrupt64()
1046 cpu_x86_load_seg_cache(env, R_SS, ss, 0, 0, dpl << DESC_DPL_SHIFT); in do_interrupt64()
1050 selector = (selector & ~3) | dpl; in do_interrupt64()
1369 int cpl, dpl, rpl; in helper_load_seg() local
1405 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_load_seg()
1411 if (rpl != cpl || dpl != cpl) { in helper_load_seg()
1422 if (dpl < cpl || dpl < rpl) { in helper_load_seg()
1458 uint32_t e1, e2, cpl, dpl, rpl, limit; in helper_ljmp_protected() local
1471 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_ljmp_protected()
1474 if (dpl > cpl) { in helper_ljmp_protected()
1483 if (dpl != cpl) { in helper_ljmp_protected()
1500 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_ljmp_protected()
1516 if (dpl < cpl || dpl < rpl) { in helper_ljmp_protected()
1523 if ((dpl < cpl) || (dpl < rpl)) { in helper_ljmp_protected()
1554 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_ljmp_protected()
1560 if (((e2 & DESC_C_MASK) && (dpl > cpl)) || in helper_ljmp_protected()
1561 (!(e2 & DESC_C_MASK) && (dpl != cpl))) { in helper_ljmp_protected()
1625 uint32_t e1, e2, cpl, dpl, rpl, selector, param_count; in helper_lcall_protected() local
1650 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_lcall_protected()
1653 if (dpl > cpl) { in helper_lcall_protected()
1662 if (dpl != cpl) { in helper_lcall_protected()
1713 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_lcall_protected()
1728 if (dpl < cpl || dpl < rpl) { in helper_lcall_protected()
1742 if (dpl < cpl || dpl < rpl) { in helper_lcall_protected()
1777 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_lcall_protected()
1778 if (dpl > cpl) { in helper_lcall_protected()
1796 if (!(e2 & DESC_C_MASK) && dpl < cpl) { in helper_lcall_protected()
1798 sa.mmu_index = x86_mmu_index_pl(env, dpl); in helper_lcall_protected()
1801 ss = dpl; /* SS = NULL selector with RPL = new CPL */ in helper_lcall_protected()
1803 sa.sp = get_rsp_from_tss(env, dpl); in helper_lcall_protected()
1812 get_ss_esp_from_tss(env, &ss, &sp32, dpl, GETPC()); in helper_lcall_protected()
1819 if ((ss & 3) != dpl) { in helper_lcall_protected()
1826 if (ss_dpl != dpl) { in helper_lcall_protected()
1908 ss = (ss & ~3) | dpl; in helper_lcall_protected()
1916 selector = (selector & ~3) | dpl; in helper_lcall_protected()
1971 int dpl; in validate_seg() local
1983 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in validate_seg()
1986 if (dpl < cpl) { in validate_seg()
2003 int cpl, dpl, rpl, eflags_mask, iopl; in helper_ret_protected() local
2070 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_ret_protected()
2072 if (dpl > rpl) { in helper_ret_protected()
2076 if (dpl != rpl) { in helper_ret_protected()
2141 dpl = (ss_e2 >> DESC_DPL_SHIFT) & 3; in helper_ret_protected()
2142 if (dpl != rpl) { in helper_ret_protected()
2330 int rpl, dpl, cpl, type; in helper_lsl() local
2341 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_lsl()
2347 if (dpl < cpl || dpl < rpl) { in helper_lsl()
2363 if (dpl < cpl || dpl < rpl) { in helper_lsl()
2377 int rpl, dpl, cpl, type; in helper_lar() local
2388 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_lar()
2394 if (dpl < cpl || dpl < rpl) { in helper_lar()
2413 if (dpl < cpl || dpl < rpl) { in helper_lar()
2426 int rpl, dpl, cpl; in helper_verr() local
2440 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_verr()
2447 if (dpl < cpl || dpl < rpl) { in helper_verr()
2452 if (dpl < cpl || dpl < rpl) { in helper_verr()
2464 int rpl, dpl, cpl; in helper_verw() local
2478 dpl = (e2 >> DESC_DPL_SHIFT) & 3; in helper_verw()
2483 if (dpl < cpl || dpl < rpl) { in helper_verw()