VirtualBox

Changeset 52042 in vbox for trunk/src


Ignore:
Timestamp:
Jul 16, 2014 4:31:48 AM (11 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Improve SMP logging a bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r52041 r52042  
    32993299        {
    33003300            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));
    33023302        }
    33033303        else
     
    33093309        {
    33103310            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));
    33123312        }
    33133313
     
    33743374        {
    33753375            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));
    33773377        }
    33783378        else
     
    33833383            /* The switcher returns to long mode, EFER is managed by the switcher. */
    33843384            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));
    33863386        }
    33873387        else
     
    33953395            val |=   VMX_VMCS_CTRL_EXIT_SAVE_GUEST_EFER_MSR
    33963396                   | 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));
    33983398        }
    33993399
     
    35803580
    35813581        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)));
    35833584    }
    35843585    return rc;
     
    36063607
    36073608        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));
    36093610    }
    36103611    return rc;
     
    36523653
    36533654        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));
    36553656    }
    36563657    return rc;
     
    37103711        rc  = VMXWriteVmcs32(VMX_VMCS_CTRL_CR0_READ_SHADOW, u32GuestCR0);
    37113712        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));
    37133714
    37143715        /* Setup VT-x's view of the guest CR0. */
     
    38243825        rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_EXCEPTION_BITMAP, pVCpu->hm.s.vmx.u32XcptBitmap);
    38253826        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));
    38273829
    38283830        /*
     
    38613863        rc = VMXWriteVmcs32(VMX_VMCS_CTRL_CR0_MASK, u32CR0Mask);
    38623864        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));
    38643866
    38653867        HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_CR0);
     
    39183920            rc = VMXWriteVmcs64(VMX_VMCS64_CTRL_EPTP_FULL, pVCpu->hm.s.vmx.HCPhysEPTP);
    39193921            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));
    39213923
    39223924            if (   pVM->hm.s.vmx.fUnrestrictedGuest
     
    39553957            }
    39563958
    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));
    39583960            rc = VMXWriteVmcsGstN(VMX_VMCS_GUEST_CR3, GCPhysGuestCR3);
    39593961        }
     
    39633965            RTHCPHYS HCPhysGuestCR3 = PGMGetHyperCR3(pVCpu);
    39643966
    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));
    39663968            rc = VMXWriteVmcsHstN(VMX_VMCS_GUEST_CR3, HCPhysGuestCR3);
    39673969        }
     
    39823984        rc = VMXWriteVmcs32(VMX_VMCS_CTRL_CR4_READ_SHADOW, u32GuestCR4);
    39833985        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));
    39853987
    39863988        /* Setup VT-x's view of the guest CR4. */
     
    40504052
    40514053        /* 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));
    40534055        rc = VMXWriteVmcs32(VMX_VMCS_GUEST_CR4, u32GuestCR4);
    40544056        AssertRCReturn(rc, rc);
     
    45144516                   in real-mode (e.g. OpenBSD 4.0) */
    45154517                REMFlushTBs(pVM);
    4516                 Log4(("Load: Switch to protected mode detected!\n"));
     4518                Log4(("Load[%RU32]: Switch to protected mode detected!\n", pVCpu->idCpu));
    45174519                pVCpu->hm.s.vmx.fWasInRealMode = false;
    45184520            }
     
    45444546
    45454547        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));
    45484550    }
    45494551
     
    46114613
    46124614        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));
    46144616    }
    46154617
     
    46264628
    46274629        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));
    46294631    }
    46304632
     
    46624664
    46634665        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));
    46654667    }
    46664668
     
    46774679
    46784680        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));
    46804682    }
    46814683
     
    47254727            PVMXAUTOMSR pMsr = (PVMXAUTOMSR)pVCpu->hm.s.vmx.pvGuestMsr;
    47264728            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            }
    47284733# endif
    47294734        }
     
    47674772                int rc = VMXWriteVmcs64(VMX_VMCS64_GUEST_EFER_FULL, pMixedCtx->msrEFER);
    47684773                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));
    47704775            }
    47714776            else
     
    47744779                /* We need to intercept reads too, see @bugref{7386} comment #16. */
    47754780                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                       pVCpu->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));
    47784783            }
    47794784        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette