- Timestamp:
- Jul 16, 2014 4:31:48 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r52041 r52042 3299 3299 { 3300 3300 val |= VMX_VMCS_CTRL_ENTRY_IA32E_MODE_GUEST; 3301 Log4(("Load : VMX_VMCS_CTRL_ENTRY_IA32E_MODE_GUEST\n"));3301 Log4(("Load[%RU32]: VMX_VMCS_CTRL_ENTRY_IA32E_MODE_GUEST\n", pVCpu->idCpu)); 3302 3302 } 3303 3303 else … … 3309 3309 { 3310 3310 val |= VMX_VMCS_CTRL_ENTRY_LOAD_GUEST_EFER_MSR; 3311 Log4(("Load : VMX_VMCS_CTRL_ENTRY_LOAD_GUEST_EFER_MSR\n"));3311 Log4(("Load[%RU32]: VMX_VMCS_CTRL_ENTRY_LOAD_GUEST_EFER_MSR\n", pVCpu->idCpu)); 3312 3312 } 3313 3313 … … 3374 3374 { 3375 3375 val |= VMX_VMCS_CTRL_EXIT_HOST_ADDR_SPACE_SIZE; 3376 Log4(("Load : VMX_VMCS_CTRL_EXIT_HOST_ADDR_SPACE_SIZE\n"));3376 Log4(("Load[%RU32]: VMX_VMCS_CTRL_EXIT_HOST_ADDR_SPACE_SIZE\n", pVCpu->idCpu)); 3377 3377 } 3378 3378 else … … 3383 3383 /* The switcher returns to long mode, EFER is managed by the switcher. */ 3384 3384 val |= VMX_VMCS_CTRL_EXIT_HOST_ADDR_SPACE_SIZE; 3385 Log4(("Load : VMX_VMCS_CTRL_EXIT_HOST_ADDR_SPACE_SIZE\n"));3385 Log4(("Load[%RU32]: VMX_VMCS_CTRL_EXIT_HOST_ADDR_SPACE_SIZE\n", pVCpu->idCpu)); 3386 3386 } 3387 3387 else … … 3395 3395 val |= VMX_VMCS_CTRL_EXIT_SAVE_GUEST_EFER_MSR 3396 3396 | VMX_VMCS_CTRL_EXIT_LOAD_HOST_EFER_MSR; 3397 Log4(("Load : VMX_VMCS_CTRL_EXIT_SAVE_GUEST_EFER_MSR, VMX_VMCS_CTRL_EXIT_LOAD_HOST_EFER_MSR\n"));3397 Log4(("Load[%RU32]: VMX_VMCS_CTRL_EXIT_SAVE_GUEST_EFER_MSR, VMX_VMCS_CTRL_EXIT_LOAD_HOST_EFER_MSR\n", pVCpu->idCpu)); 3398 3398 } 3399 3399 … … 3580 3580 3581 3581 HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_RIP); 3582 Log4(("Load: VMX_VMCS_GUEST_RIP=%#RX64 fContextUseFlags=%#RX32\n", pMixedCtx->rip, HMCPU_CF_VALUE(pVCpu))); 3582 Log4(("Load[%RU32]: VMX_VMCS_GUEST_RIP=%#RX64 fContextUseFlags=%#RX32\n", pVCpu->idCpu, pMixedCtx->rip, 3583 HMCPU_CF_VALUE(pVCpu))); 3583 3584 } 3584 3585 return rc; … … 3606 3607 3607 3608 HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_RSP); 3608 Log4(("Load : VMX_VMCS_GUEST_RSP=%#RX64\n", pMixedCtx->rsp));3609 Log4(("Load[%RU32]: VMX_VMCS_GUEST_RSP=%#RX64\n", pVCpu->idCpu, pMixedCtx->rsp)); 3609 3610 } 3610 3611 return rc; … … 3652 3653 3653 3654 HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_RFLAGS); 3654 Log4(("Load : VMX_VMCS_GUEST_RFLAGS=%#RX32\n", Eflags.u32));3655 Log4(("Load[%RU32]: VMX_VMCS_GUEST_RFLAGS=%#RX32\n", pVCpu->idCpu, Eflags.u32)); 3655 3656 } 3656 3657 return rc; … … 3710 3711 rc = VMXWriteVmcs32(VMX_VMCS_CTRL_CR0_READ_SHADOW, u32GuestCR0); 3711 3712 AssertRCReturn(rc, rc); 3712 Log4(("Load : VMX_VMCS_CTRL_CR0_READ_SHADOW=%#RX32\n", u32GuestCR0));3713 Log4(("Load[%RU32]: VMX_VMCS_CTRL_CR0_READ_SHADOW=%#RX32\n", pVCpu->idCpu, u32GuestCR0)); 3713 3714 3714 3715 /* Setup VT-x's view of the guest CR0. */ … … 3824 3825 rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_EXCEPTION_BITMAP, pVCpu->hm.s.vmx.u32XcptBitmap); 3825 3826 AssertRCReturn(rc, rc); 3826 Log4(("Load: VMX_VMCS_GUEST_CR0=%#RX32 (uSetCR0=%#RX32 uZapCR0=%#RX32)\n", u32GuestCR0, uSetCR0, uZapCR0)); 3827 Log4(("Load[%RU32]: VMX_VMCS_GUEST_CR0=%#RX32 (uSetCR0=%#RX32 uZapCR0=%#RX32)\n", pVCpu->idCpu, u32GuestCR0, uSetCR0, 3828 uZapCR0)); 3827 3829 3828 3830 /* … … 3861 3863 rc = VMXWriteVmcs32(VMX_VMCS_CTRL_CR0_MASK, u32CR0Mask); 3862 3864 AssertRCReturn(rc, rc); 3863 Log4(("Load : VMX_VMCS_CTRL_CR0_MASK=%#RX32\n", u32CR0Mask));3865 Log4(("Load[%RU32]: VMX_VMCS_CTRL_CR0_MASK=%#RX32\n", pVCpu->idCpu, u32CR0Mask)); 3864 3866 3865 3867 HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_CR0); … … 3918 3920 rc = VMXWriteVmcs64(VMX_VMCS64_CTRL_EPTP_FULL, pVCpu->hm.s.vmx.HCPhysEPTP); 3919 3921 AssertRCReturn(rc, rc); 3920 Log4(("Load : VMX_VMCS64_CTRL_EPTP_FULL=%#RX64\n", pVCpu->hm.s.vmx.HCPhysEPTP));3922 Log4(("Load[%RU32]: VMX_VMCS64_CTRL_EPTP_FULL=%#RX64\n", pVCpu->idCpu, pVCpu->hm.s.vmx.HCPhysEPTP)); 3921 3923 3922 3924 if ( pVM->hm.s.vmx.fUnrestrictedGuest … … 3955 3957 } 3956 3958 3957 Log4(("Load : VMX_VMCS_GUEST_CR3=%#RGv (GstN)\n", GCPhysGuestCR3));3959 Log4(("Load[%RU32]: VMX_VMCS_GUEST_CR3=%#RGv (GstN)\n", pVCpu->idCpu, GCPhysGuestCR3)); 3958 3960 rc = VMXWriteVmcsGstN(VMX_VMCS_GUEST_CR3, GCPhysGuestCR3); 3959 3961 } … … 3963 3965 RTHCPHYS HCPhysGuestCR3 = PGMGetHyperCR3(pVCpu); 3964 3966 3965 Log4(("Load : VMX_VMCS_GUEST_CR3=%#RHv (HstN)\n", HCPhysGuestCR3));3967 Log4(("Load[%RU32]: VMX_VMCS_GUEST_CR3=%#RHv (HstN)\n", pVCpu->idCpu, HCPhysGuestCR3)); 3966 3968 rc = VMXWriteVmcsHstN(VMX_VMCS_GUEST_CR3, HCPhysGuestCR3); 3967 3969 } … … 3982 3984 rc = VMXWriteVmcs32(VMX_VMCS_CTRL_CR4_READ_SHADOW, u32GuestCR4); 3983 3985 AssertRCReturn(rc, rc); 3984 Log4(("Load : VMX_VMCS_CTRL_CR4_READ_SHADOW=%#RX32\n", u32GuestCR4));3986 Log4(("Load[%RU32]: VMX_VMCS_CTRL_CR4_READ_SHADOW=%#RX32\n", pVCpu->idCpu, u32GuestCR4)); 3985 3987 3986 3988 /* Setup VT-x's view of the guest CR4. */ … … 4050 4052 4051 4053 /* Write VT-x's view of the guest CR4 into the VMCS. */ 4052 Log4(("Load : VMX_VMCS_GUEST_CR4=%#RX32 (Set=%#RX32 Zap=%#RX32)\n", u32GuestCR4, uSetCR4, uZapCR4));4054 Log4(("Load[%RU32]: VMX_VMCS_GUEST_CR4=%#RX32 (Set=%#RX32 Zap=%#RX32)\n", pVCpu->idCpu, u32GuestCR4, uSetCR4, uZapCR4)); 4053 4055 rc = VMXWriteVmcs32(VMX_VMCS_GUEST_CR4, u32GuestCR4); 4054 4056 AssertRCReturn(rc, rc); … … 4514 4516 in real-mode (e.g. OpenBSD 4.0) */ 4515 4517 REMFlushTBs(pVM); 4516 Log4(("Load : Switch to protected mode detected!\n"));4518 Log4(("Load[%RU32]: Switch to protected mode detected!\n", pVCpu->idCpu)); 4517 4519 pVCpu->hm.s.vmx.fWasInRealMode = false; 4518 4520 } … … 4544 4546 4545 4547 HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_SEGMENT_REGS); 4546 Log4(("Load : CS=%#RX16 Base=%#RX64 Limit=%#RX32 Attr=%#RX32\n", pMixedCtx->cs.Sel, pMixedCtx->cs.u64Base,4547 pMixedCtx->cs.u32Limit, pMixedCtx->cs.Attr.u));4548 Log4(("Load[%RU32]: CS=%#RX16 Base=%#RX64 Limit=%#RX32 Attr=%#RX32\n", pVCpu->idCpu, pMixedCtx->cs.Sel, 4549 pMixedCtx->cs.u64Base, pMixedCtx->cs.u32Limit, pMixedCtx->cs.Attr.u)); 4548 4550 } 4549 4551 … … 4611 4613 4612 4614 HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_TR); 4613 Log4(("Load : VMX_VMCS_GUEST_TR_BASE=%#RX64\n", u64Base));4615 Log4(("Load[%RU32]: VMX_VMCS_GUEST_TR_BASE=%#RX64\n", pVCpu->idCpu, u64Base)); 4614 4616 } 4615 4617 … … 4626 4628 4627 4629 HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_GDTR); 4628 Log4(("Load : VMX_VMCS_GUEST_GDTR_BASE=%#RX64\n", pMixedCtx->gdtr.pGdt));4630 Log4(("Load[%RU32]: VMX_VMCS_GUEST_GDTR_BASE=%#RX64\n", pVCpu->idCpu, pMixedCtx->gdtr.pGdt)); 4629 4631 } 4630 4632 … … 4662 4664 4663 4665 HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_LDTR); 4664 Log4(("Load : VMX_VMCS_GUEST_LDTR_BASE=%#RX64\n", pMixedCtx->ldtr.u64Base));4666 Log4(("Load[%RU32]: VMX_VMCS_GUEST_LDTR_BASE=%#RX64\n", pVCpu->idCpu, pMixedCtx->ldtr.u64Base)); 4665 4667 } 4666 4668 … … 4677 4679 4678 4680 HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_IDTR); 4679 Log4(("Load : VMX_VMCS_GUEST_IDTR_BASE=%#RX64\n", pMixedCtx->idtr.pIdt));4681 Log4(("Load[%RU32]: VMX_VMCS_GUEST_IDTR_BASE=%#RX64\n", pVCpu->idCpu, pMixedCtx->idtr.pIdt)); 4680 4682 } 4681 4683 … … 4725 4727 PVMXAUTOMSR pMsr = (PVMXAUTOMSR)pVCpu->hm.s.vmx.pvGuestMsr; 4726 4728 for (uint32_t i = 0; i < pVCpu->hm.s.vmx.cMsrs; i++, pMsr++) 4727 Log4(("Load: MSR[%RU32]: u32Msr=%#RX32 u64Value=%#RX64\n", i, pMsr->u32Msr, pMsr->u64Value)); 4729 { 4730 Log4(("Load[%RU32]: MSR[%RU32]: u32Msr=%#RX32 u64Value=%#RX64\n", pVCpu->idCpu, i, pMsr->u32Msr, 4731 pMsr->u64Value)); 4732 } 4728 4733 # endif 4729 4734 } … … 4767 4772 int rc = VMXWriteVmcs64(VMX_VMCS64_GUEST_EFER_FULL, pMixedCtx->msrEFER); 4768 4773 AssertRCReturn(rc,rc); 4769 Log4(("Load : VMX_VMCS64_GUEST_EFER_FULL=%#RX64\n", pMixedCtx->msrEFER));4774 Log4(("Load[%RU32]: VMX_VMCS64_GUEST_EFER_FULL=%#RX64\n", pVCpu->idCpu, pMixedCtx->msrEFER)); 4770 4775 } 4771 4776 else … … 4774 4779 /* We need to intercept reads too, see @bugref{7386} comment #16. */ 4775 4780 hmR0VmxSetMsrPermission(pVCpu, MSR_K6_EFER, VMXMSREXIT_INTERCEPT_READ, VMXMSREXIT_INTERCEPT_WRITE); 4776 Log4(("Load : MSR[--]: u32Msr=%#RX32 u64Value=%#RX64 cMsrs=%u\n", MSR_K6_EFER, pMixedCtx->msrEFER,4777 p VCpu->hm.s.vmx.cMsrs));4781 Log4(("Load[%RU32]: MSR[--]: u32Msr=%#RX32 u64Value=%#RX64 cMsrs=%u\n", pVCpu->idCpu, MSR_K6_EFER, 4782 pMixedCtx->msrEFER, pVCpu->hm.s.vmx.cMsrs)); 4778 4783 } 4779 4784 }
Note:
See TracChangeset
for help on using the changeset viewer.