Changeset 42407 in vbox for trunk/include/VBox/vmm
- Timestamp:
- Jul 26, 2012 11:41:35 AM (12 years ago)
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r42186 r42407 191 191 VMMDECL(bool) CPUMIsGuestInLongMode(PVMCPU pVCpu); 192 192 VMMDECL(bool) CPUMIsGuestInPAEMode(PVMCPU pVCpu); 193 VMM_INT_DECL(bool) CPUMIsGuestInRawMode(PVMCPU pVCpu); 193 194 194 195 #ifndef VBOX_WITHOUT_UNNAMED_UNIONS … … 252 253 if (!(pCtx->msrEFER & MSR_K6_EFER_LMA)) 253 254 return false; 254 if (!CPUMSELREG_ARE_HIDDEN_PARTS_VALID( &pCtx->cs))255 if (!CPUMSELREG_ARE_HIDDEN_PARTS_VALID(NULL, &pCtx->cs)) 255 256 return CPUMIsGuestIn64BitCodeSlow(pCtx); 256 257 return pCtx->cs.Attr.n.u1Long; -
trunk/include/VBox/vmm/cpumctx.h
r42337 r42407 81 81 82 82 /** Checks if the hidden parts of the selector register are valid. */ 83 #define CPUMSELREG_ARE_HIDDEN_PARTS_VALID(a_pSelReg) ( ((a_pSelReg)->fFlags & CPUMSELREG_FLAGS_VALID) \ 84 && (a_pSelReg)->ValidSel == (a_pSelReg)->Sel ) 83 #ifdef VBOX_WITH_RAW_MODE_NOT_R0 84 # define CPUMSELREG_ARE_HIDDEN_PARTS_VALID(a_pVCpu, a_pSelReg) \ 85 ( ((a_pSelReg)->fFlags & CPUMSELREG_FLAGS_VALID) \ 86 && ( (a_pSelReg)->ValidSel == (a_pSelReg)->Sel \ 87 || ( (a_pVCpu) != NULL \ 88 && (a_pSelReg)->ValidSel == ((a_pSelReg)->Sel & X86_SEL_MASK_RPL) \ 89 && ((a_pSelReg)->Sel & X86_SEL_RPL) == 1 \ 90 && ((a_pSelReg)->ValidSel & X86_SEL_RPL) == 0 \ 91 && CPUMIsGuestInRawMode(a_pVCpu) \ 92 ) \ 93 ) \ 94 ) 95 #else 96 # define CPUMSELREG_ARE_HIDDEN_PARTS_VALID(a_pVCpu, a_pSelReg) \ 97 ( ((a_pSelReg)->fFlags & CPUMSELREG_FLAGS_VALID) \ 98 && (a_pSelReg)->ValidSel == (a_pSelReg)->Sel ) 99 #endif 85 100 86 101 /** Old type used for the hidden register part. -
trunk/include/VBox/vmm/selm.h
r42186 r42407 4 4 5 5 /* 6 * Copyright (C) 2006-201 0Oracle Corporation6 * Copyright (C) 2006-2012 Oracle Corporation 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 39 39 */ 40 40 41 VMMDECL(RTSEL) SELMGetTrap8Selector(PVM pVM);42 VMMDECL(void) SELMSetTrap8EIP(PVM pVM, uint32_t u32EIP);43 VMMDECL(int) SELMGetRing1Stack(PVM pVM, uint32_t *pSS, PRTGCPTR32 pEsp);44 VMMDECL(RTGCPTR) SELMGetGuestTSS(PVM pVM);45 VMMDECL(RTSEL) SELMGetHyperCS(PVM pVM);46 VMMDECL(RTSEL) SELMGetHyperCS64(PVM pVM);47 VMMDECL(RTSEL) SELMGetHyperDS(PVM pVM);48 VMMDECL(RTSEL) SELMGetHyperTSS(PVM pVM);49 VMMDECL(RTSEL) SELMGetHyperTSSTrap08(PVM pVM);50 VMMDECL(RTRCPTR) SELMGetHyperGDT(PVM pVM);51 VMMDECL(int) SELMGetTSSInfo(PVM pVM, PVMCPU pVCpu, PRTGCUINTPTR pGCPtrTss, PRTGCUINTPTR pcbTss, bool *pfCanHaveIOBitmap);52 VMMDECL(RTGCPTR) SELMToFlat(PVM pVM, DISSELREG SelReg, PCPUMCTXCORE pCtxCore, RTGCPTR Addr);53 VMMDECL(RTGCPTR) SELMToFlatBySel(PVM pVM, RTSEL Sel, RTGCPTR Addr);54 VMMDECL(void) SELMShadowCR3Changed(PVM pVM, PVMCPU pVCpu);41 VMMDECL(RTSEL) SELMGetTrap8Selector(PVM pVM); 42 VMMDECL(void) SELMSetTrap8EIP(PVM pVM, uint32_t u32EIP); 43 VMMDECL(int) SELMGetRing1Stack(PVM pVM, uint32_t *pSS, PRTGCPTR32 pEsp); 44 VMMDECL(RTGCPTR) SELMGetGuestTSS(PVM pVM); 45 VMMDECL(RTSEL) SELMGetHyperCS(PVM pVM); 46 VMMDECL(RTSEL) SELMGetHyperCS64(PVM pVM); 47 VMMDECL(RTSEL) SELMGetHyperDS(PVM pVM); 48 VMMDECL(RTSEL) SELMGetHyperTSS(PVM pVM); 49 VMMDECL(RTSEL) SELMGetHyperTSSTrap08(PVM pVM); 50 VMMDECL(RTRCPTR) SELMGetHyperGDT(PVM pVM); 51 VMMDECL(int) SELMGetTSSInfo(PVM pVM, PVMCPU pVCpu, PRTGCUINTPTR pGCPtrTss, PRTGCUINTPTR pcbTss, bool *pfCanHaveIOBitmap); 52 VMMDECL(RTGCPTR) SELMToFlat(PVM pVM, DISSELREG SelReg, PCPUMCTXCORE pCtxCore, RTGCPTR Addr); 53 VMMDECL(RTGCPTR) SELMToFlatBySel(PVM pVM, RTSEL Sel, RTGCPTR Addr); 54 VMMDECL(void) SELMShadowCR3Changed(PVM pVM, PVMCPU pVCpu); 55 55 56 56 /** Flags for SELMToFlatEx(). … … 74 74 /** @} */ 75 75 76 VMMDECL(int) SELMToFlatEx(PVMCPU pVCpu, DISSELREG SelReg, PCPUMCTXCORE pCtxCore, RTGCPTR Addr, uint32_t fFlags,77 PRTGCPTR ppvGC);78 VMMDECL(int) SELMToFlatBySelEx(PVMCPU pVCpu, X86EFLAGS eflags, RTSEL Sel, RTGCPTR Addr, uint32_t fFlags,79 PRTGCPTR ppvGC, uint32_t *pcb);80 VMMDECL(int) SELMValidateAndConvertCSAddr(PVMCPU pVCpu, X86EFLAGS eflags, RTSEL SelCPL, RTSEL SelCS, PCPUMSELREG pSRegCS,81 RTGCPTR Addr, PRTGCPTR ppvFlat);82 VMMDECL(int) SELMGetLDTFromSel(PVM pVM, RTSEL SelLdt, PRTGCPTR ppvLdt, unsigned *pcbLimit);76 VMMDECL(int) SELMToFlatEx(PVMCPU pVCpu, DISSELREG SelReg, PCPUMCTXCORE pCtxCore, RTGCPTR Addr, uint32_t fFlags, 77 PRTGCPTR ppvGC); 78 VMMDECL(int) SELMToFlatBySelEx(PVMCPU pVCpu, X86EFLAGS eflags, RTSEL Sel, RTGCPTR Addr, uint32_t fFlags, 79 PRTGCPTR ppvGC, uint32_t *pcb); 80 VMMDECL(int) SELMValidateAndConvertCSAddr(PVMCPU pVCpu, X86EFLAGS eflags, RTSEL SelCPL, RTSEL SelCS, 81 PCPUMSELREG pSRegCS, RTGCPTR Addr, PRTGCPTR ppvFlat); 82 VMMDECL(int) SELMGetLDTFromSel(PVM pVM, RTSEL SelLdt, PRTGCPTR ppvLdt, unsigned *pcbLimit); 83 83 #ifdef VBOX_WITH_RAW_MODE 84 VMM_INT_DECL(void) SELMLoadHiddenSelectorReg(PVMCPU pVCpu, PCCPUMCTX pCtx, PCPUMSELREG pSReg);84 VMM_INT_DECL(void) SELMLoadHiddenSelectorReg(PVMCPU pVCpu, PCCPUMCTX pCtx, PCPUMSELREG pSReg); 85 85 #endif 86 86 … … 91 91 * @{ 92 92 */ 93 VMMR3DECL(int) SELMR3Init(PVM pVM);94 VMMR3DECL(int) SELMR3InitFinalize(PVM pVM);95 VMMR3DECL(void) SELMR3Relocate(PVM pVM);96 VMMR3DECL(int) SELMR3Term(PVM pVM);97 VMMR3DECL(void) SELMR3Reset(PVM pVM);98 VMMR3DECL( int)SELMR3UpdateFromCPUM(PVM pVM, PVMCPU pVCpu);99 VMMR3DECL(int) SELMR3SyncTSS(PVM pVM, PVMCPU pVCpu);100 VMMR3DECL(int) SELMR3GetSelectorInfo(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PDBGFSELINFO pSelInfo);101 VMMR3DECL(int) SELMR3GetShadowSelectorInfo(PVM pVM, RTSEL Sel, PDBGFSELINFO pSelInfo);102 VMMR3DECL(void) SELMR3DisableMonitoring(PVM pVM);103 VMMR3DECL(void) SELMR3DumpDescriptor(X86DESC Desc, RTSEL Sel, const char *pszMsg);104 VMMR3DECL(void) SELMR3DumpHyperGDT(PVM pVM);105 VMMR3DECL(void) SELMR3DumpHyperLDT(PVM pVM);106 VMMR3DECL(void) SELMR3DumpGuestGDT(PVM pVM);107 VMMR3DECL(void) SELMR3DumpGuestLDT(PVM pVM);108 VMMR3DECL(bool) SELMR3CheckTSS(PVM pVM);109 VMMR3DECL(int) SELMR3DebugCheck(PVM pVM);93 VMMR3DECL(int) SELMR3Init(PVM pVM); 94 VMMR3DECL(int) SELMR3InitFinalize(PVM pVM); 95 VMMR3DECL(void) SELMR3Relocate(PVM pVM); 96 VMMR3DECL(int) SELMR3Term(PVM pVM); 97 VMMR3DECL(void) SELMR3Reset(PVM pVM); 98 VMMR3DECL(VBOXSTRICTRC) SELMR3UpdateFromCPUM(PVM pVM, PVMCPU pVCpu); 99 VMMR3DECL(int) SELMR3SyncTSS(PVM pVM, PVMCPU pVCpu); 100 VMMR3DECL(int) SELMR3GetSelectorInfo(PVM pVM, PVMCPU pVCpu, RTSEL Sel, PDBGFSELINFO pSelInfo); 101 VMMR3DECL(int) SELMR3GetShadowSelectorInfo(PVM pVM, RTSEL Sel, PDBGFSELINFO pSelInfo); 102 VMMR3DECL(void) SELMR3DisableMonitoring(PVM pVM); 103 VMMR3DECL(void) SELMR3DumpDescriptor(X86DESC Desc, RTSEL Sel, const char *pszMsg); 104 VMMR3DECL(void) SELMR3DumpHyperGDT(PVM pVM); 105 VMMR3DECL(void) SELMR3DumpHyperLDT(PVM pVM); 106 VMMR3DECL(void) SELMR3DumpGuestGDT(PVM pVM); 107 VMMR3DECL(void) SELMR3DumpGuestLDT(PVM pVM); 108 VMMR3DECL(bool) SELMR3CheckTSS(PVM pVM); 109 VMMR3DECL(int) SELMR3DebugCheck(PVM pVM); 110 110 /** @def SELMR3_DEBUG_CHECK 111 111 * Invokes SELMR3DebugCheck in stricts builds. */ -
trunk/include/VBox/vmm/vm.h
r41976 r42407 496 496 * @param fFlag The flag to check. 497 497 */ 498 #define VM_FF_ISSET(pVM, fFlag) (((pVM)->fGlobalForcedActions & (fFlag)) == (fFlag)) 498 #define VM_FF_IS_SET(pVM, fFlag) (((pVM)->fGlobalForcedActions & (fFlag)) == (fFlag)) 499 /** @deprecated */ 500 #define VM_FF_ISSET(pVM, fFlag) VM_FF_IS_SET(pVM, fFlag) 499 501 500 502 /** @def VMCPU_FF_ISSET … … 504 506 * @param fFlag The flag to check. 505 507 */ 506 #define VMCPU_FF_ISSET(pVCpu, fFlag) (((pVCpu)->fLocalForcedActions & (fFlag)) == (fFlag)) 508 #define VMCPU_FF_IS_SET(pVCpu, fFlag) (((pVCpu)->fLocalForcedActions & (fFlag)) == (fFlag)) 509 /** @deprecated */ 510 #define VMCPU_FF_ISSET(pVCpu, fFlag) VMCPU_FF_IS_SET(pVCpu, fFlag) 507 511 508 512 /** @def VM_FF_ISPENDING … … 512 516 * @param fFlags The flags to check for. 513 517 */ 514 #define VM_FF_ISPENDING(pVM, fFlags) ((pVM)->fGlobalForcedActions & (fFlags)) 518 #define VM_FF_IS_PENDING(pVM, fFlags) ((pVM)->fGlobalForcedActions & (fFlags)) 519 /** @deprecated */ 520 #define VM_FF_ISPENDING(pVM, fFlags) VM_FF_IS_PENDING(pVM, fFlags) 515 521 516 522 /** @def VM_FF_TESTANDCLEAR … … 522 528 * @param iBit Bit position to check and clear 523 529 */ 524 #define VM_FF_TESTANDCLEAR(pVM, iBit) (ASMAtomicBitTestAndClear(&(pVM)->fGlobalForcedActions, iBit##_BIT)) 530 #define VM_FF_TEST_AND_CLEAR(pVM, iBit) (ASMAtomicBitTestAndClear(&(pVM)->fGlobalForcedActions, iBit##_BIT)) 531 /** @deprecated */ 532 #define VM_FF_TESTANDCLEAR(pVM, iBit) (ASMAtomicBitTestAndClear(&(pVM)->fGlobalForcedActions, iBit##_BIT)) 525 533 526 534 /** @def VMCPU_FF_TESTANDCLEAR … … 532 540 * @param iBit Bit position to check and clear 533 541 */ 534 #define VMCPU_FF_TESTANDCLEAR(pVCpu, iBit) (ASMAtomicBitTestAndClear(&(pVCpu)->fLocalForcedActions, iBit##_BIT)) 542 #define VMCPU_FF_TEST_AND_CLEAR(pVCpu, iBit) (ASMAtomicBitTestAndClear(&(pVCpu)->fLocalForcedActions, iBit##_BIT)) 543 /** @deprecated */ 544 #define VMCPU_FF_TESTANDCLEAR(pVCpu, iBit) (ASMAtomicBitTestAndClear(&(pVCpu)->fLocalForcedActions, iBit##_BIT)) 535 545 536 546 /** @def VMCPU_FF_ISPENDING … … 540 550 * @param fFlags The flags to check for. 541 551 */ 542 #define VMCPU_FF_ISPENDING(pVCpu, fFlags) ((pVCpu)->fLocalForcedActions & (fFlags)) 552 #define VMCPU_FF_IS_PENDING(pVCpu, fFlags) ((pVCpu)->fLocalForcedActions & (fFlags)) 553 /** @deprecated */ 554 #define VMCPU_FF_ISPENDING(pVCpu, fFlags) VMCPU_FF_IS_PENDING(pVCpu, fFlags) 543 555 544 556 /** @def VM_FF_ISPENDING … … 942 954 struct SELM s; 943 955 #endif 944 uint8_t padding[ 576]; /* multiple of 64 */956 uint8_t padding[768]; /* multiple of 64 */ 945 957 } selm; 946 958 … … 1066 1078 1067 1079 /** Padding for aligning the cpu array on a page boundary. */ 1068 uint8_t abAlignment2[ 734];1080 uint8_t abAlignment2[542]; 1069 1081 1070 1082 /* ---- end small stuff ---- */
Note:
See TracChangeset
for help on using the changeset viewer.