VirtualBox

Changeset 93043 in vbox


Ignore:
Timestamp:
Dec 21, 2021 11:38:47 AM (3 years ago)
Author:
vboxsync
Message:

VMM/VMXAllTemplate.cpp.h: Disable code which will be only used in R0, bugref:10136

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/VMXAllTemplate.cpp.h

    r92745 r93043  
    900900}
    901901
    902 
     902#ifdef IN_RING0
    903903/**
    904904 * Sets the given Processor-based VM-execution controls.
     
    967967    }
    968968}
    969 
     969#endif
    970970
    971971/**
     
    12531253
    12541254
     1255#ifdef IN_RING0
    12551256/**
    12561257 * Updates the VM's last error record.
     
    12721273        VMX_VMCS_READ_32(pVCpu, VMX_VMCS32_RO_VM_INSTR_ERROR, &VCPU_2_VMXSTATE(pVCpu).vmx.LastError.u32InstrError);
    12731274    }
    1274 #ifdef IN_RING0
    12751275    pVCpu->CTX_SUFF(pVM)->hm.s.ForR3.rcInit = rc;
    1276 #endif
    1277 }
     1276}
     1277#endif
    12781278
    12791279
     
    15471547#endif
    15481548
     1549#ifdef IN_RING0
    15491550/**
    15501551 * Sets the permission bits for the specified MSR in the given MSR bitmap.
     
    17511752    pHostMsr[i].u32Msr = idMsr;
    17521753
    1753 #ifdef IN_RING0
    17541754    /*
    17551755     * Only if the caller requests to update the host MSR value AND we've newly added the
     
    17731773        }
    17741774    }
    1775 #else
    1776     RT_NOREF(fUpdateHostMsr);
    1777 #endif
     1775
    17781776    return VINF_SUCCESS;
    17791777}
     
    18751873    return false;
    18761874}
     1875#endif
    18771876
    18781877
     
    30403039
    30413040
     3041#ifdef IN_RING0
    30423042/**
    30433043 * Exports the guest's RSP into the guest-state area in the VMCS.
     
    30603060    }
    30613061}
     3062#endif
    30623063
    30633064
     
    32793280
    32803281
     3282#ifdef IN_RING0
    32813283/**
    32823284 * Exports the guest hardware-virtualization state.
     
    33383340    return VINF_SUCCESS;
    33393341}
     3342#endif
    33403343
    33413344
     
    37623765
    37633766
     3767#ifdef IN_RING0
    37643768/**
    37653769 * Exports the guest debug registers into the guest-state area in the VMCS.
     
    37763780static int vmxHCExportSharedDebugState(PVMCPUCC pVCpu, PVMXTRANSIENT pVmxTransient)
    37773781{
    3778 #ifdef IN_RING0
    37793782    Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD));
    3780 #endif
    37813783
    37823784    /** @todo NSTVMX: Figure out what we want to do with nested-guest instruction
     
    38163818#endif
    38173819
    3818 #ifdef IN_RING0 /** @todo */
    38193820    bool     fSteppingDB      = false;
    38203821    bool     fInterceptMovDRx = false;
     
    39383939        }
    39393940    }
     3941
     3942    return VINF_SUCCESS;
     3943}
    39403944#endif /* !IN_RING0 */
    3941 
    3942     return VINF_SUCCESS;
    3943 }
    39443945
    39453946
     
    44454446
    44464447
     4448#ifdef IN_RING0
    44474449/**
    44484450 * Exports certain guest MSRs into the VM-entry MSR-load and VM-exit MSR-store
     
    45914593        }
    45924594
    4593 #ifdef IN_RING0 /** @todo */
    45944595        /* Last Branch Record. */
    45954596        if (VM_IS_VMX_LBR(pVM))
     
    46234624            AssertRCReturn(rc, rc);
    46244625        }
    4625 #endif /* !IN_RING0 */
    46264626
    46274627        ASMAtomicUoAndU64(&VCPU_2_VMXSTATE(pVCpu).fCtxChanged, ~HM_CHANGED_GUEST_OTHER_MSRS);
     
    46324632
    46334633
    4634 #ifdef IN_RING0
    46354634/**
    46364635 * Sets up the usage of TSC-offsetting and updates the VMCS.
     
    67966795
    67976796
     6797#ifdef IN_RING0
    67986798/**
    67996799 * Exports the guest state into the VMCS guest-state area.
     
    68256825    STAM_PROFILE_ADV_START(&VCPU_2_VMXSTATS(pVCpu).StatExportGuestState, x);
    68266826
    6827 #ifdef IN_RING0
    68286827    /*
    68296828     * Determine real-on-v86 mode.
     
    68396838        pVmcsInfoShared->RealMode.fRealOnV86Active = true;
    68406839    }
    6841 #endif
    68426840
    68436841    /*
     
    69046902static void vmxHCExportSharedState(PVMCPUCC pVCpu, PVMXTRANSIENT pVmxTransient)
    69056903{
    6906 #ifdef IN_RING0
    69076904    Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD));
    69086905    Assert(!VMMRZCallRing3IsEnabled(pVCpu));
    6909 #endif
    69106906
    69116907    if (VCPU_2_VMXSTATE(pVCpu).fCtxChanged & HM_CHANGED_GUEST_DR_MASK)
     
    69206916    }
    69216917
    6922 #ifdef IN_RING0
    69236918    if (VCPU_2_VMXSTATE(pVCpu).fCtxChanged & HM_CHANGED_VMX_GUEST_LAZY_MSRS)
    69246919    {
     
    69266921        VCPU_2_VMXSTATE(pVCpu).fCtxChanged &= ~HM_CHANGED_VMX_GUEST_LAZY_MSRS;
    69276922    }
    6928 #endif
    69296923
    69306924    AssertMsg(!(VCPU_2_VMXSTATE(pVCpu).fCtxChanged & HM_CHANGED_VMX_HOST_GUEST_SHARED_STATE),
     
    69496943{
    69506944    HMVMX_ASSERT_PREEMPT_SAFE(pVCpu);
    6951 #ifdef IN_RING0
    69526945    Assert(!VMMRZCallRing3IsEnabled(pVCpu));
    6953 #endif
    69546946
    69556947#ifdef HMVMX_ALWAYS_SYNC_FULL_GUEST_STATE
     
    69866978            AssertMsg(rcStrict == VINF_EM_RESCHEDULE_REM, ("Failed to export guest state! rc=%Rrc\n",
    69876979                                                           VBOXSTRICTRC_VAL(rcStrict)));
    6988 #ifdef IN_RING0
    69896980            Assert(!VMMRZCallRing3IsEnabled(pVCpu));
    6990 #endif
    69916981            return rcStrict;
    69926982        }
     
    70046994    return rcStrict;
    70056995}
     6996#endif
    70066997
    70076998
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