vmware-host-modules icon indicating copy to clipboard operation
vmware-host-modules copied to clipboard

Vmware 17.6.0 mismatch with vmmon moddule

Open Zeref0xd opened this issue 1 year ago • 18 comments

Screenshot at 2024-09-09 14-12-09 see the errorc

if anyone finds the solution please help me

Zeref0xd avatar Sep 09 '24 08:09 Zeref0xd

Can you please try this patch? https://github.com/bytium/vm-host-modules

bytium avatar Sep 09 '24 12:09 bytium

Can you please try this patch? https://github.com/bytium/vm-host-modules

I tried this only and after that I am getting this error this will work for 17.5.2 not for 17.6.0

Zeref0xd avatar Sep 09 '24 12:09 Zeref0xd

Can you please try this patch? https://github.com/bytium/vm-host-modules

I tried this only and after that I am getting this error this will work for 17.5.2 not for 17.6.0

clone the repo and checkout for correct version like: checkout 17.5.2 checkout 17.6

There is a full instruction written: https://bytium.com/vmware-workstation-host-module-patch-for-debian-and-ubuntu/

bytium avatar Sep 09 '24 13:09 bytium

Tested with Kernel 6.10.8 (kernel.org), and compiled, but with warnings: .................

CC [M]  /tmp/modconfig-2Xo0IS/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/modconfig-2Xo0IS/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/modconfig-2Xo0IS/vmmon-only/bootstrap/vmmblob.o
/tmp/modconfig-2Xo0IS/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Free() falls through to next function PhysTrack_Add()
/tmp/modconfig-2Xo0IS/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Add() falls through to next function PhysTrack_Remove()
/tmp/modconfig-2Xo0IS/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Remove() falls through to next function PhysTrack_Test()
/tmp/modconfig-2Xo0IS/vmmon-only/common/task.o: warning: objtool: .text: unexpected end of section
  LD [M]  /tmp/modconfig-2Xo0IS/vmmon-only/vmmon.o

........

  CC [M]  /tmp/modconfig-2Xo0IS/vmnet-only/vnetEvent.o
  CC [M]  /tmp/modconfig-2Xo0IS/vmnet-only/vnetUserListener.o
/tmp/modconfig-2Xo0IS/vmnet-only/userif.o: warning: objtool: VNetCsumCopyDatagram+0x4d: call to csum_partial_copy_nocheck() with UACCESS enabled
/tmp/modconfig-2Xo0IS/vmnet-only/driver.c:288:1: warning: no previous prototype for ‘LinuxDriverInit’ [-Wmissing-prototypes]
  288 | LinuxDriverInit(void)
      | ^~~~~~~~~~~~~~~
/tmp/modconfig-2Xo0IS/vmnet-only/driver.c:367:1: warning: no previous prototype for ‘LinuxDriverExit’ [-Wmissing-prototypes]
  367 | LinuxDriverExit(void)
      | ^~~~~~~~~~~~~~~
  LD [M]  `/tmp/modconfig-2Xo0IS/vmnet-only/vmnet.o

rgadsdon avatar Sep 09 '24 21:09 rgadsdon

Can you please try this patch? https://github.com/bytium/vm-host-modules

Thanks @bytium for sharing and updating the patch which worked for me.

VMware Workstation Pro 17.6.0 build-24238078 OS: Fedora Linux 40 (Workstation Edition) Kernel: 6.10.7-200.fc40.x86_64 System: Dell Latitude 5580 CPU: Intel i5-7300U (4) @ 3.5GHz

Thanks @mkubecek for the original, enabled me and others to use VMware Workstation Pro 17.5.x.

drumtechphoto avatar Sep 09 '24 21:09 drumtechphoto

Tested with Kernel 6.10.8 (kernel.org), and compiled, but with warnings: .................

CC [M]  /tmp/modconfig-2Xo0IS/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/modconfig-2Xo0IS/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/modconfig-2Xo0IS/vmmon-only/bootstrap/vmmblob.o
/tmp/modconfig-2Xo0IS/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Free() falls through to next function PhysTrack_Add()
/tmp/modconfig-2Xo0IS/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Add() falls through to next function PhysTrack_Remove()
/tmp/modconfig-2Xo0IS/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Remove() falls through to next function PhysTrack_Test()
/tmp/modconfig-2Xo0IS/vmmon-only/common/task.o: warning: objtool: .text: unexpected end of section
  LD [M]  /tmp/modconfig-2Xo0IS/vmmon-only/vmmon.o

........

  CC [M]  /tmp/modconfig-2Xo0IS/vmnet-only/vnetEvent.o
  CC [M]  /tmp/modconfig-2Xo0IS/vmnet-only/vnetUserListener.o
/tmp/modconfig-2Xo0IS/vmnet-only/userif.o: warning: objtool: VNetCsumCopyDatagram+0x4d: call to csum_partial_copy_nocheck() with UACCESS enabled
/tmp/modconfig-2Xo0IS/vmnet-only/driver.c:288:1: warning: no previous prototype for ‘LinuxDriverInit’ [-Wmissing-prototypes]
  288 | LinuxDriverInit(void)
      | ^~~~~~~~~~~~~~~
/tmp/modconfig-2Xo0IS/vmnet-only/driver.c:367:1: warning: no previous prototype for ‘LinuxDriverExit’ [-Wmissing-prototypes]
  367 | LinuxDriverExit(void)
      | ^~~~~~~~~~~~~~~
  LD [M]  `/tmp/modconfig-2Xo0IS/vmnet-only/vmnet.o

This is normal!

bytium avatar Sep 10 '24 14:09 bytium

just wanted to mention that I also got te mismatch, used @bytium stuff on tumbleweed as of today and works!

roelandjansen avatar Sep 10 '24 15:09 roelandjansen

@bytium - I have install Workstation 17.6 and followed the instructions to apply your version / implementation of the vm-host-modules. VMware Workstation appears to be working fine but there is no Virtual Network editor. This is the same issue as existed with nan0desu version @ https://github.com/nan0desu/vmware-host-modules

Is the Virtual Network Editor supposed to work? If not, are there plans to get it to a working state?

Thanks,

Robert

robertstrom avatar Sep 10 '24 16:09 robertstrom

@robertstrom -- the virtual network editor works for me.

roelandjansen avatar Sep 10 '24 18:09 roelandjansen

FC39 w/ 6.10.9-100.fc39.x86_64

I installed VMware Wkst Pro 17.6.0 and then vm-host-modules from https://github.com/bytium/vm-host-modules

$ git clone https://github.com/bytium/vm-host-modules vm-host-modules-17.6.0 $ cd vm-host-modules-17.6.0/ ; make -j 12 ; sudo make install

Now getting the following backtraces when I start machine after install.

However VM's work fine.

[ 9.989396] ------------[ cut here ]------------ [ 9.989397] UBSAN: array-index-out-of-bounds in /home/torel/workspace/VMware-Workstations/vm-host-modules-17.6.0/vmmon-only/common/vmx86.c:3658:38 [ 9.989399] index 0 is out of range for type 'MSRReply [*]' [ 9.989401] CPU: 3 PID: 1223 Comm: modprobe Tainted: G OE 6.10.9-100.fc39.x86_64 #1 [ 9.989403] Hardware name: Dell Inc. Precision 5530/XXXXXXX, BIOS 1.37.0 04/10/2024 [ 9.989405] Call Trace: [ 9.989406] <TASK> [ 9.989407] dump_stack_lvl+0x64/0x80 [ 9.989411] __ubsan_handle_out_of_bounds+0x98/0xd0 [ 9.989415] Vmx86GenFindCommonIntelVTCap+0x1346/0x15f0 [vmmon] [ 9.989429] Vmx86_CheckMSRUniformity+0x681/0x730 [vmmon] [ 9.989442] ? __pfx_LinuxDriverInit+0x10/0x10 [vmmon] [ 9.989453] LinuxDriverInit+0x58/0x1a0 [vmmon] [ 9.989462] ? __pfx_LinuxDriverInit+0x10/0x10 [vmmon] [ 9.989470] do_one_initcall+0x58/0x320 [ 9.989476] do_init_module+0x90/0x270 [ 9.989480] init_module_from_file+0x86/0xc0 [ 9.989486] idempotent_init_module+0x120/0x320 [ 9.989492] __x64_sys_finit_module+0x5e/0xb0 [ 9.989496] do_syscall_64+0x82/0x160 [ 9.989500] ? mas_store_prealloc+0x56/0xd0 [ 9.989505] ? vma_set_page_prot+0x62/0xc0 [ 9.989509] ? mmap_region+0x82c/0xa20 [ 9.989515] ? vm_mmap_pgoff+0x131/0x1c0 [ 9.989519] ? ksys_mmap_pgoff+0x159/0x220 [ 9.989523] ? syscall_exit_to_user_mode+0x72/0x220 [ 9.989527] ? syscall_exit_to_user_mode+0x72/0x220 [ 9.989531] ? do_syscall_64+0x8e/0x160 [ 9.989535] ? exc_page_fault+0x7e/0x180 [ 9.989539] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 9.989542] RIP: 0033:0x7ff40673185d [ 9.989548] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a3 45 0c 00 f7 d8 64 89 01 48 [ 9.989551] RSP: 002b:00007ffc81c84918 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 9.989554] RAX: ffffffffffffffda RBX: 00005646d6c9fc20 RCX: 00007ff40673185d [ 9.989555] RDX: 0000000000000000 RSI: 00005646c4bfafc9 RDI: 0000000000000003 [ 9.989557] RBP: 00007ffc81c849d0 R08: 0000000000000000 R09: 0000000000000002 [ 9.989558] R10: 0000000000000003 R11: 0000000000000246 R12: 00005646c4bfafc9 [ 9.989564] R13: 0000000000040000 R14: 00005646d6ca7b30 R15: 0000000000000000 [ 9.989568] </TASK> [ 9.989568] ---[ end trace ]---

torehl avatar Sep 10 '24 20:09 torehl

@mkubecek's workflow is very simple (the downstream repositories are unmergeable):

  • import the modules source on top of the workstation branch
  • tag with w<version>
  • create a workstation-<version> branch
  • replay all the usual patches

This workflow works fine on 17.6.0 (including 3rd party commits, for example @nan0desu's) - it just causes a few non-major conflicts, and yields a fully working program (at least, I've tested on a 6.10.9 vanilla kernel/Ubuntu 24.04.1).

Having structured histories, makes it possible to upstream patches, if they're useful; here's one for the 17.6.0, feel free to clone it and further patch it - this makes it possible to upstream valuable patches.

64kramsystem avatar Sep 11 '24 11:09 64kramsystem

So, again, I am on debian trixie kernel 6.10.6-amd64. I run a gnome desktop with wayland. I had a perfectly good install running on ws 17.5.2, so I went ahead, like a dope, and upgraded to 17.6.0. After trying just about everything to get vmmon and vmnet to run and support 17.6, including module builds from @bytium , I could not get past the broken pipe message. So I deinstalled 17.6, removed all of the drivers, and then reinstalled 17.5.2. Back to a working configuration and my guests startup fine.

Not sure where the issue was. The modules build without errors, install without errors, and the VMW workstation UI runs fine. It is just that no guest will run. I don't have time to troubleshoot this further and will stay with what works.

Thanks for all of the help.

stueyschnauzer avatar Sep 12 '24 23:09 stueyschnauzer

So, again, I am on debian trixie kernel 6.10.6-amd64. I run a gnome desktop with wayland. I had a perfectly good install running on ws 17.5.2, so I went ahead, like a dope, and upgraded to 17.6.0. After trying just about everything to get vmmon and vmnet to run and support 17.6, including module builds from @bytium , I could not get past the broken pipe message. So I deinstalled 17.6, removed all of the drivers, and then reinstalled 17.5.2. Back to a working configuration and my guests startup fine.

Not sure where the issue was. The modules build without errors, install without errors, and the VMW workstation UI runs fine. It is just that no guest will run. I don't have time to troubleshoot this further and will stay with what works.

Thanks for all of the help.

This is the issue I'm having as well, guess I'm going back to 17.5.2, lesson learned to not let it upgrade itself.

johnafogarty4 avatar Sep 15 '24 15:09 johnafogarty4

I tested Saverio's fork https://github.com/64kramsystem/vmware-host-modules-fork with VMware Wkst 17.6.0 on fedora 39 w/ 6.10.10-100. Which actually works. I haven't checked what patch is lacking, but I expect it is a patch lacking in vmmon-only/common/vmx86.c

Thanks to @64kramsystem

$ git clone https://github.com/64kramsystem/vmware-host-modules-fork vmware-host-modules-fork-17.6.0
Cloning into 'vmware-host-modules-fork-17.6.0'...
remote: Enumerating objects: 4261, done.
remote: Counting objects: 100% (2025/2025), done.
remote: Compressing objects: 100% (431/431), done.
remote: Total 4261 (delta 1812), reused 1724 (delta 1594), pack-reused 2236 (from 1)
Receiving objects: 100% (4261/4261), 1.89 MiB | 48.00 KiB/s, done.
Resolving deltas: 100% (3140/3140), done.

$ make -j 12

$ sudo make install
[sudo] password for torel: 
install -D -t /lib/modules/6.10.10-100.fc39.x86_64/misc vmmon-only/vmmon.ko vmnet-only/vmnet.ko
strip --strip-debug /lib/modules/6.10.10-100.fc39.x86_64/misc/vmmon.ko /lib/modules/6.10.10-100.fc39.x86_64/misc/vmnet.ko
if test -z ""; then /sbin/depmod -a 6.10.10-100.fc39.x86_64; fi

$ sudo systemctl restart vmware 

torehl avatar Sep 18 '24 08:09 torehl

Lacking in the mkubecek/vmware-host-modules seem to be

$ diff -auT ../vmware-host-modules-workstation-17.5.2/vmmon-only/common/vmx86.c vmmon-only/common/vmx86.c 
--- ../vmware-host-modules-workstation-17.5.2/vmmon-only/common/vmx86.c	2024-09-06 18:29:28.620414184 +0200
+++ vmmon-only/common/vmx86.c	2024-09-18 10:24:52.536879644 +0200
@@ -1,5 +1,6 @@
	/*********************************************************
-	 * Copyright (C) 1998-2022 VMware, Inc. All rights reserved.
+	 * Copyright (c) 1998-2024 Broadcom. All Rights Reserved.
+	 * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
	 *
	 * This program is free software; you can redistribute it and/or modify it
	 * under the terms of the GNU General Public License as published by the
@@ -49,7 +50,11 @@
	#include "x86svm.h"
	#include "x86cpuid_asm.h"
	#if defined(__linux__)
+	#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
	#include <linux/timex.h>
+	#else
+	#include <linux/timex.h>
+	#endif
	#endif
	#include "perfctr.h"
	#include "x86vtinstr.h"
@@ -152,6 +157,7 @@
	   MSRNUMVT(MSR_VMX_EPT_VPID,             EPT)                                 \
	   MSRNUMVT(MSR_VMX_VMFUNC,               VMFunc)                              \
	   MSRNUMVT(MSR_VMX_3RD_CTLS,             3rd)                                 \
+	   MSRNUMVT(MSR_VMX_EXIT_CTLS2,           Exit2)                               \
	   MSRNUMVT2(MSR_VMX_PINBASED_CTLS,       Ctls)                                \
	   MSRNUMVT2(MSR_VMX_PROCBASED_CTLS,      Ctls)                                \
	   MSRNUMVT2(MSR_VMX_EXIT_CTLS,           Ctls)                                \

torehl avatar Sep 18 '24 08:09 torehl

please also take into account a detail that is often overlooked first - when using secure boot, you need to sign these drivers: vmmon and vmnet - there are many problems described here with version 17.5.2/17.6.0 and the failure to create a vmware virtual network, which is why it occurs...

build000 avatar Sep 18 '24 19:09 build000

Tested with Kernel 6.10.8 (kernel.org), and compiled, but with warnings: .................

CC [M]  /tmp/modconfig-2Xo0IS/vmmon-only/bootstrap/monLoader.o
  CC [M]  /tmp/modconfig-2Xo0IS/vmmon-only/bootstrap/monLoaderVmmon.o
  CC [M]  /tmp/modconfig-2Xo0IS/vmmon-only/bootstrap/vmmblob.o
/tmp/modconfig-2Xo0IS/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Free() falls through to next function PhysTrack_Add()
/tmp/modconfig-2Xo0IS/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Add() falls through to next function PhysTrack_Remove()
/tmp/modconfig-2Xo0IS/vmmon-only/common/phystrack.o: warning: objtool: PhysTrack_Remove() falls through to next function PhysTrack_Test()
/tmp/modconfig-2Xo0IS/vmmon-only/common/task.o: warning: objtool: .text: unexpected end of section
  LD [M]  /tmp/modconfig-2Xo0IS/vmmon-only/vmmon.o

........

  CC [M]  /tmp/modconfig-2Xo0IS/vmnet-only/vnetEvent.o
  CC [M]  /tmp/modconfig-2Xo0IS/vmnet-only/vnetUserListener.o
/tmp/modconfig-2Xo0IS/vmnet-only/userif.o: warning: objtool: VNetCsumCopyDatagram+0x4d: call to csum_partial_copy_nocheck() with UACCESS enabled
/tmp/modconfig-2Xo0IS/vmnet-only/driver.c:288:1: warning: no previous prototype for ‘LinuxDriverInit’ [-Wmissing-prototypes]
  288 | LinuxDriverInit(void)
      | ^~~~~~~~~~~~~~~
/tmp/modconfig-2Xo0IS/vmnet-only/driver.c:367:1: warning: no previous prototype for ‘LinuxDriverExit’ [-Wmissing-prototypes]
  367 | LinuxDriverExit(void)
      | ^~~~~~~~~~~~~~~
  LD [M]  `/tmp/modconfig-2Xo0IS/vmnet-only/vmnet.o

The warnings show up for vmnet because they're missing the static designation for LinuxDriverInit and LinuxDriverExit, which was previously addressed in commit 2c6d66f3f1947384038b765c897b102ecdb18298 due to a previous version of the drivers having unclean/conflicting code. The warnings don't show up for vmmon since the equivalent functions are already set as static, and the functions don't conflict in bytium's version. It's probably okay to ignore the warnings.

On the safe side, you could go into the vmnet-only/driver.c file and add static before int on line 287 and void on line 366, which would restrict the scope of the functions and address the warning. Those lines should end up as:

287        static int
288        LinuxDriverInit(void)
289        {
366        static void
367        LinuxDriverExit(void)
368        {

alairon avatar Sep 24 '24 19:09 alairon

Still "Version mismatch with vmmon module: expecting 417.0, got 416.0." for 17.6 on kernel 6.9.3 after applying patch.

EDIT: found a fix and posted here.

JulioQc avatar Sep 26 '24 17:09 JulioQc