VirtualBox

Changeset 56678 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 29, 2015 5:55:51 PM (9 years ago)
Author:
vboxsync
Message:

VMM/GIM: Update the cached TSC frequency on state-load in KVM paravirt. VMs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/GIMKvm.cpp

    r56677 r56678  
    175175        pKvm->fTrapXcptUD = true;
    176176
     177    return VINF_SUCCESS;
     178}
     179
     180
     181/**
     182 * Initializes remaining bits of the KVM provider.
     183 *
     184 * This is called after initializing HM and almost all other VMM components.
     185 *
     186 * @returns VBox status code.
     187 * @param   pVM     Pointer to the VM.
     188 */
     189VMMR3_INT_DECL(int) gimR3KvmInitCompleted(PVM pVM)
     190{
     191    PGIMKVM pKvm = &pVM->gim.s.u.Kvm;
    177192    pKvm->cTscTicksPerSecond = TMCpuTicksPerSecond(pVM);
    178     return VINF_SUCCESS;
    179 }
    180 
    181 
    182 /**
    183  * Initializes remaining bits of the KVM provider.
    184  *
    185  * This is called after initializing HM and almost all other VMM components.
    186  *
    187  * @returns VBox status code.
    188  * @param   pVM     Pointer to the VM.
    189  */
    190 VMMR3_INT_DECL(int) gimR3KvmInitCompleted(PVM pVM)
    191 {
    192193    if (TMR3CpuTickIsFixedRateMonotonic(pVM, true /* fWithParavirtEnabled */))
    193194    {
     
    196197         *        translated as a "monotonic" bit which even in Async systems we
    197198         *        -should- be reporting a strictly monotonic TSC to the guest.  */
    198         PGIMKVM pKvm = &pVM->gim.s.u.Kvm;
    199199        pKvm->uBaseFeat |= GIM_KVM_BASE_FEAT_TSC_STABLE;
    200200
     
    209209        AssertLogRelRCReturn(rc, rc);
    210210    }
    211 
    212211    return VINF_SUCCESS;
    213212}
     
    339338
    340339    /*
     340     * Update the TSC frequency from TM.
     341     */
     342    PGIMKVM pKvm = &pVM->gim.s.u.Kvm;
     343    pKvm->cTscTicksPerSecond = TMCpuTicksPerSecond(pVM);
     344
     345    /*
    341346     * Load per-VCPU data.
    342347     */
     
    368373     * Load per-VM data.
    369374     */
    370     PGIMKVM pKvm = &pVM->gim.s.u.Kvm;
    371375    SSMR3GetU64(pSSM, &pKvm->u64WallClockMsr);
    372376    rc = SSMR3GetU32(pSSM, &pKvm->uBaseFeat);
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