Lines Matching defs:Sel

1299         RTSEL const Sel = paSReg[iSReg].Sel;
1300 if (Sel & X86_SEL_MASK_OFF_RPL)
1305 if (!(Sel & X86_SEL_LDT))
1307 if ((Sel | (sizeof(*pDesc) - 1)) <= pCtx->gdtr.cbGdt)
1308 pDesc = &pVM->selm.s.paGdtR3[Sel >> X86_SEL_SHIFT];
1314 if ((Sel | (sizeof(*pDesc) - 1)) <= pVM->selm.s.cbLdtLimit)
1315 pDesc = &((PCX86DESC)((uintptr_t)pVM->selm.s.pvLdtR3 + pVM->selm.s.offLdtHyper))[Sel >> X86_SEL_SHIFT];
1328 Log2(("SELM: Detected stale %s=%#x (was valid)\n", g_aszSRegNms[iSReg], Sel));
1345 Log2(("SELM: Already stale %s=%#x\n", g_aszSRegNms[iSReg], Sel));
1361 Log2(("SELM: Detected stale %s=%#x (wasn't valid)\n", g_aszSRegNms[iSReg], Sel));
2099 * @param Sel The selector to get info about.
2102 static int selmR3GetSelectorInfo64(PVMCPU pVCpu, RTSEL Sel, PDBGFSELINFO pSelInfo)
2110 if (!(Sel & X86_SEL_LDT))
2115 if ((Sel | X86_SEL_RPL_LDT) > Gdtr.cbGdt)
2117 GCPtrDesc = Gdtr.pGdt + (Sel & X86_SEL_MASK);
2125 if ((Sel | X86_SEL_RPL_LDT) > cbLimit)
2129 GCPtrDesc = GCPtrBase + (Sel & X86_SEL_MASK);
2146 pSelInfo->Sel = Sel;
2214 * Sel members have been initialized.
2260 * @param Sel The selector to get info about.
2263 static int selmR3GetSelectorInfo32(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PDBGFSELINFO pSelInfo)
2270 if ( !(Sel & X86_SEL_LDT)
2271 && ( pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS] == (Sel & X86_SEL_RPL_LDT)
2272 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS] == (Sel & X86_SEL_RPL_LDT)
2273 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS64] == (Sel & X86_SEL_RPL_LDT)
2274 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS] == (Sel & X86_SEL_RPL_LDT)
2275 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] == (Sel & X86_SEL_RPL_LDT))
2287 Desc = pVM->selm.s.paGdtR3[Sel >> X86_SEL_SHIFT];
2297 if (!(Sel & X86_SEL_LDT))
2302 if ((Sel | X86_SEL_RPL_LDT) > Gdtr.cbGdt)
2304 GCPtrDesc = Gdtr.pGdt + (Sel & X86_SEL_MASK);
2312 if ((Sel | X86_SEL_RPL_LDT) > cbLimit)
2316 GCPtrDesc = GCPtrBase + (Sel & X86_SEL_MASK);
2329 pSelInfo->Sel = Sel;
2330 pSelInfo->GCPtrBase = Sel << 4;
2342 pSelInfo->Sel = Sel;
2367 * @param Sel The selector to get info about.
2370 VMMR3DECL(int) SELMR3GetSelectorInfo(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PDBGFSELINFO pSelInfo)
2374 return selmR3GetSelectorInfo64(pVCpu, Sel, pSelInfo);
2375 return selmR3GetSelectorInfo32(pVM, pVCpu, Sel, pSelInfo);
2396 * @param Sel The selector to get info about.
2401 VMMR3DECL(int) SELMR3GetShadowSelectorInfo(PVM pVM, RTSEL Sel, PDBGFSELINFO pSelInfo)
2409 if (!(Sel & X86_SEL_LDT))
2414 Desc = pVM->selm.s.paGdtR3[Sel >> X86_SEL_SHIFT];
2415 pSelInfo->fFlags = pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS] == (Sel & X86_SEL_MASK_OFF_RPL)
2416 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_DS] == (Sel & X86_SEL_MASK_OFF_RPL)
2417 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_CS64] == (Sel & X86_SEL_MASK_OFF_RPL)
2418 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS] == (Sel & X86_SEL_MASK_OFF_RPL)
2419 || pVM->selm.s.aHyperSel[SELM_HYPER_SEL_TSS_TRAP08] == (Sel & X86_SEL_MASK_OFF_RPL)
2430 Desc = paLDT[Sel >> X86_SEL_SHIFT];
2443 pSelInfo->Sel = Sel;
2454 * @param Sel Selector number.
2458 static void selmR3FormatDescriptor(X86DESC Desc, RTSEL Sel, char *pszOutput, size_t cchOutput)
2533 Sel, Desc.au32[0], Desc.au32[1], u32Base, u32Limit, Desc.Gen.u2Dpl, szMsg);
2541 * @param Sel Selector number.
2544 VMMR3DECL(void) SELMR3DumpDescriptor(X86DESC Desc, RTSEL Sel, const char *pszMsg)
2547 selmR3FormatDescriptor(Desc, Sel, &szOutput[0], sizeof(szOutput));
2672 pHlp->pfnPrintf(pHlp, "Guest LDT (Sel=%x): Null-Selector\n", SelLdt);
2676 pHlp->pfnPrintf(pHlp, "Guest LDT (Sel=%x GCAddr=%RX64 limit=%x):\n", SelLdt, GCPtrLdt, cbLdt);