VirtualBox

Changeset 68001 in vbox for trunk/src


Ignore:
Timestamp:
Jul 17, 2017 3:27:35 PM (8 years ago)
Author:
vboxsync
Message:

PGMR0,GVMMR0: Ditto for I/O MMU setup.

Location:
trunk/src/VBox/VMM/VMMR0
Files:
3 edited

Legend:

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

    r67992 r68001  
    18831883
    18841884/**
     1885 * Validates a GVM/VM pair.
     1886 *
     1887 * @returns VBox status code.
     1888 * @param   pGVM        The global (ring-0) VM structure.
     1889 * @param   pVM         The cross context VM structure.
     1890 */
     1891GVMMR0DECL(int) GVMMR0ValidateGVMandVM(PGVM pGVM, PVM pVM)
     1892{
     1893    PGVMM pGVMM;
     1894    return gvmmR0ByGVMandVM(pGVM, pVM, &pGVMM, false /*fTakeUsedLock*/);
     1895}
     1896
     1897
     1898
     1899/**
    18851900 * Validates a GVM/VM/EMT combo.
    18861901 *
  • trunk/src/VBox/VMM/VMMR0/PGMR0.cpp

    r67994 r68001  
    7777    AssertReturn(idCpu < pGVM->cCpus, VERR_INVALID_CPU_ID); /* caller already checked this, but just to be sure. */
    7878    AssertReturn(pGVM->aCpus[idCpu].hEMT == RTThreadNativeSelf(), VERR_NOT_OWNER);
    79     PVMCPU pVCpu = &pVM->aCpus[idCpu];
    80 
    81     PGM_LOCK_ASSERT_OWNER_EX(pVM, pVCpu);
     79    PGM_LOCK_ASSERT_OWNER_EX(pVM, &pVM->aCpus[idCpu]);
    8280
    8381    /*
     
    202200    AssertReturn(idCpu < pGVM->cCpus, VERR_INVALID_CPU_ID); /* caller already checked this, but just to be sure. */
    203201    AssertReturn(pGVM->aCpus[idCpu].hEMT == RTThreadNativeSelf(), VERR_NOT_OWNER);
    204     PVMCPU pVCpu = &pVM->aCpus[idCpu];
    205 
    206     PGM_LOCK_ASSERT_OWNER_EX(pVM, pVCpu);
     202    PGM_LOCK_ASSERT_OWNER_EX(pVM, &pVM->aCpus[idCpu]);
    207203
    208204    /*
     
    244240    AssertReturn(idCpu < pGVM->cCpus, VERR_INVALID_CPU_ID); /* caller already checked this, but just to be sure. */
    245241    AssertReturn(pGVM->aCpus[idCpu].hEMT == RTThreadNativeSelf(), VERR_NOT_OWNER);
    246     PVMCPU pVCpu = &pVM->aCpus[idCpu];
    247 
    248     PGM_LOCK_ASSERT_OWNER_EX(pVM, pVCpu);
    249 
     242    PGM_LOCK_ASSERT_OWNER_EX(pVM, &pVM->aCpus[idCpu]);
    250243    Assert(!pVM->pgm.s.cLargeHandyPages);
    251244
     
    388381 * @returns VBox status code.
    389382 *
     383 * @param   pGVM                The global (ring-0) VM structure.
    390384 * @param   pVM                 The cross context VM structure.
    391385 */
    392 VMMR0_INT_DECL(int) PGMR0PhysSetupIommu(PVM pVM)
    393 {
    394     PGVM pGVM;
    395     int rc = GVMMR0ByVM(pVM, &pGVM);
     386VMMR0_INT_DECL(int) PGMR0PhysSetupIoMmu(PGVM pGVM, PVM pVM)
     387{
     388    int rc = GVMMR0ValidateGVMandVM(pGVM, pVM);
    396389    if (RT_FAILURE(rc))
    397390        return rc;
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r67994 r68001  
    16551655            if (idCpu != 0)
    16561656                return VERR_INVALID_CPU_ID;
    1657             rc = PGMR0PhysSetupIommu(pVM);
     1657            rc = PGMR0PhysSetupIoMmu(pGVM, pVM);
    16581658            VMM_CHECK_SMAP_CHECK2(pVM, RT_NOTHING);
    16591659            break;
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