Changeset 45870 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 2, 2013 9:35:03 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r45865 r45870 145 145 #define HMVMX_INSTR_ERROR_MAX 28 146 146 147 /** Profiling macro. */ 148 #ifdef HM_PROFILE_EXIT_DISPATCH 149 # define HMVMX_START_EXIT_DISPATCH_PROF() STAM_PROFILE_ADV_START(&pVCpu->hm.s.StatExitDispatch, ed) 150 # define HMVMX_STOP_EXIT_DISPATCH_PROF() STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExitDispatch, ed) 151 #else 152 # define HMVMX_START_EXIT_DISPATCH_PROF() do { } while (0) 153 # define HMVMX_STOP_EXIT_DISPATCH_PROF() do { } while (0) 154 #endif 155 147 156 148 157 /******************************************************************************* … … 248 257 #ifndef HMVMX_USE_FUNCTION_TABLE 249 258 DECLINLINE(int) hmR0VmxHandleExit(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient, uint32_t rcReason); 259 #define HMVMX_EXIT_DECL static int 260 #else 261 #define HMVMX_EXIT_DECL static DECLCALLBACK(int) 250 262 #endif 251 263 252 static DECLCALLBACK(int)hmR0VmxExitXcptNmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);253 static DECLCALLBACK(int)hmR0VmxExitExtInt(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);254 static DECLCALLBACK(int)hmR0VmxExitTripleFault(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);255 static DECLCALLBACK(int)hmR0VmxExitInitSignal(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);256 static DECLCALLBACK(int)hmR0VmxExitSipi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);257 static DECLCALLBACK(int)hmR0VmxExitIoSmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);258 static DECLCALLBACK(int)hmR0VmxExitSmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);259 static DECLCALLBACK(int)hmR0VmxExitIntWindow(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);260 static DECLCALLBACK(int)hmR0VmxExitNmiWindow(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);261 static DECLCALLBACK(int)hmR0VmxExitTaskSwitch(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);262 static DECLCALLBACK(int)hmR0VmxExitCpuid(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);263 static DECLCALLBACK(int)hmR0VmxExitGetsec(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);264 static DECLCALLBACK(int)hmR0VmxExitHlt(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);265 static DECLCALLBACK(int)hmR0VmxExitInvd(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);266 static DECLCALLBACK(int)hmR0VmxExitInvlpg(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);267 static DECLCALLBACK(int)hmR0VmxExitRdpmc(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);268 static DECLCALLBACK(int)hmR0VmxExitRdtsc(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);269 static DECLCALLBACK(int)hmR0VmxExitRsm(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);270 static DECLCALLBACK(int)hmR0VmxExitSetPendingXcptUD(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);271 static DECLCALLBACK(int)hmR0VmxExitMovCRx(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);272 static DECLCALLBACK(int)hmR0VmxExitMovDRx(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);273 static DECLCALLBACK(int)hmR0VmxExitIoInstr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);274 static DECLCALLBACK(int)hmR0VmxExitRdmsr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);275 static DECLCALLBACK(int)hmR0VmxExitWrmsr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);276 static DECLCALLBACK(int)hmR0VmxExitErrInvalidGuestState(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);277 static DECLCALLBACK(int)hmR0VmxExitErrMsrLoad(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);278 static DECLCALLBACK(int)hmR0VmxExitErrUndefined(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);279 static DECLCALLBACK(int)hmR0VmxExitMwait(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);280 static DECLCALLBACK(int)hmR0VmxExitMtf(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);281 static DECLCALLBACK(int)hmR0VmxExitMonitor(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);282 static DECLCALLBACK(int)hmR0VmxExitPause(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);283 static DECLCALLBACK(int)hmR0VmxExitErrMachineCheck(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);284 static DECLCALLBACK(int)hmR0VmxExitTprBelowThreshold(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);285 static DECLCALLBACK(int)hmR0VmxExitApicAccess(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);286 static DECLCALLBACK(int)hmR0VmxExitXdtrAccess(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);287 static DECLCALLBACK(int)hmR0VmxExitXdtrAccess(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);288 static DECLCALLBACK(int)hmR0VmxExitEptViolation(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);289 static DECLCALLBACK(int)hmR0VmxExitEptMisconfig(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);290 static DECLCALLBACK(int)hmR0VmxExitRdtscp(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);291 static DECLCALLBACK(int)hmR0VmxExitPreemptTimer(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);292 static DECLCALLBACK(int)hmR0VmxExitWbinvd(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);293 static DECLCALLBACK(int)hmR0VmxExitXsetbv(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);294 static DECLCALLBACK(int)hmR0VmxExitRdrand(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);295 static DECLCALLBACK(int)hmR0VmxExitInvpcid(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient);296 297 static int 298 static int 299 static int 300 static int 301 static int 302 static int 303 static int 264 HMVMX_EXIT_DECL hmR0VmxExitXcptNmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 265 HMVMX_EXIT_DECL hmR0VmxExitExtInt(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 266 HMVMX_EXIT_DECL hmR0VmxExitTripleFault(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 267 HMVMX_EXIT_DECL hmR0VmxExitInitSignal(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 268 HMVMX_EXIT_DECL hmR0VmxExitSipi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 269 HMVMX_EXIT_DECL hmR0VmxExitIoSmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 270 HMVMX_EXIT_DECL hmR0VmxExitSmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 271 HMVMX_EXIT_DECL hmR0VmxExitIntWindow(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 272 HMVMX_EXIT_DECL hmR0VmxExitNmiWindow(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 273 HMVMX_EXIT_DECL hmR0VmxExitTaskSwitch(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 274 HMVMX_EXIT_DECL hmR0VmxExitCpuid(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 275 HMVMX_EXIT_DECL hmR0VmxExitGetsec(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 276 HMVMX_EXIT_DECL hmR0VmxExitHlt(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 277 HMVMX_EXIT_DECL hmR0VmxExitInvd(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 278 HMVMX_EXIT_DECL hmR0VmxExitInvlpg(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 279 HMVMX_EXIT_DECL hmR0VmxExitRdpmc(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 280 HMVMX_EXIT_DECL hmR0VmxExitRdtsc(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 281 HMVMX_EXIT_DECL hmR0VmxExitRsm(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 282 HMVMX_EXIT_DECL hmR0VmxExitSetPendingXcptUD(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 283 HMVMX_EXIT_DECL hmR0VmxExitMovCRx(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 284 HMVMX_EXIT_DECL hmR0VmxExitMovDRx(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 285 HMVMX_EXIT_DECL hmR0VmxExitIoInstr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 286 HMVMX_EXIT_DECL hmR0VmxExitRdmsr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 287 HMVMX_EXIT_DECL hmR0VmxExitWrmsr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 288 HMVMX_EXIT_DECL hmR0VmxExitErrInvalidGuestState(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 289 HMVMX_EXIT_DECL hmR0VmxExitErrMsrLoad(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 290 HMVMX_EXIT_DECL hmR0VmxExitErrUndefined(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 291 HMVMX_EXIT_DECL hmR0VmxExitMwait(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 292 HMVMX_EXIT_DECL hmR0VmxExitMtf(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 293 HMVMX_EXIT_DECL hmR0VmxExitMonitor(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 294 HMVMX_EXIT_DECL hmR0VmxExitPause(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 295 HMVMX_EXIT_DECL hmR0VmxExitErrMachineCheck(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 296 HMVMX_EXIT_DECL hmR0VmxExitTprBelowThreshold(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 297 HMVMX_EXIT_DECL hmR0VmxExitApicAccess(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 298 HMVMX_EXIT_DECL hmR0VmxExitXdtrAccess(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 299 HMVMX_EXIT_DECL hmR0VmxExitXdtrAccess(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 300 HMVMX_EXIT_DECL hmR0VmxExitEptViolation(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 301 HMVMX_EXIT_DECL hmR0VmxExitEptMisconfig(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 302 HMVMX_EXIT_DECL hmR0VmxExitRdtscp(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 303 HMVMX_EXIT_DECL hmR0VmxExitPreemptTimer(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 304 HMVMX_EXIT_DECL hmR0VmxExitWbinvd(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 305 HMVMX_EXIT_DECL hmR0VmxExitXsetbv(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 306 HMVMX_EXIT_DECL hmR0VmxExitRdrand(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 307 HMVMX_EXIT_DECL hmR0VmxExitInvpcid(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 308 309 static int hmR0VmxExitXcptNM(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 310 static int hmR0VmxExitXcptPF(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 311 static int hmR0VmxExitXcptMF(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 312 static int hmR0VmxExitXcptDB(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 313 static int hmR0VmxExitXcptBP(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 314 static int hmR0VmxExitXcptGP(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 315 static int hmR0VmxExitXcptGeneric(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient); 304 316 305 317 … … 1846 1858 1847 1859 /* Setup debug controls */ 1848 rc |= VMXWriteVmcs64(VMX_VMCS64_GUEST_DEBUGCTL_FULL, 0); /** @todo think about this.*/1860 rc |= VMXWriteVmcs64(VMX_VMCS64_GUEST_DEBUGCTL_FULL, 0); /** @todo We don't support IA32_DEBUGCTL MSR. Should we? */ 1849 1861 rc |= VMXWriteVmcs32(VMX_VMCS_GUEST_PENDING_DEBUG_EXCEPTIONS, 0); 1850 1862 AssertRCReturn(rc, rc); … … 6741 6753 6742 6754 /* Handle the VM-exit. */ 6755 AssertMsg(VmxTransient.uExitReason <= VMX_EXIT_MAX, ("%#x\n", VmxTransient.uExitReason)); 6743 6756 STAM_COUNTER_INC(&pVCpu->hm.s.paStatExitReasonR0[VmxTransient.uExitReason & MASK_EXITREASON_STAT]); 6744 6757 STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatExit1, &pVCpu->hm.s.StatExit2, x); 6745 AssertMsg(VmxTransient.uExitReason <= VMX_EXIT_MAX, ("%#x\n", VmxTransient.uExitReason)); 6746 #ifdef HM_PROFILE_EXIT_DISPATCH 6747 STAM_PROFILE_ADV_START(&pVCpu->hm.s.StatExitDispatch, ed); 6748 #endif 6758 HMVMX_START_EXIT_DISPATCH_PROF(); 6749 6759 #ifdef HMVMX_USE_FUNCTION_TABLE 6750 6760 rc = g_apfnVMExitHandlers[VmxTransient.uExitReason](pVCpu, pCtx, &VmxTransient); … … 6846 6856 #endif 6847 6857 6848 6849 /** Profiling macro. */6850 #ifdef HM_PROFILE_EXIT_DISPATCH6851 # define HMVMX_STOP_EXIT_DISPATCH_PROF() STAM_PROFILE_ADV_START(&pVCpu->hm.s.StatExitDispatch, ed)6852 #else6853 # define HMVMX_STOP_EXIT_DISPATCH_PROF() do { } while (0)6854 #endif6855 6856 6857 6858 #ifdef DEBUG 6858 6859 /* Is there some generic IPRT define for this that are not in Runtime/internal/\* ?? */ … … 6880 6881 if (VMMR0IsLogFlushDisabled(pVCpu)) \ 6881 6882 VMX_ASSERT_PREEMPT_CPUID(); \ 6882 HMVMX_STOP_EXIT_DISPATCH_PROF(); \6883 HMVMX_STOP_EXIT_DISPATCH_PROF(); \ 6883 6884 } while (0) 6884 6885 # define VMX_VALIDATE_EXIT_XCPT_HANDLER_PARAMS() \ … … 6922 6923 * VM-exit handler for external interrupts (VMX_EXIT_EXT_INT). 6923 6924 */ 6924 static DECLCALLBACK(int)hmR0VmxExitExtInt(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)6925 HMVMX_EXIT_DECL hmR0VmxExitExtInt(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 6925 6926 { 6926 6927 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 6938 6939 * VM-exit handler for exceptions and NMIs (VMX_EXIT_XCPT_NMI). 6939 6940 */ 6940 static DECLCALLBACK(int)hmR0VmxExitXcptNmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)6941 HMVMX_EXIT_DECL hmR0VmxExitXcptNmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 6941 6942 { 6942 6943 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7043 7044 * VM-exit handler for interrupt-window exiting (VMX_EXIT_INT_WINDOW). 7044 7045 */ 7045 static DECLCALLBACK(int)hmR0VmxExitIntWindow(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7046 HMVMX_EXIT_DECL hmR0VmxExitIntWindow(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7046 7047 { 7047 7048 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7062 7063 * VM-exit handler for NMI-window exiting (VMX_EXIT_NMI_WINDOW). 7063 7064 */ 7064 static DECLCALLBACK(int)hmR0VmxExitNmiWindow(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7065 HMVMX_EXIT_DECL hmR0VmxExitNmiWindow(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7065 7066 { 7066 7067 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7073 7074 * VM-exit handler for WBINVD (VMX_EXIT_WBINVD). Conditional VM-exit. 7074 7075 */ 7075 static DECLCALLBACK(int)hmR0VmxExitWbinvd(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7076 HMVMX_EXIT_DECL hmR0VmxExitWbinvd(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7076 7077 { 7077 7078 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7084 7085 * VM-exit handler for INVD (VMX_EXIT_INVD). Unconditional VM-exit. 7085 7086 */ 7086 static DECLCALLBACK(int)hmR0VmxExitInvd(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7087 HMVMX_EXIT_DECL hmR0VmxExitInvd(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7087 7088 { 7088 7089 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7095 7096 * VM-exit handler for CPUID (VMX_EXIT_CPUID). Unconditional VM-exit. 7096 7097 */ 7097 static DECLCALLBACK(int)hmR0VmxExitCpuid(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7098 HMVMX_EXIT_DECL hmR0VmxExitCpuid(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7098 7099 { 7099 7100 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7118 7119 * VM-exit handler for GETSEC (VMX_EXIT_GETSEC). Unconditional VM-exit. 7119 7120 */ 7120 static DECLCALLBACK(int)hmR0VmxExitGetsec(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7121 HMVMX_EXIT_DECL hmR0VmxExitGetsec(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7121 7122 { 7122 7123 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7135 7136 * VM-exit handler for RDTSC (VMX_EXIT_RDTSC). Conditional VM-exit. 7136 7137 */ 7137 static DECLCALLBACK(int)hmR0VmxExitRdtsc(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7138 HMVMX_EXIT_DECL hmR0VmxExitRdtsc(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7138 7139 { 7139 7140 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7164 7165 * VM-exit handler for RDTSCP (VMX_EXIT_RDTSCP). Conditional VM-exit. 7165 7166 */ 7166 static DECLCALLBACK(int)hmR0VmxExitRdtscp(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7167 HMVMX_EXIT_DECL hmR0VmxExitRdtscp(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7167 7168 { 7168 7169 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7194 7195 * VM-exit handler for RDPMC (VMX_EXIT_RDPMC). Conditional VM-exit. 7195 7196 */ 7196 static DECLCALLBACK(int)hmR0VmxExitRdpmc(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7197 HMVMX_EXIT_DECL hmR0VmxExitRdpmc(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7197 7198 { 7198 7199 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7221 7222 * VM-exit handler for INVLPG (VMX_EXIT_INVLPG). Conditional VM-exit. 7222 7223 */ 7223 static DECLCALLBACK(int)hmR0VmxExitInvlpg(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7224 HMVMX_EXIT_DECL hmR0VmxExitInvlpg(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7224 7225 { 7225 7226 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7248 7249 * VM-exit handler for MONITOR (VMX_EXIT_MONITOR). Conditional VM-exit. 7249 7250 */ 7250 static DECLCALLBACK(int)hmR0VmxExitMonitor(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7251 HMVMX_EXIT_DECL hmR0VmxExitMonitor(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7251 7252 { 7252 7253 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7273 7274 * VM-exit handler for MWAIT (VMX_EXIT_MWAIT). Conditional VM-exit. 7274 7275 */ 7275 static DECLCALLBACK(int)hmR0VmxExitMwait(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7276 HMVMX_EXIT_DECL hmR0VmxExitMwait(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7276 7277 { 7277 7278 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7311 7312 * VM-exit handler for RSM (VMX_EXIT_RSM). Unconditional VM-exit. 7312 7313 */ 7313 static DECLCALLBACK(int)hmR0VmxExitRsm(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7314 HMVMX_EXIT_DECL hmR0VmxExitRsm(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7314 7315 { 7315 7316 /* … … 7327 7328 * VM-exit handler for SMI (VMX_EXIT_SMI). Unconditional VM-exit. 7328 7329 */ 7329 static DECLCALLBACK(int)hmR0VmxExitSmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7330 HMVMX_EXIT_DECL hmR0VmxExitSmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7330 7331 { 7331 7332 /* … … 7342 7343 * VM-exit handler for IO SMI (VMX_EXIT_IO_SMI). Unconditional VM-exit. 7343 7344 */ 7344 static DECLCALLBACK(int)hmR0VmxExitIoSmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7345 HMVMX_EXIT_DECL hmR0VmxExitIoSmi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7345 7346 { 7346 7347 /* Same treatment as VMX_EXIT_SMI. See comment in hmR0VmxExitSmi(). */ … … 7353 7354 * VM-exit handler for SIPI (VMX_EXIT_SIPI). Conditional VM-exit. 7354 7355 */ 7355 static DECLCALLBACK(int)hmR0VmxExitSipi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7356 HMVMX_EXIT_DECL hmR0VmxExitSipi(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7356 7357 { 7357 7358 /* … … 7369 7370 * VM-exit. 7370 7371 */ 7371 static DECLCALLBACK(int)hmR0VmxExitInitSignal(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7372 HMVMX_EXIT_DECL hmR0VmxExitInitSignal(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7372 7373 { 7373 7374 /* … … 7385 7386 * VM-exit. 7386 7387 */ 7387 static DECLCALLBACK(int)hmR0VmxExitTripleFault(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7388 HMVMX_EXIT_DECL hmR0VmxExitTripleFault(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7388 7389 { 7389 7390 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7395 7396 * VM-exit handler for HLT (VMX_EXIT_HLT). Conditional VM-exit. 7396 7397 */ 7397 static DECLCALLBACK(int)hmR0VmxExitHlt(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7398 HMVMX_EXIT_DECL hmR0VmxExitHlt(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7398 7399 { 7399 7400 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7418 7419 * VM-exit handler for instructions that result in a #UD exception delivered to the guest. 7419 7420 */ 7420 static DECLCALLBACK(int)hmR0VmxExitSetPendingXcptUD(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7421 HMVMX_EXIT_DECL hmR0VmxExitSetPendingXcptUD(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7421 7422 { 7422 7423 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7429 7430 * VM-exit handler for expiry of the VMX preemption timer. 7430 7431 */ 7431 static DECLCALLBACK(int)hmR0VmxExitPreemptTimer(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7432 HMVMX_EXIT_DECL hmR0VmxExitPreemptTimer(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7432 7433 { 7433 7434 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7447 7448 * VM-exit handler for XSETBV (VMX_EXIT_XSETBV). Unconditional VM-exit. 7448 7449 */ 7449 static DECLCALLBACK(int)hmR0VmxExitXsetbv(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7450 HMVMX_EXIT_DECL hmR0VmxExitXsetbv(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7450 7451 { 7451 7452 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7459 7460 * VM-exit handler for INVPCID (VMX_EXIT_INVPCID). Conditional VM-exit. 7460 7461 */ 7461 static DECLCALLBACK(int)hmR0VmxExitInvpcid(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7462 HMVMX_EXIT_DECL hmR0VmxExitInvpcid(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7462 7463 { 7463 7464 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7472 7473 * Error VM-exit. 7473 7474 */ 7474 static DECLCALLBACK(int)hmR0VmxExitErrInvalidGuestState(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7475 HMVMX_EXIT_DECL hmR0VmxExitErrInvalidGuestState(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7475 7476 { 7476 7477 uint32_t uIntrState; … … 7515 7516 * (VMX_EXIT_ERR_MSR_LOAD). Error VM-exit. 7516 7517 */ 7517 static DECLCALLBACK(int)hmR0VmxExitErrMsrLoad(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7518 HMVMX_EXIT_DECL hmR0VmxExitErrMsrLoad(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7518 7519 { 7519 7520 AssertMsgFailed(("Unexpected MSR-load exit. pVCpu=%p pMixedCtx=%p\n", pVCpu, pMixedCtx)); … … 7526 7527 * (VMX_EXIT_ERR_MACHINE_CHECK). Error VM-exit. 7527 7528 */ 7528 static DECLCALLBACK(int)hmR0VmxExitErrMachineCheck(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7529 HMVMX_EXIT_DECL hmR0VmxExitErrMachineCheck(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7529 7530 { 7530 7531 AssertMsgFailed(("Unexpected machine-check event exit. pVCpu=%p pMixedCtx=%p\n", pVCpu, pMixedCtx)); … … 7537 7538 * theory. 7538 7539 */ 7539 static DECLCALLBACK(int)hmR0VmxExitErrUndefined(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7540 HMVMX_EXIT_DECL hmR0VmxExitErrUndefined(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7540 7541 { 7541 7542 AssertMsgFailed(("Huh!? Undefined VM-exit reason %d. pVCpu=%p pMixedCtx=%p\n", pVmxTransient->uExitReason, pVCpu, pMixedCtx)); … … 7549 7550 * Conditional VM-exit. 7550 7551 */ 7551 static DECLCALLBACK(int)hmR0VmxExitXdtrAccess(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7552 HMVMX_EXIT_DECL hmR0VmxExitXdtrAccess(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7552 7553 { 7553 7554 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7564 7565 * VM-exit handler for RDRAND (VMX_EXIT_RDRAND). Conditional VM-exit. 7565 7566 */ 7566 static DECLCALLBACK(int)hmR0VmxExitRdrand(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7567 HMVMX_EXIT_DECL hmR0VmxExitRdrand(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7567 7568 { 7568 7569 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7579 7580 * VM-exit handler for RDMSR (VMX_EXIT_RDMSR). 7580 7581 */ 7581 static DECLCALLBACK(int)hmR0VmxExitRdmsr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7582 HMVMX_EXIT_DECL hmR0VmxExitRdmsr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7582 7583 { 7583 7584 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7606 7607 * VM-exit handler for WRMSR (VMX_EXIT_WRMSR). 7607 7608 */ 7608 static DECLCALLBACK(int)hmR0VmxExitWrmsr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7609 HMVMX_EXIT_DECL hmR0VmxExitWrmsr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7609 7610 { 7610 7611 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7710 7711 * VM-exit handler for PAUSE (VMX_EXIT_PAUSE). Conditional VM-exit. 7711 7712 */ 7712 static DECLCALLBACK(int)hmR0VmxExitPause(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7713 HMVMX_EXIT_DECL hmR0VmxExitPause(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7713 7714 { 7714 7715 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7726 7727 * threshold (VMX_EXIT_TPR_BELOW_THRESHOLD). Conditional VM-exit. 7727 7728 */ 7728 static DECLCALLBACK(int)hmR0VmxExitTprBelowThreshold(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7729 HMVMX_EXIT_DECL hmR0VmxExitTprBelowThreshold(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7729 7730 { 7730 7731 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7752 7753 * recompiler. 7753 7754 */ 7754 static DECLCALLBACK(int)hmR0VmxExitMovCRx(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7755 HMVMX_EXIT_DECL hmR0VmxExitMovCRx(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7755 7756 { 7756 7757 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 7884 7885 * VM-exit. 7885 7886 */ 7886 static DECLCALLBACK(int)hmR0VmxExitIoInstr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)7887 HMVMX_EXIT_DECL hmR0VmxExitIoInstr(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7887 7888 { 7888 7889 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 8056 8057 * VM-exit. 8057 8058 */ 8058 static DECLCALLBACK(int)hmR0VmxExitTaskSwitch(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)8059 HMVMX_EXIT_DECL hmR0VmxExitTaskSwitch(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 8059 8060 { 8060 8061 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 8107 8108 * VM-exit handler for monitor-trap-flag (VMX_EXIT_MTF). Conditional VM-exit. 8108 8109 */ 8109 static DECLCALLBACK(int)hmR0VmxExitMtf(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)8110 HMVMX_EXIT_DECL hmR0VmxExitMtf(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 8110 8111 { 8111 8112 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 8122 8123 * VM-exit handler for APIC access (VMX_EXIT_APIC_ACCESS). Conditional VM-exit. 8123 8124 */ 8124 static DECLCALLBACK(int)hmR0VmxExitApicAccess(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)8125 HMVMX_EXIT_DECL hmR0VmxExitApicAccess(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 8125 8126 { 8126 8127 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 8197 8198 * VM-exit. 8198 8199 */ 8199 static DECLCALLBACK(int)hmR0VmxExitMovDRx(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)8200 HMVMX_EXIT_DECL hmR0VmxExitMovDRx(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 8200 8201 { 8201 8202 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 8275 8276 * Conditional VM-exit. 8276 8277 */ 8277 static DECLCALLBACK(int)hmR0VmxExitEptMisconfig(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)8278 HMVMX_EXIT_DECL hmR0VmxExitEptMisconfig(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 8278 8279 { 8279 8280 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); … … 8327 8328 * VM-exit. 8328 8329 */ 8329 static DECLCALLBACK(int)hmR0VmxExitEptViolation(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)8330 HMVMX_EXIT_DECL hmR0VmxExitEptViolation(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 8330 8331 { 8331 8332 VMX_VALIDATE_EXIT_HANDLER_PARAMS();
Note:
See TracChangeset
for help on using the changeset viewer.