Changeset 78932 in vbox
- Timestamp:
- Jun 3, 2019 11:43:29 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r78928 r78932 447 447 static FNVMXEXITHANDLERNSRC hmR0VmxExitTprBelowThresholdNested; 448 448 static FNVMXEXITHANDLER hmR0VmxExitApicAccessNested; 449 static FNVMXEXITHANDLER hmR0VmxExitXdtrAccessNested;450 449 //static FNVMXEXITHANDLER hmR0VmxExitEptViolation; 451 450 //static FNVMXEXITHANDLER hmR0VmxExitEptMisconfig; … … 12636 12635 12637 12636 /* 12638 * Instructions that cause VM-exits unconditionally. 12637 * Instructions that cause VM-exits unconditionally or the condition is 12638 * always is taken solely from the guest hypervisor (meaning if the VM-exit 12639 * happens, it's guaranteed to be a nested-guest VM-exit). 12640 * 12639 12641 * - Provides VM-exit instruction length ONLY. 12640 12642 */ 12641 case VMX_EXIT_CPUID: 12643 case VMX_EXIT_CPUID: /* Unconditional. */ 12642 12644 case VMX_EXIT_VMCALL: 12643 12645 case VMX_EXIT_GETSEC: … … 12647 12649 case VMX_EXIT_VMRESUME: 12648 12650 case VMX_EXIT_VMXOFF: 12651 case VMX_EXIT_ENCLS: /* Condition specified solely by guest hypervisor. */ 12652 case VMX_EXIT_VMFUNC: 12649 12653 return hmR0VmxExitInstrNested(pVCpu, pVmxTransient); 12650 12654 12651 12655 /* 12652 * Instructions that cause VM-exits unconditionally. 12656 * Instructions that cause VM-exits unconditionally or the condition is 12657 * always is taken solely from the guest hypervisor (meaning if the VM-exit 12658 * happens, it's guaranteed to be a nested-guest VM-exit). 12659 * 12653 12660 * - Provides VM-exit instruction length. 12654 12661 * - Provides VM-exit information. … … 12661 12668 * See Intel spec. 27.2.1 "Basic VM-Exit Information". 12662 12669 */ 12663 case VMX_EXIT_INVEPT: 12670 case VMX_EXIT_INVEPT: /* Unconditional. */ 12664 12671 case VMX_EXIT_INVVPID: 12665 12672 case VMX_EXIT_VMCLEAR: … … 12667 12674 case VMX_EXIT_VMPTRST: 12668 12675 case VMX_EXIT_VMXON: 12676 case VMX_EXIT_GDTR_IDTR_ACCESS: /* Condition specified solely by guest hypervisor. */ 12677 case VMX_EXIT_LDTR_TR_ACCESS: 12678 case VMX_EXIT_RDRAND: 12679 case VMX_EXIT_RDSEED: 12680 case VMX_EXIT_XSAVES: 12681 case VMX_EXIT_XRSTORS: 12682 case VMX_EXIT_UMWAIT: 12683 case VMX_EXIT_TPAUSE: 12669 12684 return hmR0VmxExitInstrWithInfoNested(pVCpu, pVmxTransient); 12670 12685 … … 12695 12710 case VMX_EXIT_RDPMC: return hmR0VmxExitRdpmcNested(pVCpu, pVmxTransient); 12696 12711 12697 case VMX_EXIT_GDTR_IDTR_ACCESS:12698 case VMX_EXIT_LDTR_TR_ACCESS: return hmR0VmxExitXdtrAccessNested(pVCpu, pVmxTransient);12699 12712 12700 12713 case VMX_EXIT_VMREAD: … … 12719 12732 case VMX_EXIT_VIRTUALIZED_EOI: 12720 12733 case VMX_EXIT_APIC_WRITE: 12721 case VMX_EXIT_RDRAND:12722 12734 case VMX_EXIT_RSM: 12723 case VMX_EXIT_VMFUNC:12724 case VMX_EXIT_ENCLS:12725 case VMX_EXIT_RDSEED:12726 case VMX_EXIT_XSAVES:12727 case VMX_EXIT_XRSTORS:12728 case VMX_EXIT_UMWAIT:12729 case VMX_EXIT_TPAUSE:12730 12735 default: 12731 12736 { … … 16400 16405 16401 16406 /** 16402 * Nested-guest VM-exit handler for XDTR (LGDT, SGDT, LIDT, SIDT) accesses16403 * (VMX_EXIT_GDTR_IDTR_ACCESS) and LDT and TR access (LLDT, LTR, SLDT, STR).16404 * Conditional VM-exit.16405 */16406 HMVMX_EXIT_DECL hmR0VmxExitXdtrAccessNested(PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient)16407 {16408 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient);16409 16410 Assert(CPUMIsGuestVmxProcCtls2Set(pVCpu, &pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_DESC_TABLE_EXIT));16411 int rc = hmR0VmxReadExitQualVmcs(pVCpu, pVmxTransient);16412 rc |= hmR0VmxReadExitInstrLenVmcs(pVmxTransient);16413 rc |= hmR0VmxReadExitInstrInfoVmcs(pVmxTransient);16414 AssertRCReturn(rc, rc);16415 16416 VMXVEXITINFO ExitInfo;16417 RT_ZERO(ExitInfo);16418 ExitInfo.cbInstr = pVmxTransient->cbInstr;16419 ExitInfo.u64Qual = pVmxTransient->uExitQual;16420 ExitInfo.InstrInfo = pVmxTransient->ExitInstrInfo;16421 return IEMExecVmxVmexitInstrWithInfo(pVCpu, &ExitInfo);16422 }16423 16424 16425 /**16426 16407 * Nested-guest VM-exit handler for RDTSCP (VMX_EXIT_RDTSCP). Conditional VM-exit. 16427 16408 */ … … 16495 16476 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16496 16477 16478 #ifdef VBOX_STRICT 16479 PCCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 16480 switch (pVmxTransient->uExitReason) 16481 { 16482 case VMX_EXIT_ENCLS: 16483 Assert(CPUMIsGuestVmxProcCtls2Set(pVCpu, pCtx, VMX_PROC_CTLS2_ENCLS_EXIT)); 16484 break; 16485 16486 case VMX_EXIT_VMFUNC: 16487 Assert(CPUMIsGuestVmxProcCtls2Set(pVCpu, pCtx, VMX_PROC_CTLS2_VMFUNC)); 16488 break; 16489 } 16490 #endif 16491 16497 16492 int rc = hmR0VmxReadExitInstrLenVmcs(pVmxTransient); 16498 16493 AssertRCReturn(rc, rc); … … 16502 16497 16503 16498 /** 16504 * Nested-guest VM-exit handler for instructions that cause VM-exits uncondtionally16505 * but provide instruction length aswell as more information.16499 * Nested-guest VM-exit handler for instructions that provide instruction length as 16500 * well as more information. 16506 16501 * 16507 16502 * Unconditional VM-exit. … … 16510 16505 { 16511 16506 HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient); 16507 16508 #ifdef VBOX_STRICT 16509 PCCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 16510 switch (pVmxTransient->uExitReason) 16511 { 16512 case VMX_EXIT_GDTR_IDTR_ACCESS: 16513 case VMX_EXIT_LDTR_TR_ACCESS: 16514 Assert(CPUMIsGuestVmxProcCtls2Set(pVCpu, pCtx, VMX_PROC_CTLS2_DESC_TABLE_EXIT)); 16515 break; 16516 16517 case VMX_EXIT_RDRAND: 16518 Assert(CPUMIsGuestVmxProcCtls2Set(pVCpu, pCtx, VMX_PROC_CTLS2_RDRAND_EXIT)); 16519 break; 16520 16521 case VMX_EXIT_RDSEED: 16522 Assert(CPUMIsGuestVmxProcCtls2Set(pVCpu, pCtx, VMX_PROC_CTLS2_RDSEED_EXIT)); 16523 break; 16524 16525 case VMX_EXIT_XSAVES: 16526 case VMX_EXIT_XRSTORS: 16527 /** @todo NSTVMX: Verify XSS-bitmap. */ 16528 Assert(CPUMIsGuestVmxProcCtls2Set(pVCpu, pCtx, VMX_PROC_CTLS2_XSAVES_XRSTORS)); 16529 break; 16530 16531 case VMX_EXIT_UMWAIT: 16532 case VMX_EXIT_TPAUSE: 16533 Assert(CPUMIsGuestVmxProcCtlsSet(pVCpu, pCtx, VMX_PROC_CTLS_RDTSC_EXIT)); 16534 Assert(CPUMIsGuestVmxProcCtls2Set(pVCpu, pCtx, VMX_PROC_CTLS2_USER_WAIT_PAUSE)); 16535 break; 16536 } 16537 #endif 16512 16538 16513 16539 int rc = hmR0VmxReadExitInstrLenVmcs(pVmxTransient);
Note:
See TracChangeset
for help on using the changeset viewer.