Changeset 47123 in vbox
- Timestamp:
- Jul 12, 2013 3:31:44 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 87217
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r47109 r47123 1527 1527 1528 1528 1529 #if RT_INLINE_ASM_GNU_STYLE1530 # define __STR(x) #x1531 # define STR(x) __STR(x)1532 #endif1533 1534 1535 1529 /** @defgroup grp_vmx_asm vmx assembly helpers 1536 1530 * @ingroup grp_vmx … … 1547 1541 */ 1548 1542 DECLASM(int) VMXRestoreHostState(uint32_t fRestoreHostFlags, PVMXRESTOREHOST pRestoreHost); 1543 1544 1545 /** 1546 * Dispatches an NMI to the host. 1547 */ 1548 DECLASM(int) VMXDispatchHostNmi(void); 1549 1549 1550 1550 … … 1568 1568 "ja 2f \n\t" 1569 1569 "je 1f \n\t" 1570 "movl $" STR(VERR_VMX_INVALID_VMXON_PTR)", %0\n\t"1570 "movl $"RT_XSTR(VERR_VMX_INVALID_VMXON_PTR)", %0 \n\t" 1571 1571 "jmp 2f \n\t" 1572 1572 "1: \n\t" 1573 "movl $" STR(VERR_VMX_VMXON_FAILED)", %0\n\t"1573 "movl $"RT_XSTR(VERR_VMX_VMXON_FAILED)", %0 \n\t" 1574 1574 "2: \n\t" 1575 1575 "add $8, %%esp \n\t" … … 1648 1648 ".byte 0x66, 0x0F, 0xC7, 0x34, 0x24 # VMCLEAR [esp] \n\t" 1649 1649 "jnc 1f \n\t" 1650 "movl $" STR(VERR_VMX_INVALID_VMCS_PTR)", %0\n\t"1650 "movl $"RT_XSTR(VERR_VMX_INVALID_VMCS_PTR)", %0 \n\t" 1651 1651 "1: \n\t" 1652 1652 "add $8, %%esp \n\t" … … 1696 1696 ".byte 0x0F, 0xC7, 0x34, 0x24 # VMPTRLD [esp] \n\t" 1697 1697 "jnc 1f \n\t" 1698 "movl $" STR(VERR_VMX_INVALID_VMCS_PTR)", %0\n\t"1698 "movl $"RT_XSTR(VERR_VMX_INVALID_VMCS_PTR)", %0 \n\t" 1699 1699 "1: \n\t" 1700 1700 "add $8, %%esp \n\t" … … 1750 1750 "ja 2f \n\t" 1751 1751 "je 1f \n\t" 1752 "movl $" STR(VERR_VMX_INVALID_VMCS_PTR)", %0\n\t"1752 "movl $"RT_XSTR(VERR_VMX_INVALID_VMCS_PTR)", %0 \n\t" 1753 1753 "jmp 2f \n\t" 1754 1754 "1: \n\t" 1755 "movl $" STR(VERR_VMX_INVALID_VMCS_FIELD)", %0\n\t"1755 "movl $"RT_XSTR(VERR_VMX_INVALID_VMCS_FIELD)", %0 \n\t" 1756 1756 "2: \n\t" 1757 1757 :"=rm"(rc) … … 1854 1854 # if RT_INLINE_ASM_GNU_STYLE 1855 1855 __asm__ __volatile__ ( 1856 "movl $" STR(VINF_SUCCESS)", %0\n\t"1856 "movl $"RT_XSTR(VINF_SUCCESS)", %0 \n\t" 1857 1857 ".byte 0x0F, 0x78, 0xc2 # VMREAD eax, edx \n\t" 1858 1858 "ja 2f \n\t" 1859 1859 "je 1f \n\t" 1860 "movl $" STR(VERR_VMX_INVALID_VMCS_PTR)", %0\n\t"1860 "movl $"RT_XSTR(VERR_VMX_INVALID_VMCS_PTR)", %0 \n\t" 1861 1861 "jmp 2f \n\t" 1862 1862 "1: \n\t" 1863 "movl $" STR(VERR_VMX_INVALID_VMCS_FIELD)", %0\n\t"1863 "movl $"RT_XSTR(VERR_VMX_INVALID_VMCS_FIELD)", %0 \n\t" 1864 1864 "2: \n\t" 1865 1865 :"=&r"(rc), -
trunk/include/VBox/vmm/vm.h
r46833 r47123 149 149 struct HMCPU s; 150 150 #endif 151 uint8_t padding[55 04]; /* multiple of 64 */151 uint8_t padding[5568]; /* multiple of 64 */ 152 152 } hm; 153 153 … … 226 226 227 227 /** Align the following members on page boundary. */ 228 uint8_t abAlignment2[ 256];228 uint8_t abAlignment2[192]; 229 229 230 230 /** PGM part. */ -
trunk/include/VBox/vmm/vm.mac
r46268 r47123 135 135 136 136 .cpum resb 3584 137 .hm resb 55 04137 .hm resb 5568 138 138 .em resb 1472 139 139 .iem resb 3072 -
trunk/src/VBox/VMM/VMMR0/HMR0A.asm
r46942 r47123 373 373 ret 374 374 ENDPROC VMXRestoreHostState 375 376 377 ;/** 378 ; * Dispatches an NMI to the host. 379 ; */ 380 ALIGNCODE(16) 381 BEGINPROC VMXDispatchHostNmi 382 int 2 ; NMI is always vector 2. The IDT[2] IRQ handler cannot be anything else. See Intel spec. 6.3.1 "External Interrupts". 383 ret 384 ENDPROC VMXDispatchHostNmi 375 385 376 386 -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r47119 r47123 3532 3532 { 3533 3533 HMSVM_VALIDATE_EXIT_HANDLER_PARAMS(); 3534 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitExtInt); 3534 3535 #ifdef VBOX_WITH_STATISTICS 3536 if (pSvmTransient->u64ExitCode == SVM_EXIT_NMI) 3537 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitHostNmi); 3538 else if (pSvmTransient->u64ExitCode == SVM_EXIT_INTR) 3539 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitExtInt); 3540 #endif 3535 3541 3536 3542 /* -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r47110 r47123 7365 7365 if (uIntrType == VMX_EXIT_INTERRUPTION_INFO_TYPE_NMI) 7366 7366 { 7367 /** @todo We should inject the NMI to the host by calling the NMI 7368 * interrupt handler! See Intel spec. 27.5.5 "Updating Non-Register State". */ 7367 /* 7368 * This cannot be a guest NMI as the only way for the guest to receive an NMI is if we injected it ourselves and 7369 * anything we inject is not going to cause a VM-exit directly for the event being injected. 7370 * See Intel spec. 27.2.3 "Information for VM Exits During Event Delivery". 7371 * 7372 * Dispatch the NMI to the host. See Intel spec. 27.5.5 "Updating Non-Register State". 7373 */ 7374 VMXDispatchHostNmi(); 7375 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitHostNmi); 7369 7376 STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExitXcptNmi, y3); 7370 return VINF_ EM_RAW_INTERRUPT;7377 return VINF_SUCCESS; 7371 7378 } 7372 7379 … … 7434 7441 { 7435 7442 AssertMsgFailed(("Unexpected VM-exit caused by exception %#x\n", uVector)); 7443 pVCpu->hm.s.u32HMError = uVector; 7436 7444 rc = VERR_VMX_UNEXPECTED_EXCEPTION; 7437 7445 } … … 7442 7450 } 7443 7451 7444 case VMX_EXIT_INTERRUPTION_INFO_TYPE_DB_XCPT:7445 7452 default: 7446 7453 { 7454 pVCpu->hm.s.u32HMError = uExitIntrInfo; 7447 7455 rc = VERR_VMX_UNEXPECTED_INTERRUPTION_EXIT_CODE; 7448 7456 AssertMsgFailed(("Unexpected interruption code %#x\n", VMX_EXIT_INTERRUPTION_INFO_TYPE(uExitIntrInfo))); -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r46871 r47123 2229 2229 goto ResumeExecution; 2230 2230 2231 case SVM_EXIT_INTR: STAM_COUNTER_INC(&pVCpu->hm.s.StatExitExtInt); /* no break */2231 case SVM_EXIT_INTR: 2232 2232 case SVM_EXIT_FERR_FREEZE: 2233 2233 case SVM_EXIT_NMI: 2234 2234 case SVM_EXIT_SMI: 2235 2235 case SVM_EXIT_INIT: 2236 #ifdef VBOX_WITH_STATISTICS 2237 if (vector == SVM_EXIT_INTR) 2238 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitExtInt); 2239 else if (vector == SVM_EXIT_NMI) 2240 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitHostNmi); 2241 #endif 2236 2242 /* External interrupt; leave to allow it to be dispatched again. */ 2237 2243 rc = VINF_EM_RAW_INTERRUPT; -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r47109 r47123 3535 3535 case VMX_EXIT_INTERRUPTION_INFO_TYPE_NMI: /* Non-maskable interrupt. */ 3536 3536 /* External interrupt; leave to allow it to be dispatched again. */ 3537 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitHostNmi); 3537 3538 rc = VINF_EM_RAW_INTERRUPT; 3538 3539 break; -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r47109 r47123 682 682 HM_REG_COUNTER(&pVCpu->hm.s.StatExitMaxResume, "/HM/CPU%d/Exit/MaxResume", "Maximum VMRESUME inner-loop counter reached."); 683 683 HM_REG_COUNTER(&pVCpu->hm.s.StatExitExtInt, "/HM/CPU%d/Exit/ExtInt", "Host interrupt received."); 684 HM_REG_COUNTER(&pVCpu->hm.s.StatExitHostNmi, "/HM/CPU%d/Exit/HostNmi", "Host NMI received."); 684 685 HM_REG_COUNTER(&pVCpu->hm.s.StatExitPreemptTimer, "/HM/CPU%d/Exit/PreemptTimer", "VMX-preemption timer expired."); 685 686 HM_REG_COUNTER(&pVCpu->hm.s.StatExitTprBelowThreshold, "/HM/CPU%d/Exit/TprBelowThreshold", "TPR lowered below threshold by the guest."); -
trunk/src/VBox/VMM/include/HMInternal.h
r47090 r47123 849 849 STAMCOUNTER StatExitMaxResume; 850 850 STAMCOUNTER StatExitExtInt; 851 STAMCOUNTER StatExitHostNmi; 851 852 STAMCOUNTER StatExitPreemptTimer; 852 853 STAMCOUNTER StatExitTprBelowThreshold;
Note:
See TracChangeset
for help on using the changeset viewer.