VirtualBox

Changeset 97905 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Dec 29, 2022 6:22:23 PM (2 years ago)
Author:
vboxsync
Message:

IPRT,SUPDrv: Dropping RTR0MemExecDonate and associated SUPDrv-linux code, it's not needed since linux started using RTR0MemObjAllocPage for r0 images. bugref:9801

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r96407 r97905  
    175175#define DEVICE_NAME_USR     "vboxdrvu"
    176176
    177 #if (defined(RT_ARCH_AMD64) && RTLNX_VER_MAX(2,6,23)) || defined(VBOX_WITH_TEXT_MODMEM_HACK)
    178 /**
    179  * Memory for the executable memory heap (in IPRT).
    180  */
    181 # ifdef DEBUG
    182 #  define EXEC_MEMORY_SIZE   10485760   /* 10 MB */
    183 # else
    184 #  define EXEC_MEMORY_SIZE   8388608    /* 8 MB */
    185 # endif
    186 extern uint8_t g_abExecMemory[EXEC_MEMORY_SIZE];
    187 # ifndef VBOX_WITH_TEXT_MODMEM_HACK
    188 __asm__(".section execmemory, \"awx\", @progbits\n\t"
    189         ".align 32\n\t"
    190         ".globl g_abExecMemory\n"
    191         "g_abExecMemory:\n\t"
    192         ".zero " RT_XSTR(EXEC_MEMORY_SIZE) "\n\t"
    193         ".type g_abExecMemory, @object\n\t"
    194         ".size g_abExecMemory, " RT_XSTR(EXEC_MEMORY_SIZE) "\n\t"
    195         ".text\n\t");
    196 # else
    197 __asm__(".text\n\t"
    198         ".align 4096\n\t"
    199         ".globl g_abExecMemory\n"
    200         "g_abExecMemory:\n\t"
    201         ".zero " RT_XSTR(EXEC_MEMORY_SIZE) "\n\t"
    202         ".type g_abExecMemory, @object\n\t"
    203         ".size g_abExecMemory, " RT_XSTR(EXEC_MEMORY_SIZE) "\n\t"
    204         ".text\n\t");
    205 # endif
    206 #endif
    207 
    208177/** The file_operations structure. */
    209178static struct file_operations gFileOpsVBoxDrvSys =
     
    395364        if (RT_SUCCESS(rc))
    396365        {
    397 #if (defined(RT_ARCH_AMD64) && RTLNX_VER_MAX(2,6,23)) || defined(VBOX_WITH_TEXT_MODMEM_HACK)
    398 # ifdef VBOX_WITH_TEXT_MODMEM_HACK
    399             set_memory_x(&g_abExecMemory[0], sizeof(g_abExecMemory) / PAGE_SIZE);
    400             set_memory_rw(&g_abExecMemory[0], sizeof(g_abExecMemory) / PAGE_SIZE);
    401 # endif
    402             rc = RTR0MemExecDonate(&g_abExecMemory[0], sizeof(g_abExecMemory));
    403             printk(KERN_DEBUG "VBoxDrv: dbg - g_abExecMemory=%p\n", (void *)&g_abExecMemory[0]);
    404 #endif
    405366            Log(("VBoxDrv::ModuleInit\n"));
    406367
     
    408369             * Initialize the device extension.
    409370             */
    410             if (RT_SUCCESS(rc))
    411                 rc = supdrvInitDevExt(&g_DevExt, sizeof(SUPDRVSESSION));
     371            rc = supdrvInitDevExt(&g_DevExt, sizeof(SUPDRVSESSION));
    412372            if (RT_SUCCESS(rc))
    413373            {
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