Changeset 73289 in vbox
- Timestamp:
- Jul 21, 2018 5:00:51 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/HM.cpp
r73287 r73289 247 247 EXIT_REASON(SVM_EXIT_XCPT_24 , 88, "Exception 24 (0x18)."), 248 248 EXIT_REASON(SVM_EXIT_XCPT_25 , 89, "Exception 25 (0x19)."), 249 EXIT_REASON(SVM_EXIT_XCPT_26 , 90, "Exception 26 (0x1 A)."),250 EXIT_REASON(SVM_EXIT_XCPT_27 , 91, "Exception 27 (0x1 B)."),251 EXIT_REASON(SVM_EXIT_XCPT_28 , 92, "Exception 28 (0x1 C)."),252 EXIT_REASON(SVM_EXIT_XCPT_29 , 93, "Exception 29 (0x1 D)."),249 EXIT_REASON(SVM_EXIT_XCPT_26 , 90, "Exception 26 (0x1a)."), 250 EXIT_REASON(SVM_EXIT_XCPT_27 , 91, "Exception 27 (0x1b)."), 251 EXIT_REASON(SVM_EXIT_XCPT_28 , 92, "Exception 28 (0x1c)."), 252 EXIT_REASON(SVM_EXIT_XCPT_29 , 93, "Exception 29 (0x1d)."), 253 253 EXIT_REASON(SVM_EXIT_XCPT_30 , 94, "Exception 30 (#SX)."), 254 254 EXIT_REASON(SVM_EXIT_XCPT_31 , 95, "Exception 31 (0x1F)."), … … 1149 1149 PVMCSCACHE pCache = &pVCpu->hm.s.vmx.VMCSCache; 1150 1150 strcpy((char *)pCache->aMagic, "VMCSCACHE Magic"); 1151 pCache->uMagic = UINT64_C(0x DEADBEEFDEADBEEF);1151 pCache->uMagic = UINT64_C(0xdeadbeefdeadbeef); 1152 1152 } 1153 1153 #endif … … 2040 2040 /* Magic marker for searching in crash dumps. */ 2041 2041 strcpy((char *)pCache->aMagic, "VMCSCACHE Magic"); 2042 pCache->uMagic = UINT64_C(0x DEADBEEFDEADBEEF);2042 pCache->uMagic = UINT64_C(0xdeadbeefdeadbeef); 2043 2043 #endif 2044 2044 } … … 2337 2337 pPatch->cbOp = cbOpMmio + cbOp; 2338 2338 2339 /* 0x F0, 0x0F, 0x20, 0xC0 = mov eax, cr8 */2340 abInstr[0] = 0x F0;2341 abInstr[1] = 0x0 F;2339 /* 0xf0, 0x0f, 0x20, 0xc0 = mov eax, cr8 */ 2340 abInstr[0] = 0xf0; 2341 abInstr[1] = 0x0f; 2342 2342 abInstr[2] = 0x20; 2343 abInstr[3] = 0x C0 | pDis->Param1.Base.idxGenReg;2343 abInstr[3] = 0xc0 | pDis->Param1.Base.idxGenReg; 2344 2344 for (unsigned i = 4; i < pPatch->cbOp; i++) 2345 2345 abInstr[i] = 0x90; /* nop */ … … 2480 2480 aPatch[off++] = 0x50; /* push eax */ 2481 2481 aPatch[off++] = 0x31; /* xor edx, edx */ 2482 aPatch[off++] = 0x D2;2482 aPatch[off++] = 0xd2; 2483 2483 if (pDis->Param2.fUse == DISUSE_REG_GEN32) 2484 2484 { … … 2492 2492 { 2493 2493 Assert(pDis->Param2.fUse == DISUSE_IMMEDIATE32); 2494 aPatch[off++] = 0x B8; /* mov eax, immediate */2494 aPatch[off++] = 0xb8; /* mov eax, immediate */ 2495 2495 *(uint32_t *)&aPatch[off] = pDis->Param2.uValue; 2496 2496 off += sizeof(uint32_t); 2497 2497 } 2498 aPatch[off++] = 0x B9; /* mov ecx, 0xc0000082 */2498 aPatch[off++] = 0xb9; /* mov ecx, 0xc0000082 */ 2499 2499 *(uint32_t *)&aPatch[off] = MSR_K8_LSTAR; 2500 2500 off += sizeof(uint32_t); 2501 2501 2502 aPatch[off++] = 0x0 F; /* wrmsr */2502 aPatch[off++] = 0x0f; /* wrmsr */ 2503 2503 aPatch[off++] = 0x30; 2504 2504 if (!fUsesEax) 2505 2505 aPatch[off++] = 0x58; /* pop eax */ 2506 aPatch[off++] = 0x5 A; /* pop edx */2506 aPatch[off++] = 0x5a; /* pop edx */ 2507 2507 aPatch[off++] = 0x59; /* pop ecx */ 2508 2508 } … … 2533 2533 2534 2534 aPatch[off++] = 0x31; /* xor edx, edx */ 2535 aPatch[off++] = 0x D2;2536 2537 aPatch[off++] = 0x B9; /* mov ecx, 0xc0000082 */2535 aPatch[off++] = 0xd2; 2536 2537 aPatch[off++] = 0xb9; /* mov ecx, 0xc0000082 */ 2538 2538 *(uint32_t *)&aPatch[off] = MSR_K8_LSTAR; 2539 2539 off += sizeof(uint32_t); 2540 2540 2541 aPatch[off++] = 0x0 F; /* rdmsr */2541 aPatch[off++] = 0x0f; /* rdmsr */ 2542 2542 aPatch[off++] = 0x32; 2543 2543 … … 2551 2551 aPatch[off++] = 0x58; /* pop eax */ 2552 2552 if (pDis->Param1.Base.idxGenReg != DISGREG_EDX ) 2553 aPatch[off++] = 0x5 A; /* pop edx */2553 aPatch[off++] = 0x5a; /* pop edx */ 2554 2554 if (pDis->Param1.Base.idxGenReg != DISGREG_ECX) 2555 2555 aPatch[off++] = 0x59; /* pop ecx */ 2556 2556 } 2557 aPatch[off++] = 0x E9; /* jmp return_address */2557 aPatch[off++] = 0xe9; /* jmp return_address */ 2558 2558 *(RTRCUINTPTR *)&aPatch[off] = ((RTRCUINTPTR)pCtx->eip + cbOp) - ((RTRCUINTPTR)pVM->hm.s.pFreeGuestPatchMem + off + 4); 2559 2559 off += sizeof(RTRCUINTPTR);
Note:
See TracChangeset
for help on using the changeset viewer.