VirtualBox

Changeset 81649 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Nov 4, 2019 12:10:50 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134407
Message:

Linux 5.4: no more arbitrary executable pages and more changes, ticketref:18945

Location:
trunk/src/VBox/Additions/linux/drm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.c

    r80712 r81649  
    306306
    307307static struct drm_driver driver = {
     308#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
    308309        .driver_features =
    309310            DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ |
    310 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81)
     311# if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81)
    311312            DRIVER_IRQ_SHARED |
    312 #endif
     313# endif /* < KERNEL_VERSION(5, 1, 0) && !defined(RHEL_81) */
    313314            DRIVER_PRIME,
     315#else /* >= KERNEL_VERSION(5, 4, 0) */
     316        .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_HAVE_IRQ,
     317#endif /* < KERNEL_VERSION(5, 4, 0) */
    314318        .dev_priv_size = 0,
    315319
  • trunk/src/VBox/Additions/linux/drm/vbox_main.c

    r80712 r81649  
    622622static inline u64 vbox_bo_mmap_offset(struct vbox_bo *bo)
    623623{
    624 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70)
     624#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
     625        return drm_vma_node_offset_addr(&bo->bo.base.vma_node);
     626#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && !defined(RHEL_70)
    625627        return bo->bo.addr_space_offset;
    626628#else
    627629        return drm_vma_node_offset_addr(&bo->bo.vma_node);
    628 #endif
     630#endif /* >= KERNEL_VERSION(5, 4, 0) */
    629631}
    630632
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