Changeset 46217 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 22, 2013 1:02:37 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/DBGFCpu.cpp
r44529 r46217 71 71 72 72 /** 73 * Wrapper around CPUMIsGuestIn64BitCode. 74 * 75 * @returns VINF_SUCCESS. 76 * @param pVM Pointer to the VM. 77 * @param idCpu The current CPU ID. 78 * @param pfIn64BitCode Where to return the result. 79 */ 80 static DECLCALLBACK(int) dbgfR3CpuIn64BitCode(PVM pVM, VMCPUID idCpu, bool *pfIn64BitCode) 81 { 82 Assert(idCpu == VMMGetCpuId(pVM)); 83 PVMCPU pVCpu = VMMGetCpuById(pVM, idCpu); 84 *pfIn64BitCode = CPUMIsGuestIn64BitCode(pVCpu); 85 return VINF_SUCCESS; 86 } 87 88 89 /** 90 * Checks if the given CPU is executing 64-bit code or not. 91 * 92 * @returns true / false accordingly. 93 * @param pUVM The user mode VM handle. 94 * @param idCpu The target CPU ID. 95 */ 96 VMMR3DECL(bool) DBGFR3CpuIsIn64BitCode(PUVM pUVM, VMCPUID idCpu) 97 { 98 UVM_ASSERT_VALID_EXT_RETURN(pUVM, false); 99 VM_ASSERT_VALID_EXT_RETURN(pUVM->pVM, false); 100 AssertReturn(idCpu < pUVM->pVM->cCpus, false); 101 102 CPUMMODE fIn64BitCode; 103 int rc = VMR3ReqPriorityCallWaitU(pUVM, idCpu, (PFNRT)dbgfR3CpuIn64BitCode, 3, pUVM->pVM, idCpu, &fIn64BitCode); 104 if (RT_FAILURE(rc)) 105 return false; 106 return fIn64BitCode; 107 } 108 109 110 /** 73 111 * Get the number of CPUs (or threads if you insist). 74 112 *
Note:
See TracChangeset
for help on using the changeset viewer.