From 77dbd57b8e9dad16375ba7a249b8046dd66d1c46 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 12 Dec 2024 17:46:02 +0100 Subject: emulators/open-vm-{tools,kmod}: split the package Split the package to build the kmods separatly! Building separately has multiple benefits: 1. it allows user to rebuild when they upgrade their kernel without rebuilding all of the tools which can take a long time. 2. it allows us to provide the modules in the new kmods package repository 3. it installs the kmods the in the same place as the regular kmods: /boot/modules It means we can probably get rid of the rc script in favor if letting users use kld_list mecanism but I will let this decision to the maintainer based on what it probably best for users. Approved by: garga (maintainer) Reviewed by: garga (maintainer) Differential Revision: https://reviews.freebsd.org/D48059 --- emulators/open-vm-kmod/files/patch-vmmemctl_os.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 emulators/open-vm-kmod/files/patch-vmmemctl_os.c (limited to 'emulators/open-vm-kmod/files/patch-vmmemctl_os.c') diff --git a/emulators/open-vm-kmod/files/patch-vmmemctl_os.c b/emulators/open-vm-kmod/files/patch-vmmemctl_os.c new file mode 100644 index 000000000000..d096f92236c3 --- /dev/null +++ b/emulators/open-vm-kmod/files/patch-vmmemctl_os.c @@ -0,0 +1,24 @@ +--- vmmemctl/os.c.orig 2024-10-10 15:05:07 UTC ++++ vmmemctl/os.c +@@ -103,7 +103,11 @@ MALLOC_DEFINE(M_VMMEMCTL, BALLOON_NAME, "vmmemctl meta + #define KVA_FREE(offset, size) kva_free(offset, size) + + #define KMEM_ALLOC(size) kmem_malloc(size, M_WAITOK | M_ZERO) +-#define KMEM_FREE(offset, size) kmem_free(offset, size) ++#if __FreeBSD_version < 1400070 ++ #define KMEM_FREE(offset, size) kmem_free((vm_offset_t)offset, size) ++#else ++ #define KMEM_FREE(offset, size) kmem_free(offset, size) ++#endif + + /* + * Globals +@@ -404,7 +408,7 @@ os_pmap_free(os_pmap *p) // IN + static void + os_pmap_free(os_pmap *p) // IN + { +- KMEM_FREE((vm_offset_t)p->bitmap, p->size); ++ KMEM_FREE(p->bitmap, p->size); + p->size = 0; + p->bitmap = NULL; + } -- cgit v1.2.3