VirtualBox

Ignore:
Timestamp:
May 14, 2009 3:41:49 PM (16 years ago)
Author:
vboxsync
Message:

Need a separate ring 0 logger for each VCPU.

File:
1 edited

Legend:

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

    r19671 r19702  
    189189
    190190    /*
    191      * Register the EMT R0 logger instance.
     191     * Register the EMT R0 logger instance for VCPU 0.
    192192     */
    193     PVMMR0LOGGER pR0Logger = pVM->vmm.s.pR0LoggerR0;
     193    PVMCPU pVCpu = &pVM->aCpus[0];
     194
     195    PVMMR0LOGGER pR0Logger = pVCpu->vmm.s.pR0LoggerR0;
    194196    if (pR0Logger)
    195197    {
     
    759761
    760762        case VMMR0_DO_GVMM_REGISTER_VMCPU:
     763        {
    761764            if (!pVM)
    762765                return VERR_INVALID_PARAMETER;
     766
     767#ifdef LOG_ENABLED
     768            /* Register the ring 0 logger for this thread here as well. */
     769            PVMCPU       pVCpu = &pVM->aCpus[idCpu];
     770            PVMMR0LOGGER pR0Logger = pVCpu->vmm.s.pR0LoggerR0;
     771            if (pR0Logger)
     772                RTLogSetDefaultInstanceThread(&pR0Logger->Logger, (uintptr_t)pVM->pSession);
     773#endif
    763774            return GVMMR0RegisterVCpu(pVM, idCpu);
     775        }
    764776
    765777        case VMMR0_DO_GVMM_SCHED_HALT:
     
    11941206{
    11951207    PVM pVM = pVCpu->pVMR0;
    1196     if (pVM->vmm.s.pR0LoggerR0)
    1197         pVM->vmm.s.pR0LoggerR0->fFlushingDisabled = true;
     1208    if (pVCpu->vmm.s.pR0LoggerR0)
     1209        pVCpu->vmm.s.pR0LoggerR0->fFlushingDisabled = true;
    11981210}
    11991211
     
    12071219{
    12081220    PVM pVM = pVCpu->pVMR0;
    1209     if (pVM->vmm.s.pR0LoggerR0)
    1210         pVM->vmm.s.pR0LoggerR0->fFlushingDisabled = false;
     1221    if (pVCpu->vmm.s.pR0LoggerR0)
     1222        pVCpu->vmm.s.pR0LoggerR0->fFlushingDisabled = false;
    12111223}
    12121224
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