Skip to content

Conversation

@aurelihein
Copy link

This a branch which fix build with kernel >= 6.16.0 + Workstation 17.6.4
Tested with

$ uname -r
6.16.5-1-liquorix-amd64
$ vmware --version
VMware Workstation 17.6.4 build-24832109

To test :

make
sudo make install
sudo systemctl restart vmware

Thank you

Aurelien BOUIN

@aurelihein aurelihein changed the base branch from workstation-17.5.1 to workstation September 10, 2025 13:46
@ColtonDx
Copy link

Tested and functional on:

Kernel: 6.16.7-200.fc42.x86_64

NAME="Fedora Linux"
VERSION="42 (KDE Plasma Desktop Edition)"
RELEASE_TYPE=stable
ID=fedora
VERSION_ID=42
VERSION_CODENAME=""
PLATFORM_ID="platform:f42"
PRETTY_NAME="Fedora Linux 42 (KDE Plasma Desktop Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:42"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f42/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=42
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=42
SUPPORT_END=2026-05-13
VARIANT="KDE Plasma Desktop Edition"
VARIANT_ID=kde

This fixed issues I had had with getting vmmon and vmnet to load after upgrading to this kernel.

@tssj666
Copy link

tssj666 commented Sep 19, 2025

Compiling with a kernel earlier than 6.15.4 will fail.
Please update with the following fix

diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
index 961d4bc..9a95532 100644
--- a/vmmon-only/linux/hostif.c
+++ b/vmmon-only/linux/hostif.c
@@ -1997,7 +1997,7 @@ HostIF_CleanupUptime(void)
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 4)
    timer_delete_sync(&uptimeState.timer);
 #else
-   del_timer_sync(&tscTimer);
+   del_timer_sync(&uptimeState.timer);
 #endif
 }

@aurelihein
Copy link
Author

Good catch @tssj666
Pull Request updated
Thank you

@cncastillo
Copy link

I compiled using Pop!_OS 24.04 LTS x86_64 with kernel

❯ uname -r
6.16.3-76061603-generic

and I get this error:

error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build

Full output:

❯ sudo make
[sudo] password for ccp:
make -C vmmon-only
make[1]: Entering directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
Using kernel build system.
make -C /lib/modules/6.16.3-76061603-generic/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[3]: Entering directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
  You are using:           gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
  CC [M]  common/crosspage.o
common/crosspage.o: error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build
make[5]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/scripts/Makefile.build:287: common/crosspage.o] Error 1
make[5]: *** Deleting file 'common/crosspage.o'
make[4]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:2010: .] Error 2
make[3]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:248: __sub-make] Error 2
make[3]: Leaving directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
make[2]: *** [Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[1]: *** [Makefile:117: vmmon.ko] Error 2
make[1]: Leaving directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
make: *** [Makefile:21: vmmon-only] Error 2

Sadly, I don't know enough to propose a solution :(.

@ziprasidone146939277
Copy link

I compiled using Pop!_OS 24.04 LTS x86_64 with kernel

❯ uname -r
6.16.3-76061603-generic

and I get this error:

error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build

Full output:

❯ sudo make
[sudo] password for ccp:
make -C vmmon-only
make[1]: Entering directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
Using kernel build system.
make -C /lib/modules/6.16.3-76061603-generic/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[3]: Entering directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
  You are using:           gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
  CC [M]  common/crosspage.o
common/crosspage.o: error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build
make[5]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/scripts/Makefile.build:287: common/crosspage.o] Error 1
make[5]: *** Deleting file 'common/crosspage.o'
make[4]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:2010: .] Error 2
make[3]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:248: __sub-make] Error 2
make[3]: Leaving directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
make[2]: *** [Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[1]: *** [Makefile:117: vmmon.ko] Error 2
make[1]: Leaving directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
make: *** [Makefile:21: vmmon-only] Error 2

Sadly, I don't know enough to propose a solution :(.

Same here. Pop 24.04.

common/crosspage.o: error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build
make[5]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/scripts/Makefile.build:287: common/crosspage.o] Error 1
make[5]: *** Deleting file 'common/crosspage.o'
make[4]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:2010: .] Error 2
make[3]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:248: __sub-make] Error 2
make[3]: Leaving directory '/opt/vmware-host-modules/vmware-host-modules/vmmon-only'
make[2]: *** [Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[1]: *** [Makefile:117: vmmon.ko] Error 2
make[1]: Leaving directory '/opt/vmware-host-modules/vmware-host-modules/vmmon-only'
make: *** [Makefile:21: vmmon-only] Error 2
make: *** No rule to make target 'vmmon-only/vmmon.ko', needed by 'install'.  Stop.

Recent kernels built with CONFIG_RETHUNK enable objtool checks which
forbid "naked" returns. vmmon's CrossPage_CodePage() ended with
NOT_REACHED_MINIMAL() (i.e. __builtin_unreachable()), which caused:

  error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build

Fix by conditionally replacing the unreachable marker with an explicit
"ret" instruction when CONFIG_RETHUNK is enabled. On kernels without
CONFIG_RETHUNK, the existing logic is preserved.

This allows vmmon to build cleanly on 6.1+ kernels with rethunk enabled
while keeping the old behavior otherwise.
@aurelihein
Copy link
Author

@ziprasidone146939277 & @cncastillo please can you try again ? I have updated the fork

@cncastillo
Copy link

cncastillo commented Sep 20, 2025

Ok, I tried the latest version:

❯ git pull
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 5 (delta 4), reused 5 (delta 4), pack-reused 0 (from 0)
Unpacking objects: 100% (5/5), 995 bytes | 331.00 KiB/s, done.
From github.com:aurelihein/vmware-host-modules
   04c953e..abf2d45  workstation-17.6.4 -> origin/workstation-17.6.4
Updating 04c953e..abf2d45
Fast-forward
 vmmon-only/common/crosspage.c | 9 +++++++++
 1 file changed, 9 insertions(+)

but I get the same error (after make clean)

common/crosspage.o: error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build

Full output:

❯ sudo make
make -C vmmon-only
make[1]: Entering directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
Using kernel build system.
make -C /lib/modules/6.16.3-76061603-generic/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[3]: Entering directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
  You are using:           gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
  CC [M]  linux/driver.o
linux/driver.c:272:1: warning: no previous prototype for ‘LinuxDriverInit’ [-Wmissing-prototypes]
  272 | LinuxDriverInit(void)
      | ^~~~~~~~~~~~~~~
linux/driver.c:340:1: warning: no previous prototype for ‘LinuxDriverExit’ [-Wmissing-prototypes]
  340 | LinuxDriverExit(void)
      | ^~~~~~~~~~~~~~~
  CC [M]  linux/driverLog.o
  CC [M]  linux/hostif.o
linux/hostif.c:2930:1: warning: no previous prototype for ‘HostIFCheckTrackedMPN’ [-Wmissing-prototypes]
 2930 | HostIFCheckTrackedMPN(VMDriver *vm, // IN: The VM instance
      | ^~~~~~~~~~~~~~~~~~~~~
linux/hostif.c:3050:1: warning: no previous prototype for ‘HostIFWritePhysicalWork’ [-Wmissing-prototypes]
 3050 | HostIFWritePhysicalWork(MA ma,             // MA to be written to
      | ^~~~~~~~~~~~~~~~~~~~~~~
linux/hostif.c:3209:1: warning: no previous prototype for ‘HostIFStartTimer’ [-Wmissing-prototypes]
 3209 | HostIFStartTimer(Bool rateChanged,  //IN: Did rate change?
      | ^~~~~~~~~~~~~~~~
  CC [M]  common/apic.o
  CC [M]  common/comport.o
  CC [M]  common/cpuid.o
  CC [M]  common/crosspage.o
common/crosspage.o: error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build
make[5]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/scripts/Makefile.build:287: common/crosspage.o] Error 1
make[5]: *** Deleting file 'common/crosspage.o'
make[4]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:2010: .] Error 2
make[3]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:248: __sub-make] Error 2
make[3]: Leaving directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
make[2]: *** [Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[1]: *** [Makefile:117: vmmon.ko] Error 2
make[1]: Leaving directory '/home/ccp/Downloads/vmware-host-modules/vmmon-only'
make: *** [Makefile:21: vmmon-only] Error 2

@ziprasidone146939277
Copy link

@ziprasidone146939277 & @cncastillo please can you try again ? I have updated the fork

Hello, now the error is:

remote: Enumerating objects: 942, done.
remote: Counting objects: 100% (237/237), done.
remote: Compressing objects: 100% (113/113), done.
remote: Total 942 (delta 175), reused 128 (delta 124), pack-reused 705 (from 1)
Receiving objects: 100% (942/942), 1.01 MiB | 1.98 MiB/s, done.
Resolving deltas: 100% (693/693), done.
branch 'workstation-17.6.4' set up to track 'origin/workstation-17.6.4'.
Switched to a new branch 'workstation-17.6.4'
make -C vmmon-only
make[1]: Entering directory '/opt/vmware-host-modules/vmware-host-modules/vmmon-only'
Using kernel build system.
make -C /lib/modules/6.16.3-76061603-generic/build/include/.. M=$PWD SRCROOT=$PWD/. \
  MODULEBUILDDIR= modules
make[2]: Entering directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[3]: Entering directory '/opt/vmware-host-modules/vmware-host-modules/vmmon-only'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
  You are using:           gcc-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
  CC [M]  linux/driver.o
linux/driver.c:272:1: warning: no previous prototype for ‘LinuxDriverInit’ [-Wmissing-prototypes]
  272 | LinuxDriverInit(void)
      | ^~~~~~~~~~~~~~~
linux/driver.c:340:1: warning: no previous prototype for ‘LinuxDriverExit’ [-Wmissing-prototypes]
  340 | LinuxDriverExit(void)
      | ^~~~~~~~~~~~~~~
  CC [M]  linux/driverLog.o
  CC [M]  linux/hostif.o
linux/hostif.c:2930:1: warning: no previous prototype for ‘HostIFCheckTrackedMPN’ [-Wmissing-prototypes]
 2930 | HostIFCheckTrackedMPN(VMDriver *vm, // IN: The VM instance
      | ^~~~~~~~~~~~~~~~~~~~~
linux/hostif.c:3050:1: warning: no previous prototype for ‘HostIFWritePhysicalWork’ [-Wmissing-prototypes]
 3050 | HostIFWritePhysicalWork(MA ma,             // MA to be written to
      | ^~~~~~~~~~~~~~~~~~~~~~~
linux/hostif.c:3209:1: warning: no previous prototype for ‘HostIFStartTimer’ [-Wmissing-prototypes]
 3209 | HostIFStartTimer(Bool rateChanged,  //IN: Did rate change?
      | ^~~~~~~~~~~~~~~~
  CC [M]  common/apic.o
  CC [M]  common/comport.o
  CC [M]  common/cpuid.o
  CC [M]  common/crosspage.o
common/crosspage.o: error: objtool: CrossPage_CodePage+0x207: 'naked' return found in MITIGATION_RETHUNK build
make[5]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/scripts/Makefile.build:287: common/crosspage.o] Error 1
make[5]: *** Deleting file 'common/crosspage.o'
make[4]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:2010: .] Error 2
make[3]: *** [/usr/src/linux-headers-6.16.3-76061603-generic/Makefile:248: __sub-make] Error 2
make[3]: Leaving directory '/opt/vmware-host-modules/vmware-host-modules/vmmon-only'
make[2]: *** [Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.16.3-76061603-generic'
make[1]: *** [Makefile:117: vmmon.ko] Error 2
make[1]: Leaving directory '/opt/vmware-host-modules/vmware-host-modules/vmmon-only'
make: *** [Makefile:21: vmmon-only] Error 2
make: *** No rule to make target 'vmmon-only/vmmon.ko', needed by 'install'.  Stop.

Thank You

@dreamcurve0
Copy link

Kernel 6.17 is proving problematic. Any solutions or advice?

sudo dkms add -m vmware-host-modules -v ${DKMS_VER}
sudo dkms build -m vmware-host-modules -v ${DKMS_VER}
sudo dkms install -m vmware-host-modules -v ${DKMS_VER}
Deprecated feature: CLEAN (/usr/src/vmware-host-modules-master-6.17/dkms.conf)
Creating symlink /var/lib/dkms/vmware-host-modules/master-6.17/source -> /usr/src/vmware-host-modules-master-6.17
Deprecated feature: CLEAN (/var/lib/dkms/vmware-host-modules/master-6.17/source/dkms.conf)
Sign command: /lib/modules/6.17.7-200.nobara.fc42.x86_64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module(s)...(bad exit status: 2)
Failed command:
make -j22 KERNELRELEASE=6.17.7-200.nobara.fc42.x86_64 -C vmmon-only && make -C vmnet-only

Error! Bad return status for module build on kernel: 6.17.7-200.nobara.fc42.x86_64 (x86_64)
Consult /var/lib/dkms/vmware-host-modules/master-6.17/build/make.log for more information.
Deprecated feature: CLEAN (/var/lib/dkms/vmware-host-modules/master-6.17/source/dkms.conf)
Sign command: /lib/modules/6.17.7-200.nobara.fc42.x86_64/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module(s)...(bad exit status: 2)
Failed command:
make -j22 KERNELRELEASE=6.17.7-200.nobara.fc42.x86_64 -C vmmon-only && make -C vmnet-only

Error! Bad return status for module build on kernel: 6.17.7-200.nobara.fc42.x86_64 (x86_64)
Consult /var/lib/dkms/vmware-host-modules/master-6.17/build/make.log for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants