Changeset 66104 in vbox
- Timestamp:
- Mar 15, 2017 10:06:21 AM (8 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/HMAll.cpp
r66000 r66104 560 560 /** 561 561 * VMX nested-guest VM-exit handler. 562 * 563 * @param pVCpu The cross context virtual CPU structure. 564 * @param uBasicExitReason The basic exit reason. 562 * 563 * @param pVCpu The cross context virtual CPU structure. 564 * @param uBasicExitReason The basic exit reason. 565 565 */ 566 566 VMM_INT_DECL(void) HMNstGstVmxVmExit(PVMCPU pVCpu, uint16_t uBasicExitReason) -
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r66000 r66104 396 396 /** 397 397 * Check if an SVM control/instruction intercept is set. 398 */ 398 */ 399 399 #define IEM_IS_SVM_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept) (CPUMIsGuestSvmCtrlInterceptSet(IEM_GET_CTX(a_pVCpu), (a_Intercept))) 400 400 401 /** 401 /** 402 402 * Check if an SVM read CRx intercept is set. 403 */ 403 */ 404 404 #define IEM_IS_SVM_READ_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (CPUMIsGuestSvmCtrlInterceptSet(IEM_GET_CTX(a_pVCpu), (a_uCr))) 405 405 406 /** 406 /** 407 407 * Check if an SVM write CRx intercept is set. 408 */ 408 */ 409 409 #define IEM_IS_SVM_WRITE_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (CPUMIsGuestSvmCtrlInterceptSet(IEM_GET_CTX(a_pVCpu), (a_uCr))) 410 410 411 /** 411 /** 412 412 * Check if an SVM read DRx intercept is set. 413 */ 413 */ 414 414 #define IEM_IS_SVM_READ_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (CPUMIsGuestSvmCtrlInterceptSet(IEM_GET_CTX(a_pVCpu), (a_uDr))) 415 415 416 /** 416 /** 417 417 * Check if an SVM write DRx intercept is set. 418 */ 418 */ 419 419 #define IEM_IS_SVM_WRITE_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (CPUMIsGuestSvmWriteDRxInterceptSet(IEM_GET_CTX(a_pVCpu), (a_uDr))) 420 420 421 /** 421 /** 422 422 * Check if an SVM exception intercept is set. 423 */ 423 */ 424 424 #define IEM_IS_SVM_XCPT_INTERCEPT_SET(a_pVCpu, a_enmXcpt) (CPUMIsGuestSvmXcptInterceptSet(IEM_GET_CTX(a_pVCpu), (a_enmXcpt))) 425 425 #endif /* VBOX_WITH_NESTED_HWVIRT */ … … 14968 14968 /** 14969 14969 * Interface for HM and EM to emulate the STGI instruction. 14970 * 14971 * @returns Strict VBox status code. 14970 * 14971 * @returns Strict VBox status code. 14972 14972 * @param pVCpu The cross context virtual CPU structure of the calling EMT. 14973 * @param cbInstr The instruction length in bytes. 14974 * @thread EMT(pVCpu) 14973 * @param cbInstr The instruction length in bytes. 14974 * @thread EMT(pVCpu) 14975 14975 */ 14976 14976 VMM_INT_DECL(VBOXSTRICTRC) IEMExecDecodedClgi(PVMCPU pVCpu, uint8_t cbInstr) … … 14986 14986 /** 14987 14987 * Interface for HM and EM to emulate the STGI instruction. 14988 * 14989 * @returns Strict VBox status code. 14988 * 14989 * @returns Strict VBox status code. 14990 14990 * @param pVCpu The cross context virtual CPU structure of the calling EMT. 14991 * @param cbInstr The instruction length in bytes. 14992 * @thread EMT(pVCpu) 14991 * @param cbInstr The instruction length in bytes. 14992 * @thread EMT(pVCpu) 14993 14993 */ 14994 14994 VMM_INT_DECL(VBOXSTRICTRC) IEMExecDecodedStgi(PVMCPU pVCpu, uint8_t cbInstr) -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r66015 r66104 1306 1306 HMSVM_SEG_REG_COPY_TO_VMCB(pCtx, pVmcb, ES, es); 1307 1307 HMSVM_SEG_REG_COPY_TO_VMCB(pCtx, pVmcb, FS, fs); 1308 HMSVM_SEG_REG_COPY_TO_VMCB(pCtx, pVmcb, GS, gs); 1308 HMSVM_SEG_REG_COPY_TO_VMCB(pCtx, pVmcb, GS, gs); 1309 1309 1310 1310 pVmcb->guest.u8CPL = pCtx->ss.Attr.n.u2Dpl; … … 2768 2768 Log4(("ctrl.u16InterceptWrDRx %#x\n", pVmcb->ctrl.u16InterceptWrDRx)); 2769 2769 Log4(("ctrl.u32InterceptXcpt %#x\n", pVmcb->ctrl.u32InterceptXcpt)); 2770 Log4(("ctrl.u64InterceptCtrl %#RX64\n", pVmcb->ctrl.u64InterceptCtrl)); 2770 Log4(("ctrl.u64InterceptCtrl %#RX64\n", pVmcb->ctrl.u64InterceptCtrl)); 2771 2771 Log4(("ctrl.u64IOPMPhysAddr %#RX64\n", pVmcb->ctrl.u64IOPMPhysAddr)); 2772 2772 Log4(("ctrl.u64MSRPMPhysAddr %#RX64\n", pVmcb->ctrl.u64MSRPMPhysAddr)); … … 3176 3176 */ 3177 3177 if ( (pVM->hm.s.cpuid.u32AMDFeatureEDX & X86_CPUID_EXT_FEATURE_EDX_RDTSCP) 3178 && !(pVmcb->ctrl.u64InterceptCtrl & SVM_CTRL_INTERCEPT_RDTSCP)) 3178 && !(pVmcb->ctrl.u64InterceptCtrl & SVM_CTRL_INTERCEPT_RDTSCP)) 3179 3179 { 3180 3180 hmR0SvmSetMsrPermission(pVCpu, MSR_K8_TSC_AUX, SVMMSREXIT_PASSTHRU_READ, SVMMSREXIT_PASSTHRU_WRITE); -
trunk/src/VBox/VMM/VMMR3/DBGFR3Flow.cpp
r64766 r66104 1255 1255 if (RT_SUCCESS(rc)) 1256 1256 { 1257 rc = dbgfR3FlowQueryDirectBranchTarget(pUVM, idCpu, &DisState.Param1, &pInstr->AddrInstr, pInstr->cbInstr, 1257 rc = dbgfR3FlowQueryDirectBranchTarget(pUVM, idCpu, &DisState.Param1, &pInstr->AddrInstr, pInstr->cbInstr, 1258 1258 RT_BOOL(DisState.pCurInstr->fOpType & DISOPTYPE_RELATIVE_CONTROLFLOW), 1259 1259 &pFlowBb->AddrTarget); … … 1617 1617 * for every other basic block type. 1618 1618 * @note For indirect unconditional branches using a branch table this will return the start address 1619 * of the branch table. 1619 * of the branch table. 1620 1620 */ 1621 1621 VMMR3DECL(PDBGFADDRESS) DBGFR3FlowBbGetBranchAddress(DBGFFLOWBB hFlowBb, PDBGFADDRESS pAddrTarget) -
trunk/src/VBox/VMM/VMMR3/PATMA.asm
r62478 r66104 59 59 at PATCHASMRECORD.cbFunction, DD NAME(%1 %+ _EndProc) - NAME(%1) 60 60 at PATCHASMRECORD.cRelocs, DD %2 61 iend 61 iend 62 62 %endmacro 63 63 … … 76 76 at PATCHASMRECORD.cbFunction, DD NAME(%1 %+ _EndProc) - NAME(%1) 77 77 at PATCHASMRECORD.cRelocs, DD %3 78 iend 78 iend 79 79 %endmacro 80 80 … … 107 107 at PATCHASMRECORD.cbFunction, DD NAME(%1 %+ _EndProc) - NAME(%1) 108 108 at PATCHASMRECORD.cRelocs, DD %5 109 iend 109 iend 110 110 %endmacro 111 111 … … 124 124 125 125 ;; 126 ; Switches to the data section for the read-only patch descriptor data and 126 ; Switches to the data section for the read-only patch descriptor data and 127 127 ; aligns it appropriately. 128 128 ; … … 177 177 ;; 178 178 ; Ends a patch. 179 ; 179 ; 180 180 ; This terminates the function and fixup array. 181 181 ; … … 198 198 ; 199 199 %ifdef RT_ARCH_AMD64 200 BITS 32 200 BITS 32 201 201 %endif 202 202 … … 357 357 GLOBALNAME g_patmClearInhibitIRQContIF0Record 358 358 PATCHASMRECORD_INIT PATMClearInhibitIRQContIF0, 11 359 DD PATM_ASMFIX_INTERRUPTFLAG, 0 359 DD PATM_ASMFIX_INTERRUPTFLAG, 0 360 360 DD PATM_ASMFIX_INHIBITIRQADDR, 0 361 361 DD PATM_ASMFIX_VMFLAGS, 0 … … 1604 1604 %endif 1605 1605 DD PATM_ASMFIX_INTERRUPTFLAG, 0 1606 %ifdef PATM_LOG_PATCHIRET 1606 %ifdef PATM_LOG_PATCHIRET 1607 1607 DD PATM_ASMFIX_PENDINGACTION, 0 1608 %endif 1608 %endif 1609 1609 DD PATM_ASMFIX_VM_FORCEDACTIONS, 0 1610 1610 DD PATM_ASMFIX_TEMP_EAX, 0 … … 1771 1771 ; Patch record for 'JEcx' 1772 1772 BEGIN_PATCH_RODATA_SECTION 1773 GLOBALNAME g_patmJEcxRecord 1773 GLOBALNAME g_patmJEcxRecord 1774 1774 PATCHASMRECORD_INIT_EX PATMJEcxReplacement, , PATMJEcxJump, PATMJEcxSizeOverride, 3 1775 1775 DD PATM_ASMFIX_INTERRUPTFLAG, 0 … … 2011 2011 DD PATM_ASMFIX_STACKBASE_GUEST, 0 2012 2012 DD PATM_ASMFIX_CALL_PATCH_TARGET_ADDR, 0 2013 %ifdef PATM_LOG_PATCHINSTR 2013 %ifdef PATM_LOG_PATCHINSTR 2014 2014 DD PATM_ASMFIX_PENDINGACTION, 0 2015 %endif 2015 %endif 2016 2016 DD PATM_ASMFIX_CALL_RETURN_ADDR, 0 2017 2017 DD PATM_ASMFIX_CALL_PATCH_TARGET_ADDR, 0 … … 2463 2463 DD PATM_ASMFIX_STACKBASE, 0 2464 2464 DD PATM_ASMFIX_PATCHBASE, 0 2465 %ifdef PATM_LOG_PATCHINSTR 2465 %ifdef PATM_LOG_PATCHINSTR 2466 2466 DD PATM_ASMFIX_PENDINGACTION, 0 2467 %endif 2467 %endif 2468 2468 DD PATM_ASMFIX_PENDINGACTION, 0 2469 2469 DD PATM_ASMFIX_PATCHBASE, 0 2470 %ifdef PATM_LOG_PATCHINSTR 2470 %ifdef PATM_LOG_PATCHINSTR 2471 2471 DD PATM_ASMFIX_PENDINGACTION, 0 2472 2472 %endif … … 2524 2524 DD PATM_ASMFIX_INTERRUPTFLAG, 0 2525 2525 DD PATM_ASMFIX_STACKPTR, 0 2526 %ifdef PATM_LOG_PATCHINSTR 2526 %ifdef PATM_LOG_PATCHINSTR 2527 2527 DD PATM_ASMFIX_PENDINGACTION, 0 2528 %endif 2528 %endif 2529 2529 DD PATM_ASMFIX_INTERRUPTFLAG, 0 2530 2530 DD 0ffffffffh, 0ffffffffh -
trunk/src/VBox/VMM/VMMR3/PATMA.mac
r62478 r66104 76 76 77 77 78 ;; Everything except IOPL, NT, IF, VM, VIF, VIP and RF 78 ;; Everything except IOPL, NT, IF, VM, VIF, VIP and RF 79 79 %define PATM_FLAGS_MASK (X86_EFL_CF|X86_EFL_PF|X86_EFL_AF|X86_EFL_ZF|X86_EFL_SF|X86_EFL_TF|X86_EFL_DF|X86_EFL_OF|X86_EFL_AC|X86_EFL_ID) 80 80 … … 134 134 ;; Offset of the jump table? 135 135 .offJump resd 1 136 ;; Used only by loop/loopz/loopnz. 137 .offRelJump resd 1 136 ;; Used only by loop/loopz/loopnz. 137 .offRelJump resd 1 138 138 ;; Size override byte position. 139 .offSizeOverride resd 1 139 .offSizeOverride resd 1 140 140 ;; The size of the patch function. 141 141 .cbFunction resd 1 -
trunk/src/VBox/VMM/VMMRC/CPUMRCPatchHlp.asm
r62478 r66104 36 36 37 37 ;; 38 ; Helper for PATMCpuidReplacement. 39 ; 38 ; Helper for PATMCpuidReplacement. 39 ; 40 40 ; We have at most 32 bytes of stack to play with, . 41 41 ; … … 59 59 ; 60 60 ; Perform a binary search looking for leaf with the EAX value. 61 ; 62 mov edx, [ss:edi + VM.cpum + CPUM.GuestInfo + CPUMINFO.cCpuIdLeaves] 61 ; 62 mov edx, [ss:edi + VM.cpum + CPUM.GuestInfo + CPUMINFO.cCpuIdLeaves] 63 63 mov ecx, [ss:edi + VM.cpum + CPUM.GuestInfo + CPUMINFO.paCpuIdLeavesRC] 64 64 test edx, edx … … 98 98 ; We've to a matching leaf, does the sub-leaf match too? 99 99 ; 100 cpuid_match_eax: 100 cpuid_match_eax: 101 101 mov ecx, [esp + 4] 102 102 and ecx, [ss:ebx + CPUMCPUIDLEAF.fSubLeafMask] … … 112 112 113 113 cpuid_lookup_subleaf_backwards_loop: 114 cmp ebx, edx ; Is there a leaf before the current? 114 cmp ebx, edx ; Is there a leaf before the current? 115 115 jbe cpuid_subleaf_not_found ; If not we're out of luck. 116 116 cmp eax, [ss:ebx - CPUMCPUIDLEAF_size + CPUMCPUIDLEAF.uLeaf] … … 123 123 124 124 ; 125 ; Search forward until we've got a matching sub-leaf (or not). 125 ; Search forward until we've got a matching sub-leaf (or not). 126 126 ; 127 127 cpuid_lookup_subleaf_forwards: 128 128 ; Calculate the last leaf address. 129 mov edx, [ss:edi + VM.cpum + CPUM.GuestInfo + CPUMINFO.cCpuIdLeaves] 129 mov edx, [ss:edi + VM.cpum + CPUM.GuestInfo + CPUMINFO.cCpuIdLeaves] 130 130 dec edx 131 131 shl edx, CPUMCPUIDLEAF_SIZE_LOG2 … … 138 138 jne cpuid_subleaf_not_found 139 139 add ebx, CPUMCPUIDLEAF_size 140 cmp ecx, [ss:ebx + CPUMCPUIDLEAF.uSubLeaf] 140 cmp ecx, [ss:ebx + CPUMCPUIDLEAF.uSubLeaf] 141 141 ja cpuid_subleaf_lookup 142 142 je cpuid_fetch 143 143 144 144 ; 145 145 ; Out of range sub-leaves aren't quite as easy and pretty as we emulate them 146 146 ; here, but we do an adequate job. 147 ; 147 ; 148 148 cpuid_subleaf_not_found: 149 149 xor ecx, ecx … … 189 189 mov eax, [ss:ebx + CPUMCPUIDLEAF.uEax] 190 190 mov ebx, [ss:ebx + CPUMCPUIDLEAF.uEbx] 191 191 192 192 cpuid_done: 193 193 pop edi -
trunk/src/VBox/VMM/tools/VBoxCpuReport.cpp
r62869 r66104 519 519 && g_enmMicroarch == kCpumMicroarch_Intel_Atom_Bonnell) 520 520 || ( (uMsr == 0x280) 521 && g_enmMicroarch == kCpumMicroarch_Intel_P6_III)) 521 && g_enmMicroarch == kCpumMicroarch_Intel_P6_III)) 522 522 vbCpuRepDebug("Skipping %#x\n", uMsr); 523 523 else
Note:
See TracChangeset
for help on using the changeset viewer.