VirtualBox

Changeset 100435 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Jul 7, 2023 1:48:03 PM (21 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158175
Message:

Linux: iprt: r0drv/linux/memobj-r0drv-linux.c: Introduce initial support for kernel 6.5, bugref:10482.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c

    r100357 r100435  
    12631263# endif
    12641264
    1265 # if RTLNX_VER_MIN(2,5,5) || defined(pte_offset_map) /* As usual, RHEL 3 had pte_offset_map earlier. */
     1265# if RTLNX_VER_MIN(6,5,0)
     1266    pEntry = __pte_map(&u.Middle, ulAddr);
     1267# elif RTLNX_VER_MIN(2,5,5) || defined(pte_offset_map) /* As usual, RHEL 3 had pte_offset_map earlier. */
    12661268    pEntry = pte_offset_map(&u.Middle, ulAddr);
    12671269# else
     
    13641366    }
    13651367
     1368# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0)
    13661369    papVMAs = (struct vm_area_struct **)RTMemAlloc(sizeof(*papVMAs) * cPages);
    13671370    if (papVMAs)
    13681371    {
     1372# else
     1373        RT_NOREF(papVMAs);
     1374# endif
    13691375        LNX_MM_DOWN_READ(pTask->mm);
    13701376
     
    13851391                                fWrite,                 /* force write access. */
    13861392# endif
    1387                                 &pMemLnx->apPages[0],   /* Page array. */
    1388                                 papVMAs);               /* vmas */
     1393                                &pMemLnx->apPages[0]    /* Page array. */
     1394# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0)
     1395                                , papVMAs               /* vmas */
     1396# endif
     1397                                );
    13891398        /*
    13901399         * Actually this should not happen at the moment as call this function
     
    14071416                                fWrite,                 /* force write access. */
    14081417# endif
    1409                                 &pMemLnx->apPages[0],   /* Page array. */
    1410                                 papVMAs                 /* vmas */
     1418                                &pMemLnx->apPages[0]    /* Page array. */
     1419# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0)
     1420                                , papVMAs               /* vmas */
     1421# endif
    14111422# if GET_USER_PAGES_API >= KERNEL_VERSION(4, 10, 0)
    14121423                                , NULL                  /* locked */
     
    14271438                                fWrite,                 /* force write access. */
    14281439# endif
    1429                                 &pMemLnx->apPages[0],   /* Page array. */
    1430                                 papVMAs);               /* vmas */
     1440                                &pMemLnx->apPages[0]    /* Page array. */
     1441# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0)
     1442                                , papVMAs               /* vmas */
     1443# endif
     1444                                );
    14311445#endif /* GET_USER_PAGES_API < KERNEL_VERSION(4, 6, 0) */
    14321446        if (rc == cPages)
     
    14531467#if RTLNX_VER_MIN(6,3,0)
    14541468                vm_flags_set(papVMAs[rc], VM_DONTCOPY | VM_LOCKED);
    1455 #else
     1469#elif GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0)
    14561470                papVMAs[rc]->vm_flags |= VM_DONTCOPY | VM_LOCKED;
    14571471#endif
     
    14601474            LNX_MM_UP_READ(pTask->mm);
    14611475
     1476# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0)
    14621477            RTMemFree(papVMAs);
     1478# endif
    14631479
    14641480            pMemLnx->Core.u.Lock.R0Process = R0Process;
     
    14871503        LNX_MM_UP_READ(pTask->mm);
    14881504
     1505        rc = VERR_LOCK_FAILED;
     1506
     1507# if GET_USER_PAGES_API < KERNEL_VERSION(6, 5, 0)
    14891508        RTMemFree(papVMAs);
    1490         rc = VERR_LOCK_FAILED;
    1491     }
     1509    }
     1510# endif
    14921511
    14931512    rtR0MemObjDelete(&pMemLnx->Core);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette