VirtualBox

Changeset 102874 in vbox for trunk/src


Ignore:
Timestamp:
Jan 15, 2024 12:08:04 PM (13 months ago)
Author:
vboxsync
Message:

Linux Host and Guest kernel modules: Fix build for older Fedora kernels.

This commit covers build errors for Fedora 34-38 kernels. In short,
we exclude Fedora kernels (identified as RHEL XX.99) from fixes intended
for RHEL kernels.

Location:
trunk/src/VBox
Files:
10 edited

Legend:

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

    r102794 r102874  
    388388        .dumb_destroy = drm_gem_dumb_destroy,
    389389#endif
    390 #if RTLNX_VER_MAX(6,6,0) && !RTLNX_RHEL_MAJ_PREREQ(9,4)
     390#if RTLNX_VER_MAX(6,6,0) && !RTLNX_RHEL_RANGE(9,4, 9,99)
    391391        .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
    392392        .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
     
    394394        .gem_prime_import = drm_gem_prime_import,
    395395        .gem_prime_import_sg_table = vbox_gem_prime_import_sg_table,
    396 #if RTLNX_VER_MAX(6,6,0) && !RTLNX_RHEL_MAJ_PREREQ(9,4)
     396#if RTLNX_VER_MAX(6,6,0) && !RTLNX_RHEL_RANGE(9,4, 9,99)
    397397        .gem_prime_mmap = vbox_gem_prime_mmap,
    398398#endif
  • trunk/src/VBox/Additions/linux/drm/vbox_drv.h

    r102794 r102874  
    173173#endif
    174174
    175 #if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3)
     175#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99)
    176176# include <drm/ttm/ttm_bo.h>
    177177#else
     
    250250 * now represents number of bytes. This macro handles this change. Input
    251251 * argument is a pointer to struct ttm_resource. */
    252 #if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3)
     252#if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99)
    253253# define VBOX_BO_RESOURCE_NUM_PAGES(_resource) PFN_UP(_resource->size)
    254254#else
     
    530530void *vbox_gem_prime_vmap(struct drm_gem_object *obj);
    531531void vbox_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
    532 #if RTLNX_VER_MAX(6,6,0) && !RTLNX_RHEL_MAJ_PREREQ(9,4)
     532#if RTLNX_VER_MAX(6,6,0) && !RTLNX_RHEL_RANGE(9,4, 9,99)
    533533int vbox_gem_prime_mmap(struct drm_gem_object *obj,
    534534                        struct vm_area_struct *area);
  • trunk/src/VBox/Additions/linux/drm/vbox_fb.c

    r102794 r102874  
    5151#include <VBoxVideo.h>
    5252
    53 #if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3)
     53#if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99)
    5454# define VBOX_FBDEV_INFO(_helper) _helper.info
    5555#else
     
    197197        .fb_check_var = drm_fb_helper_check_var,
    198198        .fb_set_par = drm_fb_helper_set_par,
    199 #if RTLNX_VER_MIN(6,5,0) || RTLNX_RHEL_MAJ_PREREQ(9,4)
     199#if RTLNX_VER_MIN(6,5,0) || RTLNX_RHEL_RANGE(9,4, 9,99)
    200200        .fb_read    = fb_sys_read,
    201201        .fb_write   = fb_sys_write,
     
    331331        }
    332332
    333 #if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3)
     333#if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99)
    334334        info = drm_fb_helper_alloc_info(helper);
    335335#else
     
    359359        info->fbops = &vboxfb_ops;
    360360
    361 #if RTLNX_VER_MAX(6,3,0) && !RTLNX_RHEL_RANGE(8,9, 8,99) && !RTLNX_RHEL_MAJ_PREREQ(9,3)
     361#if RTLNX_VER_MAX(6,3,0) && !RTLNX_RHEL_RANGE(8,9, 8,99) && !RTLNX_RHEL_RANGE(9,3, 9,99)
    362362        /*
    363363         * This seems to be done for safety checking that the framebuffer
     
    392392
    393393#ifdef CONFIG_FB_DEFERRED_IO
    394 # if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(8,8, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3) || RTLNX_SUSE_MAJ_PREREQ(15,5)
     394# if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(8,8, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99) || RTLNX_SUSE_MAJ_PREREQ(15,5)
    395395        info->fix.smem_len = info->screen_size;
    396396# endif
     
    437437#endif
    438438
    439 #if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3)
     439#if RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99)
    440440        drm_fb_helper_unregister_info(&fbdev->helper);
    441441#else
     
    485485        spin_lock_init(&fbdev->dirty_lock);
    486486
    487 #if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3)
     487#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99)
    488488        drm_fb_helper_prepare(dev, &fbdev->helper, 32, &vbox_fb_helper_funcs);
    489489#elif RTLNX_VER_MIN(3,17,0) || RTLNX_RHEL_MIN(7,2)
     
    514514        drm_helper_disable_unused_functions(dev);
    515515
    516 #if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3)
     516#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99)
    517517        ret = drm_fb_helper_initial_config(&fbdev->helper);
    518518#else
     
    533533        struct fb_info *fbdev = VBOX_FBDEV_INFO(vbox->fbdev->helper);
    534534
    535 #if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3)
     535#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99)
    536536        fbdev->fix.smem_start = pci_resource_start(VBOX_DRM_TO_PCI_DEV(vbox->fbdev->helper.dev), 0) + gpu_addr;
    537537#else
  • trunk/src/VBox/Additions/linux/drm/vbox_main.c

    r101029 r102874  
    3737#include <drm/drm_crtc_helper.h>
    3838
    39 #if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3)
     39#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99)
    4040# include <drm/drm_modeset_helper.h>
    4141#endif
  • trunk/src/VBox/Additions/linux/drm/vbox_mode.c

    r101029 r102874  
    4040#include <linux/export.h>
    4141#include <drm/drm_crtc_helper.h>
    42 #if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3)
     42#if RTLNX_VER_MIN(6,3,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99)
    4343# include <drm/drm_modeset_helper_vtables.h>
    4444# include <drm/drm_modeset_helper.h>
  • trunk/src/VBox/Additions/linux/drm/vbox_prime.c

    r102794 r102874  
    7474}
    7575
    76 #if RTLNX_VER_MAX(6,6,0) && !RTLNX_RHEL_MAJ_PREREQ(9,4)
     76#if RTLNX_VER_MAX(6,6,0) && !RTLNX_RHEL_RANGE(9,4, 9,99)
    7777int vbox_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *area)
    7878{
  • trunk/src/VBox/Additions/linux/drm/vbox_ttm.c

    r101029 r102874  
    322322        tt->func = &vbox_tt_backend_func;
    323323#endif
    324 #if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(8,8, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,2) || RTLNX_SUSE_MAJ_PREREQ(15,5)
     324#if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(8,8, 8,99) || RTLNX_RHEL_RANGE(9,2, 9,99) || RTLNX_SUSE_MAJ_PREREQ(15,5)
    325325        if (ttm_tt_init(tt, bo, page_flags, ttm_write_combined, 0)) {
    326326#elif RTLNX_VER_MIN(5,11,0) || RTLNX_RHEL_RANGE(8,5, 8,99)
     
    646646#endif
    647647
    648 #if RTLNX_VER_MIN(6,1,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_MAJ_PREREQ(9,3) || RTLNX_SUSE_MAJ_PREREQ(15,5)
     648#if RTLNX_VER_MIN(6,1,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99) || RTLNX_SUSE_MAJ_PREREQ(15,5)
    649649        ret = ttm_bo_init_validate(&vbox->ttm.bdev, &vboxbo->bo,
    650650#else
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r102795 r102874  
    9999/** Starting from 6.4.0, iter_iov() macro should be used in order to access to iov field
    100100 * of struct iov_iter. */
    101 #if RTLNX_VER_MIN(6,4,0) || RTLNX_RHEL_MAJ_PREREQ(9,4)
     101#if RTLNX_VER_MIN(6,4,0) || RTLNX_RHEL_RANGE(9,4, 9,99)
    102102# define VBSF_GET_ITER_IOV(_iter) iter_iov(_iter)
    103103#else
     
    21212121#if RTLNX_VER_MIN(2,6,19)
    21222122/* See kernel 6.0.0 change eba2d3d798295dc43cae8fade102f9d083a2a741. */
    2123 # if RTLNX_VER_MIN(6,0,0) || RTLNX_RHEL_MAJ_PREREQ(9,4)
     2123# if RTLNX_VER_MIN(6,0,0) || RTLNX_RHEL_RANGE(9,4, 9,99)
    21242124#  define VBOX_IOV_GET_PAGES iov_iter_get_pages2
    21252125# else
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c

    r101592 r102874  
    4848# include <linux/nsproxy.h>
    4949#endif
    50 #if RTLNX_VER_MIN(6,4,10) || RTLNX_RHEL_MAJ_PREREQ(9,4)
     50#if RTLNX_VER_MIN(6,4,10) || RTLNX_RHEL_RANGE(9,4, 9,99)
    5151# include <net/gso.h>
    5252#endif
  • trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c

    r102304 r102874  
    12631263# endif
    12641264
    1265 # if RTLNX_VER_MIN(6,5,0) || RTLNX_RHEL_MAJ_PREREQ(9,4)
     1265# if RTLNX_VER_MIN(6,5,0) || RTLNX_RHEL_RANGE(9,4, 9,99)
    12661266    pEntry = __pte_map(&u.Middle, ulAddr);
    12671267# elif RTLNX_VER_MIN(2,5,5) || defined(pte_offset_map) /* As usual, RHEL 3 had pte_offset_map earlier. */
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