VirtualBox

Ticket #19644: vb-6.0.24-kernel-5.8-p5-1.patch

File vb-6.0.24-kernel-5.8-p5-1.patch, 1.6 KB (added by hwertz, 4 years ago)

Virtualbox 6.0.24 patch 5

  • src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    a b static int force_async_tsc = 0;  
    144144 * Memory for the executable memory heap (in IPRT).
    145145 */
    146146# ifdef DEBUG
    147 #  define EXEC_MEMORY_SIZE   8388608    /* 8 MB */
     147#  define EXEC_MEMORY_SIZE   10485760   /* 10 MB */
    148148# else
    149 #  define EXEC_MEMORY_SIZE   2097152    /* 2 MB */
     149#  define EXEC_MEMORY_SIZE   8388608    /* 8 MB */
    150150# endif
    151151extern uint8_t g_abExecMemory[EXEC_MEMORY_SIZE];
    152152# ifndef VBOX_WITH_TEXT_MODMEM_HACK
    EXPORT_SYMBOL(SUPDrvLinuxIDC);  
    756756
    757757RTCCUINTREG VBOXCALL supdrvOSChangeCR4(RTCCUINTREG fOrMask, RTCCUINTREG fAndMask)
    758758{
    759 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
    760     RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4);
    761     RTCCUINTREG uNew = (uOld & fAndMask) | fOrMask;
     759#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
     760    RTCCUINTREG const uOld = __read_cr4();
     761#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
     762    RTCCUINTREG const uOld = this_cpu_read(cpu_tlbstate.cr4);
     763#else
     764    RTCCUINTREG const uOld = ASMGetCR4();
     765#endif
     766    RTCCUINTREG const uNew = (uOld & fAndMask) | fOrMask;
    762767    if (uNew != uOld)
    763768    {
     769#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
     770        ASMSetCR4(uNew);
     771#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
    764772        this_cpu_write(cpu_tlbstate.cr4, uNew);
    765773        __write_cr4(uNew);
    766     }
    767774#else
    768     RTCCUINTREG uOld = ASMGetCR4();
    769     RTCCUINTREG uNew = (uOld & fAndMask) | fOrMask;
    770     if (uNew != uOld)
    771775        ASMSetCR4(uNew);
    772776#endif
     777    }
    773778    return uOld;
    774779}
    775780

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy