Changeset 22429 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 25, 2009 11:54:39 AM (15 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCMInternal.h
r22291 r22429 847 847 #ifdef VBOX_STRICT 848 848 VMMR0DECL(void) HWACCMDumpRegs(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx); 849 VMMR0DECL(void) HWACCMR0DumpDescriptor(P X86DESCHCDesc, RTSEL Sel, const char *pszMsg);849 VMMR0DECL(void) HWACCMR0DumpDescriptor(PCX86DESCHC pDesc, RTSEL Sel, const char *pszMsg); 850 850 #else 851 # define HWACCMDumpRegs(a, b ,c)do { } while (0)852 # define HWACCMR0DumpDescriptor(a, b, c)do { } while (0)851 # define HWACCMDumpRegs(a, b ,c) do { } while (0) 852 # define HWACCMR0DumpDescriptor(a, b, c) do { } while (0) 853 853 #endif 854 854 -
trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp
r21210 r22429 1336 1336 1337 1337 #ifdef VBOX_STRICT 1338 # include <iprt/string.h>1339 1338 /** 1340 1339 * Dumps a descriptor. … … 1344 1343 * @param pszMsg Message to prepend the log entry with. 1345 1344 */ 1346 VMMR0DECL(void) HWACCMR0DumpDescriptor(P X86DESCHC pDesc, RTSEL Sel, const char *pszMsg)1345 VMMR0DECL(void) HWACCMR0DumpDescriptor(PCX86DESCHC pDesc, RTSEL Sel, const char *pszMsg) 1347 1346 { 1348 1347 /* … … 1353 1352 unsigned cch; 1354 1353 const char *psz; 1355 } const aTypes[32] =1354 } const s_aTypes[32] = 1356 1355 { 1357 1356 # define STRENTRY(str) { sizeof(str) - 1, str } … … 1416 1415 char *psz = &szMsg[0]; 1417 1416 unsigned i = pDesc->Gen.u1DescType << 4 | pDesc->Gen.u4Type; 1418 memcpy(psz, aTypes[i].psz,aTypes[i].cch);1419 psz += aTypes[i].cch;1417 memcpy(psz, s_aTypes[i].psz, s_aTypes[i].cch); 1418 psz += s_aTypes[i].cch; 1420 1419 1421 1420 if (pDesc->Gen.u1Present) -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r22257 r22429 715 715 else 716 716 ASMBitSet(pMSRBitmap, ulBit); 717 717 718 718 if (fWrite) 719 719 ASMBitClear(pMSRBitmap + 0x800, ulBit); … … 1008 1008 RTGDTR gdtr; 1009 1009 RTSEL SelTR; 1010 P X86DESCHCpDesc;1010 PCX86DESCHC pDesc; 1011 1011 uintptr_t trBase; 1012 1012 RTSEL cs; … … 1109 1109 } 1110 1110 1111 pDesc = (PCX86DESCHC)(gdtr.pGdt + (SelTR & X86_SEL_MASK)); 1111 1112 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL 1112 1113 if (VMX_IS_64BIT_HOST_MODE()) 1113 1114 { 1114 pDesc = &((PX86DESCHC)gdtr.pGdt)[SelTR >> X86_SEL_SHIFT_HC]; /// ????1115 1115 uint64_t trBase64 = X86DESC64_BASE(*(PX86DESC64)pDesc); 1116 1116 rc = VMXWriteVMCS64(VMX_VMCS_HOST_TR_BASE, trBase64); … … 1121 1121 #endif 1122 1122 { 1123 pDesc = &((PX86DESCHC)gdtr.pGdt)[SelTR >> X86_SEL_SHIFT_HC];1124 1123 #if HC_ARCH_BITS == 64 1125 1124 trBase = X86DESC64_BASE(*pDesc); … … 4233 4232 #ifdef VBOX_STRICT 4234 4233 RTGDTR gdtr; 4235 P X86DESCHCpDesc;4234 PCX86DESCHC pDesc; 4236 4235 RTCCUINTREG val; 4237 4236 … … 4266 4265 if (val < gdtr.cbGdt) 4267 4266 { 4268 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC];4267 pDesc = (PCX86DESCHC)(gdtr.pGdt + (val & X86_SEL_MASK)); 4269 4268 HWACCMR0DumpDescriptor(pDesc, val, "CS: "); 4270 4269 } … … 4274 4273 if (val < gdtr.cbGdt) 4275 4274 { 4276 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC];4275 pDesc = (PCX86DESCHC)(gdtr.pGdt + (val & X86_SEL_MASK)); 4277 4276 HWACCMR0DumpDescriptor(pDesc, val, "DS: "); 4278 4277 } … … 4282 4281 if (val < gdtr.cbGdt) 4283 4282 { 4284 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC];4283 pDesc = (PCX86DESCHC)(gdtr.pGdt + (val & X86_SEL_MASK)); 4285 4284 HWACCMR0DumpDescriptor(pDesc, val, "ES: "); 4286 4285 } … … 4290 4289 if (val < gdtr.cbGdt) 4291 4290 { 4292 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC];4291 pDesc = (PCX86DESCHC)(gdtr.pGdt + (val & X86_SEL_MASK)); 4293 4292 HWACCMR0DumpDescriptor(pDesc, val, "FS: "); 4294 4293 } … … 4298 4297 if (val < gdtr.cbGdt) 4299 4298 { 4300 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC];4299 pDesc = (PCX86DESCHC)(gdtr.pGdt + (val & X86_SEL_MASK)); 4301 4300 HWACCMR0DumpDescriptor(pDesc, val, "GS: "); 4302 4301 } … … 4306 4305 if (val < gdtr.cbGdt) 4307 4306 { 4308 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC];4307 pDesc = (PCX86DESCHC)(gdtr.pGdt + (val & X86_SEL_MASK)); 4309 4308 HWACCMR0DumpDescriptor(pDesc, val, "SS: "); 4310 4309 } … … 4314 4313 if (val < gdtr.cbGdt) 4315 4314 { 4316 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC];4315 pDesc = (PCX86DESCHC)(gdtr.pGdt + (val & X86_SEL_MASK)); 4317 4316 HWACCMR0DumpDescriptor(pDesc, val, "TR: "); 4318 4317 }
Note:
See TracChangeset
for help on using the changeset viewer.