fix for virtualbox-70 after current commit a3a88ed
- Reply: Graham Perrin : "(286206) fix for virtualbox-70 after current commit a3a88ed"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 20 Apr 2025 15:21:39 UTC
In case anyone else is stuck on this ..
Recent changes in -current to remove vm_page_prev and vm_page_next break
compilation and loading of the virtualbox kernel modules.
This patch moves the troublesome call to the new KPI. I only tested on
virtualbox-70 but other versions probably need similar adjustments.
*** ./src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig
Sat Apr 19 13:11:03 2025
--- ./src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c Sat Apr
19 14:43:33 2025
***************
*** 78,83 ****
--- 78,86 ----
#include <iprt/process.h>
#include "internal/memobj.h"
+ #if __FreeBSD_version >= 1500038
+ #include <vm/vm_radix.h>
+ #endif
/*********************************************************************************************************************************
* Structures and Typedefs
*
***************
*** 201,209 ****
--- 204,219 ----
#if __FreeBSD_version < 1000000
vm_page_lock_queues();
#endif
+ #if __FreeBSD_version >= 1500038
+ struct pctrie_iter pages;
+
+ vm_page_iter_init(&pages, pMemFreeBSD->pObject);
+ VM_RADIX_FORALL(pPage, &pages)
+ #else
for (vm_page_t pPage =
vm_page_find_least(pMemFreeBSD->pObject, 0);
pPage != NULL;
pPage = vm_page_next(pPage))
+ #endif
{
vm_page_unwire(pPage, 0);
}