VirtualBox

Changeset 45351 in vbox


Ignore:
Timestamp:
Apr 4, 2013 8:24:29 PM (11 years ago)
Author:
vboxsync
Message:

VMM/VMMR0: HM bits, remove unused flags.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

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

    r45349 r45351  
    25912591     * Guest FPU.
    25922592     */
    2593     if (   (pVCpu->hm.s.fContextUseFlags & HM_CHANGED_GUEST_CR0)
    2594         || (pVCpu->hm.s.fContextUseFlags & HM_CHANGED_GUEST_FPU))
     2593    if (pVCpu->hm.s.fContextUseFlags & HM_CHANGED_GUEST_CR0)
    25952594    {
    25962595        uint64_t u64GuestCR0 = pCtx->cr0;
     
    27342733        AssertRCReturn(rc, rc);
    27352734
    2736         pVCpu->hm.s.fContextUseFlags &= ~(HM_CHANGED_GUEST_CR0 | HM_CHANGED_GUEST_FPU);
     2735        pVCpu->hm.s.fContextUseFlags &= ~HM_CHANGED_GUEST_CR0;
    27372736    }
    27382737
    27392738    /*
    27402739     * Guest CR2.
    2741      * It's always loaded late in the assembler code. Nothing to do here.
     2740     * It's always loaded in the assembler code. Nothing to do here.
    27422741     */
    2743     pVCpu->hm.s.fContextUseFlags &= ~HM_CHANGED_GUEST_CR2;
    27442742
    27452743    /*
     
    62216219    LogFlowFunc(("pVM=%p pVCpu=%p\n", pVM, pVCpu));
    62226220
    6223     /* For longjmp reentrants we need not load the guest state all over again. */
     6221    /* For longjmp reentrants we need not load the guest state again. */
    62246222    if (!pVCpu->hm.s.fContextUseFlags)
    62256223        return VINF_SUCCESS;
    6226 
     6224   
    62276225    /* Determine real-on-v86 mode. */
    62286226    pVCpu->hm.s.vmx.RealMode.fRealOnV86Active = false;
     
    62326230        pVCpu->hm.s.vmx.RealMode.fRealOnV86Active = true;
    62336231    }
     6232
     6233    Log(("LoadGuest flags=%#RX32\n", pVCpu->hm.s.fContextUseFlags));
    62346234
    62356235    int rc = hmR0VmxLoadGuestEntryCtls(pVM, pVCpu, pCtx);
     
    75227522                case 2: /* CR2 */
    75237523                    Log(("CR2 write rc=%d\n", rc));
    7524                     pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR2;
    75257524                    break;
    75267525                case 3: /* CR3 */
     
    81838182        Assert(CPUMIsGuestFPUStateActive(pVCpu));
    81848183
    8185         pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_FPU;
     8184        pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR0;
    81868185        STAM_COUNTER_INC(&pVCpu->hm.s.StatExitShadowNM);
    81878186        return VINF_SUCCESS;
     
    84778476        {
    84788477            pMixedCtx->cr2 = pVmxTransient->uExitQualification;
    8479             pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR2;
    84808478            rc = hmR0VmxInjectEventVmcs(pVM, pVCpu, pMixedCtx,
    84818479                                        VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(pVmxTransient->uExitIntrInfo),
     
    85618559            TRPMResetTrap(pVCpu);
    85628560            pMixedCtx->cr2 = pVmxTransient->uExitQualification;
    8563             pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR2;
    85648561            rc = hmR0VmxInjectEventVmcs(pVM, pVCpu, pMixedCtx,
    85658562                                        VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(pVmxTransient->uExitIntrInfo),
  • trunk/src/VBox/VMM/include/HMInternal.h

    r45349 r45351  
    102102# define HM_CHANGED_GUEST_RSP                    RT_BIT(1)
    103103# define HM_CHANGED_GUEST_RFLAGS                 RT_BIT(2)
    104 # define HM_CHANGED_GUEST_FPU                    RT_BIT(3)
    105 # define HM_CHANGED_GUEST_CR0                    RT_BIT(4)
    106 # define HM_CHANGED_GUEST_CR2                    RT_BIT(5)
    107 # define HM_CHANGED_GUEST_CR3                    RT_BIT(6)
    108 # define HM_CHANGED_GUEST_CR4                    RT_BIT(7)
    109 # define HM_CHANGED_GUEST_GDTR                   RT_BIT(8)
    110 # define HM_CHANGED_GUEST_IDTR                   RT_BIT(9)
    111 # define HM_CHANGED_GUEST_LDTR                   RT_BIT(10)
    112 # define HM_CHANGED_GUEST_TR                     RT_BIT(11)
    113 # define HM_CHANGED_GUEST_SEGMENT_REGS           RT_BIT(12)
    114 # define HM_CHANGED_GUEST_DEBUG                  RT_BIT(13)
    115 # define HM_CHANGED_GUEST_FS_BASE_MSR            RT_BIT(14)
    116 # define HM_CHANGED_GUEST_GS_BASE_MSR            RT_BIT(15)
    117 # define HM_CHANGED_GUEST_SYSENTER_CS_MSR        RT_BIT(16)
    118 # define HM_CHANGED_GUEST_SYSENTER_EIP_MSR       RT_BIT(17)
    119 # define HM_CHANGED_GUEST_SYSENTER_ESP_MSR       RT_BIT(18)
    120 # define HM_CHANGED_GUEST_INTR_STATE             RT_BIT(19)
    121 # define HM_CHANGED_VMX_GUEST_AUTO_MSRS          RT_BIT(20)
    122 # define HM_CHANGED_VMX_GUEST_ACTIVITY_STATE     RT_BIT(21)
    123 # define HM_CHANGED_VMX_GUEST_APIC_STATE         RT_BIT(22)
    124 # define HM_CHANGED_VMX_ENTRY_CTLS               RT_BIT(23)
    125 # define HM_CHANGED_VMX_EXIT_CTLS                RT_BIT(24)
    126 
    127 # define HM_CHANGED_HOST_CONTEXT                 RT_BIT(25)
     104# define HM_CHANGED_GUEST_CR0                    RT_BIT(3)
     105# define HM_CHANGED_GUEST_CR3                    RT_BIT(4)
     106# define HM_CHANGED_GUEST_CR4                    RT_BIT(5)
     107# define HM_CHANGED_GUEST_GDTR                   RT_BIT(6)
     108# define HM_CHANGED_GUEST_IDTR                   RT_BIT(7)
     109# define HM_CHANGED_GUEST_LDTR                   RT_BIT(8)
     110# define HM_CHANGED_GUEST_TR                     RT_BIT(9)
     111# define HM_CHANGED_GUEST_SEGMENT_REGS           RT_BIT(10)
     112# define HM_CHANGED_GUEST_DEBUG                  RT_BIT(11)
     113# define HM_CHANGED_GUEST_FS_BASE_MSR            RT_BIT(12)
     114# define HM_CHANGED_GUEST_GS_BASE_MSR            RT_BIT(13)
     115# define HM_CHANGED_GUEST_SYSENTER_CS_MSR        RT_BIT(14)
     116# define HM_CHANGED_GUEST_SYSENTER_EIP_MSR       RT_BIT(15)
     117# define HM_CHANGED_GUEST_SYSENTER_ESP_MSR       RT_BIT(16)
     118# define HM_CHANGED_GUEST_INTR_STATE             RT_BIT(17)
     119# define HM_CHANGED_VMX_GUEST_AUTO_MSRS          RT_BIT(18)
     120# define HM_CHANGED_VMX_GUEST_ACTIVITY_STATE     RT_BIT(19)
     121# define HM_CHANGED_VMX_GUEST_APIC_STATE         RT_BIT(20)
     122# define HM_CHANGED_VMX_ENTRY_CTLS               RT_BIT(21)
     123# define HM_CHANGED_VMX_EXIT_CTLS                RT_BIT(22)
     124
     125# define HM_CHANGED_HOST_CONTEXT                 RT_BIT(23)
    128126
    129127# define HM_CHANGED_ALL_GUEST   (  HM_CHANGED_GUEST_RIP                \
    130128                                 | HM_CHANGED_GUEST_RSP                \
    131129                                 | HM_CHANGED_GUEST_RFLAGS             \
    132                                  | HM_CHANGED_GUEST_FPU                \
    133130                                 | HM_CHANGED_GUEST_CR0                \
    134                                  | HM_CHANGED_GUEST_CR2                \
    135131                                 | HM_CHANGED_GUEST_CR3                \
    136132                                 | HM_CHANGED_GUEST_CR4                \
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