Changeset 42165 in vbox for trunk/include/VBox/vmm
- Timestamp:
- Jul 16, 2012 1:36:01 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 79144
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r42025 r42165 170 170 VMMDECL(bool) CPUMGetGuestCpuIdFeature(PVM pVM, CPUMCPUIDFEATURE enmFeature); 171 171 VMMDECL(void) CPUMSetGuestCtx(PVMCPU pVCpu, const PCPUMCTX pCtx); 172 VMM_INT_DECL(void) CPUMGuestLazyLoadHiddenCsAndSs(PVMCPU pVCpu); 173 VMM_INT_DECL(void) CPUMGuestLazyLoadHiddenSelectorReg(PVMCPU pVCpu, PCPUMSELREG pSReg); 172 174 /** @} */ 173 175 … … 178 180 VMMDECL(bool) CPUMIsGuestIn16BitCode(PVMCPU pVCpu); 179 181 VMMDECL(bool) CPUMIsGuestIn32BitCode(PVMCPU pVCpu); 182 VMMDECL(bool) CPUMIsGuestIn64BitCode(PVMCPU pVCpu); 180 183 VMMDECL(bool) CPUMIsGuestNXEnabled(PVMCPU pVCpu); 181 184 VMMDECL(bool) CPUMIsGuestPageSizeExtEnabled(PVMCPU pVCpu); … … 236 239 } 237 240 241 VMM_INT_DECL(bool) CPUMIsGuestIn64BitCodeSlow(PCPUMCTX pCtx); 242 238 243 /** 239 244 * Tests if the guest is running in 64 bits mode or not. 240 245 * 241 246 * @returns true if in 64 bits protected mode, otherwise false. 242 * @param pV M The VM handle.247 * @param pVCpu The current virtual CPU. 243 248 * @param pCtx Current CPU context 244 249 */ 245 DECLINLINE(bool) CPUMIsGuestIn64BitCode(PVMCPU pVCpu, PCCPUMCTXCORE pCtx) 246 { 247 if (!CPUMIsGuestInLongMode(pVCpu)) 248 return false; 249 250 return pCtx->cs.Attr.n.u1Long; 251 } 252 253 /** 254 * Tests if the guest is running in 64 bits mode or not. 255 * 256 * @returns true if in 64 bits protected mode, otherwise false. 257 * @param pVM The VM handle. 258 * @param pCtx Current CPU context 259 */ 260 DECLINLINE(bool) CPUMIsGuestIn64BitCodeEx(PCCPUMCTX pCtx) 250 DECLINLINE(bool) CPUMIsGuestIn64BitCodeEx(PCPUMCTX pCtx) 261 251 { 262 252 if (!(pCtx->msrEFER & MSR_K6_EFER_LMA)) 263 253 return false; 264 254 if (!CPUMSELREG_ARE_HIDDEN_PARTS_VALID(&pCtx->cs)) 255 return CPUMIsGuestIn64BitCodeSlow(pCtx); 265 256 return pCtx->cs.Attr.n.u1Long; 266 257 } -
trunk/include/VBox/vmm/cpumctx.h
r41908 r42165 78 78 #define CPUMSELREG_FLAGS_STALE UINT16_C(0x0002) 79 79 /** @} */ 80 81 /** Checks if the hidden parts of the selector register are valid. */ 82 #define CPUMSELREG_ARE_HIDDEN_PARTS_VALID(a_pSelReg) ( ((a_pSelReg)->fFlags & CPUMSELREG_FLAGS_VALID) \ 83 && (a_pSelReg)->ValidSel == (a_pSelReg)->Sel ) 80 84 81 85 /** Old type used for the hidden register part. -
trunk/include/VBox/vmm/selm.h
r41727 r42165 83 83 VMMDECL(DISCPUMODE) SELMGetCpuModeFromSelector(PVMCPU pVCpu, X86EFLAGS eflags, RTSEL Sel, PCCPUMSELREGHID pHiddenSel); 84 84 VMMDECL(int) SELMGetLDTFromSel(PVM pVM, RTSEL SelLdt, PRTGCPTR ppvLdt, unsigned *pcbLimit); 85 #ifdef VBOX_WITH_RAW_MODE 86 VMM_INT_DECL(void) SELMLoadHiddenSelectorReg(PVMCPU pVCpu, PCCPUMCTX pCtx, PCPUMSELREG pSReg); 87 #endif 85 88 86 89
Note:
See TracChangeset
for help on using the changeset viewer.