VirtualBox

Changeset 46808 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jun 26, 2013 2:58:36 PM (11 years ago)
Author:
vboxsync
Message:

VMM/HMSVMR0: AMD-V bits.

File:
1 edited

Legend:

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

    r46804 r46808  
    3232
    3333#ifdef DEBUG_ramshankar
    34 # define HMVMX_SYNC_FULL_GUEST_STATE
     34# define HMSVM_SYNC_FULL_GUEST_STATE
    3535# define HMSVM_ALWAYS_TRAP_ALL_XCPTS
    3636# define HMSVM_ALWAYS_TRAP_PF
     
    25612561    pVmcb->ctrl.NestedPaging.n.u1NestedPaging = pVM->hm.s.fNestedPaging;
    25622562
    2563 #ifdef HMVMX_SYNC_FULL_GUEST_STATE
     2563#ifdef HMSVM_SYNC_FULL_GUEST_STATE
    25642564    pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_ALL_GUEST;
    25652565#endif
     
    27162716            else if ((uint8_t)(pSvmTransient->u8GuestTpr >> 4) != pVmcb->ctrl.IntCtrl.n.u8VTPR)
    27172717            {
    2718                 int rc = PDMApicSetTPR(pVCpu, (pVmcb->ctrl.IntCtrl.n.u8VTPR << 4));
     2718                int rc = PDMApicSetTPR(pVCpu, pVmcb->ctrl.IntCtrl.n.u8VTPR << 4);
    27192719                AssertRC(rc);
     2720                pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_SVM_GUEST_APIC_STATE;
    27202721            }
    27212722        }
     
    37593760            AssertMsg(rc == VERR_EM_INTERPRETER, ("hmR0SvmExitMsr: EMInterpretWrmsr failed rc=%Rrc\n", rc));
    37603761
    3761         if (pCtx->ecx == MSR_K6_EFER)
     3762        /* If this is an X2APIC WRMSR access, update the APIC state as well. */
     3763        if (   pCtx->ecx >= MSR_IA32_X2APIC_START
     3764            && pCtx->ecx <= MSR_IA32_X2APIC_END)
     3765        {
     3766            /* We've already saved the APIC related guest-state (TPR) in hmR0SvmPostRunGuest(). When full APIC register
     3767             * virtualization is implemented we'll have to make sure APIC state is saved from the VMCB before
     3768               EMInterpretWrmsr() changes it. */
     3769            pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_SVM_GUEST_APIC_STATE;
     3770        }
     3771        else if (pCtx->ecx == MSR_K6_EFER)
    37623772            pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_SVM_GUEST_EFER_MSR;
    37633773        else if (pCtx->ecx == MSR_IA32_TSC)
     
    42614271        TRPMResetTrap(pVCpu);
    42624272        STAM_COUNTER_INC(&pVCpu->hm.s.StatExitShadowPF);
     4273        pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_SVM_GUEST_APIC_STATE;
    42634274        return rc;
    42644275    }
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