Open rgadsdon opened 7 months ago
Maybe the following will help (untested):
--- a/vmnet-only/vmnetInt.h
+++ b/vmnet-only/vmnetInt.h
@@ -41,8 +41,13 @@
compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \
dev_queue_xmit(skb) \
)
-#define dev_lock_list() read_lock(&dev_base_lock)
-#define dev_unlock_list() read_unlock(&dev_base_lock)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0)
+# define dev_lock_list() rcu_read_lock()
+# define dev_unlock_list() rcu_read_unlock()
+#else
+# define dev_lock_list() read_lock(&dev_base_lock)
+# define dev_unlock_list() read_unlock(&dev_base_lock)
+#endif
extern struct proto vmnet_proto;
I'm aware if this build failure but unfortunatley I haven't found time to look into it yet. I'll have to check what exactly does the code need to take dev_base_lock
and what would be the right synchronization to use on new kernels instead.
Maybe the following will help (untested):
--- a/vmnet-only/vmnetInt.h +++ b/vmnet-only/vmnetInt.h @@ -41,8 +41,13 @@ compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \ dev_queue_xmit(skb) \ ) -#define dev_lock_list() read_lock(&dev_base_lock) -#define dev_unlock_list() read_unlock(&dev_base_lock) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0) +# define dev_lock_list() rcu_read_lock() +# define dev_unlock_list() rcu_read_unlock() +#else +# define dev_lock_list() read_lock(&dev_base_lock) +# define dev_unlock_list() read_unlock(&dev_base_lock) +#endif extern struct proto vmnet_proto;
Applied this, and vmnet compiled successfully with 6.9-rc1, and brief test with Win10 Guest (F40/Plasma/X11 host) showed everything appears to be working as it should.. Thanks..
@rgadsdon Maybe I'm too much of a n00b, but where did you apply this?
@rgadsdon Maybe I'm too much of a n00b, but where did you apply this?
Have you been able to figure out where to apply this change? Thanks. I'm on 6.8.4-200.fc39.x86_64 hopefully it will work.
If I understand correctly, The /vmnet-only/vmnetInt.h file must be edited and some lines commented out but the problem is that in vmware-host-modules-w17.5.1/vmnet-only/vmnetInt.h there aren't such lines, which makes it impossible to follow the tasks.
So in my case
$ vmware --version
VMware Workstation 17.5.1 build-23298084
$ uname -r
6.8.4-200.fc39.x86_64
I end up with a bunch of problems:
$ sudo vmware-modconfig --console --install-all
[AppLoader] GLib does not have GSettings support.
Stopping vmware (via systemctl): [ OK ]
make: Entering directory '/tmp/modconfig-1WC30M/vmmon-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/6.8.4-200.fc39.x86_64/build/include/.. M=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/kernels/6.8.4-200.fc39.x86_64'
CC [M] /tmp/modconfig-1WC30M/vmmon-only/linux/driver.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/linux/driverLog.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/linux/hostif.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/common/apic.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/common/comport.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/common/cpuid.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/common/crosspage.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/common/memtrack.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/common/moduleloop.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/common/phystrack.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/common/sharedAreaVmmon.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/common/statVarsVmmon.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/common/task.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/common/vmx86.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/bootstrap/bootstrap.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/bootstrap/monLoader.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/bootstrap/monLoaderVmmon.o
CC [M] /tmp/modconfig-1WC30M/vmmon-only/bootstrap/vmmblob.o
/tmp/modconfig-1WC30M/vmmon-only/common/task.c:548:1: warning: no previous prototype for ‘TaskGetFlatWriteableDataSegment’ [-Wmissing-prototypes]
548 | TaskGetFlatWriteableDataSegment(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/modconfig-1WC30M/vmmon-only/common/vmx86.c:52:
./arch/x86/include/asm/timex.h: In function ‘random_get_entropy’:
./arch/x86/include/asm/timex.h:12:24: error: implicit declaration of function ‘random_get_entropy_fallback’; did you mean ‘random_get_entropy’? [-Werror=implicit-function-declaration]
12 | return random_get_entropy_fallback();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| random_get_entropy
/tmp/modconfig-1WC30M/vmmon-only/common/vmx86.c: At top level:
/tmp/modconfig-1WC30M/vmmon-only/common/vmx86.c:700:1: warning: no previous prototype for ‘Vmx86FreeVMDriver’ [-Wmissing-prototypes]
700 | Vmx86FreeVMDriver(VMDriver *vm)
| ^~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/common/vmx86.c:733:1: warning: no previous prototype for ‘Vmx86AllocVMDriver’ [-Wmissing-prototypes]
733 | Vmx86AllocVMDriver(uint32 numVCPUs)
| ^~~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/linux/driver.c:271:1: warning: no previous prototype for ‘LinuxDriverInit’ [-Wmissing-prototypes]
271 | LinuxDriverInit(void)
| ^~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/linux/driver.c:339:1: warning: no previous prototype for ‘LinuxDriverExit’ [-Wmissing-prototypes]
339 | LinuxDriverExit(void)
| ^~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/linux/hostif.c:2926:1: warning: no previous prototype for ‘HostIFCheckTrackedMPN’ [-Wmissing-prototypes]
2926 | HostIFCheckTrackedMPN(VMDriver *vm, // IN: The VM instance
| ^~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/linux/hostif.c:3046:1: warning: no previous prototype for ‘HostIFWritePhysicalWork’ [-Wmissing-prototypes]
3046 | HostIFWritePhysicalWork(MA ma, // MA to be written to
| ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmmon-only/linux/hostif.c:3205:1: warning: no previous prototype for ‘HostIFStartTimer’ [-Wmissing-prototypes]
3205 | HostIFStartTimer(Bool rateChanged, //IN: Did rate change?
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /tmp/modconfig-1WC30M/vmmon-only/common/vmx86.o] Error 1
make[2]: *** [/usr/src/kernels/6.8.4-200.fc39.x86_64/Makefile:1939: /tmp/modconfig-1WC30M/vmmon-only] Error 2
make[1]: *** [Makefile:252: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.8.4-200.fc39.x86_64'
make: *** [Makefile:117: vmmon.ko] Error 2
make: Leaving directory '/tmp/modconfig-1WC30M/vmmon-only'
make: Entering directory '/tmp/modconfig-1WC30M/vmnet-only'
Using kernel build system.
/usr/bin/make -C /lib/modules/6.8.4-200.fc39.x86_64/build/include/.. M=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/src/kernels/6.8.4-200.fc39.x86_64'
CC [M] /tmp/modconfig-1WC30M/vmnet-only/driver.o
CC [M] /tmp/modconfig-1WC30M/vmnet-only/hub.o
CC [M] /tmp/modconfig-1WC30M/vmnet-only/userif.o
CC [M] /tmp/modconfig-1WC30M/vmnet-only/netif.o
CC [M] /tmp/modconfig-1WC30M/vmnet-only/bridge.o
CC [M] /tmp/modconfig-1WC30M/vmnet-only/procfs.o
CC [M] /tmp/modconfig-1WC30M/vmnet-only/smac_compat.o
CC [M] /tmp/modconfig-1WC30M/vmnet-only/smac.o
CC [M] /tmp/modconfig-1WC30M/vmnet-only/vnetEvent.o
CC [M] /tmp/modconfig-1WC30M/vmnet-only/vnetUserListener.o
/tmp/modconfig-1WC30M/vmnet-only/userif.c:1091:1: warning: no previous prototype for ‘VNetUserIf_Create’ [-Wmissing-prototypes]
1091 | VNetUserIf_Create(VNetPort **ret) // OUT
| ^~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmnet-only/netif.c:173:1: warning: no previous prototype for ‘VNetNetIf_Create’ [-Wmissing-prototypes]
173 | VNetNetIf_Create(char *devName, // IN:
| ^~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmnet-only/vnetUserListener.c:87:1: warning: no previous prototype for ‘VNetUserListener_Create’ [-Wmissing-prototypes]
87 | VNetUserListener_Create(uint32 classMask, // IN: the listener's class mask
| ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmnet-only/bridge.c:258:1: warning: no previous prototype for ‘VNetBridge_Create’ [-Wmissing-prototypes]
258 | VNetBridge_Create(const char *devName, // IN: name of device (e.g., "eth0")
| ^~~~~~~~~~~~~~~~~
/tmp/modconfig-1WC30M/vmnet-only/bridge.c:1411:1: warning: no previous prototype for ‘VNetBridgeSendLargePacket’ [-Wmissing-prototypes]
1411 | VNetBridgeSendLargePacket(struct sk_buff *skb, // IN: packet to split
| ^~~~~~~~~~~~~~~~~~~~~~~~~
LD [M] /tmp/modconfig-1WC30M/vmnet-only/vmnet.o
/tmp/modconfig-1WC30M/vmnet-only/vmnet.o: warning: objtool: VNetCsumAndCopyToUser+0x28: call to csum_partial_copy_nocheck() with UACCESS enabled
/tmp/modconfig-1WC30M/vmnet-only/vmnet.o: warning: objtool: init_module(): not an indirect call target
/tmp/modconfig-1WC30M/vmnet-only/vmnet.o: warning: objtool: cleanup_module(): not an indirect call target
MODPOST /tmp/modconfig-1WC30M/vmnet-only/Module.symvers
CC [M] /tmp/modconfig-1WC30M/vmnet-only/vmnet.mod.o
LD [M] /tmp/modconfig-1WC30M/vmnet-only/vmnet.ko
BTF [M] /tmp/modconfig-1WC30M/vmnet-only/vmnet.ko
Skipping BTF generation for /tmp/modconfig-1WC30M/vmnet-only/vmnet.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/kernels/6.8.4-200.fc39.x86_64'
/usr/bin/make -C $PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= postbuild
make[1]: Entering directory '/tmp/modconfig-1WC30M/vmnet-only'
make[1]: 'postbuild' is up to date.
make[1]: Leaving directory '/tmp/modconfig-1WC30M/vmnet-only'
cp -f vmnet.ko ./../vmnet.o
make: Leaving directory '/tmp/modconfig-1WC30M/vmnet-only'
Unable to install all modules. See log for details.
Maybe the following will help (untested)...
I applied the patch mentioned in https://github.com/mkubecek/vmware-host-modules/issues/239#issuecomment-2018855445 but sadly with no luck :(
vmware-host-modules-w17.5.1 with kernel 6.8.7-300 (FC40).
Am seeing a few warnings and then failure with this error:
CC [M] /tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.o
In file included from /tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:52:
./arch/x86/include/asm/timex.h: In function ‘random_get_entropy’:
./arch/x86/include/asm/timex.h:12:24: error: implicit declaration of function ‘random_get_entropy_fallback’; did you mean ‘random_get_entropy’? [-Wimplicit-function-declaration]
12 | return random_get_entropy_fallback();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| random_get_entropy
/tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c: At top level:
/tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:700:1: warning: no previous prototype for ‘Vmx86FreeVMDriver’ [-Wmissing-prototypes]
700 | Vmx86FreeVMDriver(VMDriver *vm)
| ^~~~~~~~~~~~~~~~~
/tmp/vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:733:1: warning: no previous prototype for ‘Vmx86AllocVMDriver’ [-Wmissing-prototypes]
733 | Vmx86AllocVMDriver(uint32 numVCPUs)
| ^~~~~~~~~~~~~~~~~~
Salut,
I had the same issue and fixed it by changing the line in error (vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:52) from #include <asm/timex.h>
to #include <linux/timex.h>
I had the same issue and fixed it by changing the line in error (vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:52) from
#include <asm/timex.h>
to#include <linux/timex.h>
Yes - that did the trick - thank you!
Salut,
I had the same issue and fixed it by changing the line in error (vmware-host-modules-w17.5.1/vmmon-only/common/vmx86.c:52) from
#include <asm/timex.h>
to#include <linux/timex.h>
I made it, vmmon is fully loaded and working as expected, however, vmnet is loaded but It's not working very well:
This is the output of vmware.service:
sudo systemctl status vmware
× vmware.service - VMware host virtualization and network services for Workstation
Loaded: loaded (/usr/lib/systemd/system/vmware.service; enabled; preset: disabled)
Active: failed (Result: exit-code) since Wed 2024-05-01 15:50:28 CEST; 3min 30s ago
Process: 699 ExecStart=/usr/lib/vmware/scripts/init/vmware start (code=exited, status=1/FAILURE)
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb systemd[1]: Starting vmware.service...
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]: Starting VMware services:
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]: Virtual machine monitor - done
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]: Virtual machine communication interface - done
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]: VM communication interface socket family - done
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]: Virtual ethernet - failed
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb vmware[699]: VMware Authentication Daemon - done
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb systemd[1]: vmware.service: Control process exited, code=exited, status=1/FAILURE
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb systemd[1]: vmware.service: Failed with result 'exit-code'.
May 01 15:50:28 clr-eac58264a0b9417dba05ef16f70616bb systemd[1]: Failed to start vmware.service.
When I try to load vmnet module I get this:
sudo modprobe -v vmnet
insmod /lib/modules/6.8.8-1430.native/misc/vmnet.ko
It keeps trying to load the module kernel but no expires.
It's freaky, because the module seems loaded:
sincorchetes@clr-eac58264a0b9417dba05ef16f70616bb~ $ modinfo vmnet
filename: /lib/modules/6.8.8-1430.native/misc/vmnet.ko
supported: external
license: GPL v2
description: VMware Virtual Networking Driver.
author: VMware, Inc.
depends:
retpoline: Y
name: vmnet
vermagic: 6.8.8-1430.native SMP mod_unload
parm: vnet_max_qlen:Maximum queue length of the vmnet, default is 1024, maximum is 1024 (unit)
sincorchetes@clr-eac58264a0b9417dba05ef16f70616bb~ $ lsmod |grep vmnet
vmnet 73728 1
It's ClearLinux 6.8.8-1430.native kernel with VMware workstation 17.5.1
Yeah, while the compile works, and my VM seems to run ok, there's a pile of errors in syslog. The module seems to break the host system as it refuses to shutdown cleanly after modules are loaded ☹️
dmesg output
[ 6.147064] initcall parport_pc_init+0x0/0xfc0 [parport_pc] returned 0 after 1005 usecs
[ 6.148396] calling ppdev_init+0x0/0xfc0 [ppdev] @ 586
[ 6.148756] calling init_module+0x0/0x140 [vmnet] @ 760
[ 6.148766] Missing ENDBR: init_module+0x0/0x140 [vmnet]
[ 6.148929] ppdev: user-space parallel port driver
[ 6.149064] ------------[ cut here ]------------
[ 6.149079] kernel BUG at arch/x86/kernel/cet.c:102!
[ 6.149079] initcall ppdev_init+0x0/0xfc0 [ppdev] returned 0 after 313 usecs
[ 6.149341] invalid opcode: 0000 [#1] SMP NOPTI
[ 6.149634] CPU: 4 PID: 760 Comm: modprobe Tainted: G OE 6.8.8-1430.native #1
[ 6.150084] Hardware name: HP HP ProBook 440 G8 Notebook PC/8A74, BIOS T87 Ver. 01.09.01 05/05/2022
[ 6.150569] RIP: 0010:exc_control_protection+0x2ed/0x300
[ 6.150865] Code: 00 01 48 c7 c2 60 25 02 9e 81 e6 ff 7f 00 00 83 fe 05 0f 87 05 ff ff ff e9 f4 fe ff ff 48 c7 43 50 00 00 00 00 e9 30 fe ff ff <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 90 90 90
[ 6.151867] RSP: 0018:ffffac9e81eb3b00 EFLAGS: 00010002
[ 6.152157] RAX: 000000000000002c RBX: ffffac9e81eb3b38 RCX: 0000000000000000
[ 6.152549] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[ 6.152940] RBP: ffffac9e81eb3b28 R08: 0000000000000000 R09: 0000000000000000
[ 6.153331] R10: 42444e4520676e69 R11: 0000000000000000 R12: 0000000000000000
[ 6.153722] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
[ 6.154115] FS: 000055fc4dd8b740(0000) GS:ffff88eb9f900000(0000) knlGS:0000000000000000
[ 6.154556] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 6.154875] CR2: 000055fc4dd8a21a CR3: 0000000108f12005 CR4: 0000000000f70ef0
[ 6.155268] PKRU: 55555554
[ 6.155424] Call Trace:
[ 6.155572] <TASK>
[ 6.155700] ? die+0x14c/0x180
[ 6.155879] ? exc_control_protection+0x2ed/0x300
[ 6.156144] ? exc_invalid_op+0xfe/0x1c0
[ 6.156368] ? asm_exc_invalid_op+0x1f/0x40
[ 6.156605] ? exc_control_protection+0x2ed/0x300
[ 6.156869] asm_exc_control_protection+0x2b/0x40
[ 6.157134] RIP: 0010:init_module+0x0/0x140 [vmnet]
[ 6.157411] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <66> 0f 1f 00 55 48 89 e5 53 e8 32 66 00 00 85 c0 0f 85 10 01 00 00
[ 6.158415] RSP: 0018:ffffac9e81eb3be0 EFLAGS: 00010246
[ 6.158708] RAX: 0000000000000000 RBX: ffffffffc130a300 RCX: 0000000000000000
[ 6.159102] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[ 6.159494] RBP: ffffac9e81eb3c48 R08: 0000000000000000 R09: 0000000000000000
[ 6.159887] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[ 6.160277] R13: 0000000000000000 R14: ffffffffc1316640 R15: 0000000000000000
[ 6.160673] ? __pfx_init_module+0x40/0x40 [vmnet]
[ 6.160944] ? do_one_initcall+0x44/0x300
[ 6.161168] ? kmalloc_trace+0x1c5/0x3c0
[ 6.161388] do_init_module+0x63/0x240
[ 6.161602] load_module+0x11e2/0x1300
[ 6.161815] init_module_from_file+0x82/0xc0
[ 6.162051] ? init_module_from_file+0x82/0xc0
[ 6.162297] idempotent_init_module+0xf8/0x200
[ 6.162542] __x64_sys_finit_module+0x5d/0xc0
[ 6.162789] x64_sys_call+0x206e/0x22c0
[ 6.163001] do_syscall_64+0x61/0x1c0
[ 6.163205] entry_SYSCALL_64_after_hwframe+0x60/0x68
[ 6.163484] RIP: 0033:0x55fc4db209d9
[ 6.163687] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 0f e4 0d 00 f7 d8 64 89 01 48
[ 6.164677] RSP: 002b:00007fff56008ac8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[ 6.165086] RAX: ffffffffffffffda RBX: 000055fc4fc10cd0 RCX: 000055fc4db209d9
[ 6.165470] RDX: 0000000000000000 RSI: 000055fc4ddef6e7 RDI: 0000000000000003
[ 6.165854] RBP: 0000000000000000 R08: 000055fc4dbffb20 R09: ffffffffffffff90
[ 6.166238] R10: 0000000000000040 R11: 0000000000000246 R12: 0000000000040000
[ 6.166624] R13: 000055fc4ddef6e7 R14: 000055fc4fc10c70 R15: 0000000000000000
[ 6.167012] </TASK>
[ 6.167140] Modules linked in: vmnet(OE+) ppdev parport_pc snd_soc_dmic parport vmw_vsock_vmci_transport vsock snd_sof_pci_intel_tgl snd_sof_intel_hda_common soundwire_intel vmw_vmci snd_sof_intel_hda_mlink soundwire_cadence snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_hdac_hda snd_hda_ext_core joydev snd_soc_acpi_intel_match snd_soc_acpi vmmon(OE) soundwire_generic_allocation snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine soundwire_bus hid_multitouch snd_hda_intel snd_intel_dspcfg uvcvideo snd_intel_sdw_acpi uvc snd_hda_codec hp_wmi rtw88_8822ce(+) videobuf2_vmalloc crct10dif_pclmul ee1004 mei_pxp mei_hdcp crc32_pclmul rtw88_8822c videobuf2_memops platform_profile polyval_clmulni snd_hda_core btusb btrtl rtw88_pci xe videobuf2_v4l2 polyval_generic ghash_clmulni_intel btintel snd_hwdep rtw88_core processor_thermal_device_pci_legacy btbcm snd_pcm processor_thermal_device btmtk processor_thermal_wt_hint bluetooth mac80211 videodev snd_timer processor_thermal_rfim r8169 efi_pstore
[ 6.167188] ucsi_acpi processor_thermal_rapl i2c_i801 typec_ucsi drm_gpuvm snd intel_lpss_pci drm_exec realtek videobuf2_common processor_thermal_wt_req ecdh_generic wmi_bmof mc ecc cfg80211 processor_thermal_power_floor i2c_smbus soundcore intel_lpss mei_me gpu_sched typec processor_thermal_mbox mdio_devres rfkill libphy mei idma64 drm_suballoc_helper intel_soc_dts_iosf roles battery i2c_hid_acpi thermal i2c_hid intel_pmc_core int3403_thermal pmt_telemetry int340x_thermal_zone pmt_class intel_vsec int3400_thermal acpi_thermal_rel pinctrl_tigerlake intel_hid wireless_hotkey ac serio_raw atkbd libps2 i8042
[ 6.174788] ---[ end trace 0000000000000000 ]---
[ 6.176879] RIP: 0010:exc_control_protection+0x2ed/0x300
[ 6.179011] Code: 00 01 48 c7 c2 60 25 02 9e 81 e6 ff 7f 00 00 83 fe 05 0f 87 05 ff ff ff e9 f4 fe ff ff 48 c7 43 50 00 00 00 00 e9 30 fe ff ff <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 90 90 90
[ 6.181841] RSP: 0018:ffffac9e81eb3b00 EFLAGS: 00010002
[ 6.184025] RAX: 000000000000002c RBX: ffffac9e81eb3b38 RCX: 0000000000000000
[ 6.186277] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[ 6.188502] RBP: ffffac9e81eb3b28 R08: 0000000000000000 R09: 0000000000000000
[ 6.190730] R10: 42444e4520676e69 R11: 0000000000000000 R12: 0000000000000000
[ 6.192967] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
[ 6.195180] FS: 000055fc4dd8b740(0000) GS:ffff88eb9f900000(0000) knlGS:0000000000000000
[ 6.197424] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 6.199506] CR2: 000055fc4dd8a21a CR3: 0000000108f12005 CR4: 0000000000f70ef0
[ 6.201644] PKRU: 55555554
[ 6.203629] note: modprobe[760] exited with irqs disabled
same on 6.9rc7, asm/timex.h to linux/timex.h seems haven't done the trick
I see now the line 52 comes already modified
any news? this is my output on this morning compilation:
(base) ferran@z590i:~/Documents/PersonalPackages$ cd vmware-host-modules/ (base) ferran@z590i:~/Documents/PersonalPackages/vmware-host-modules$ git checkout workstation-17.5.1 branch 'workstation-17.5.1' set up to track 'origin/workstation-17.5.1'. Switched to a new branch 'workstation-17.5.1' (base) ferran@z590i:~/Documents/PersonalPackages/vmware-host-modules$ make make -C vmmon-only make -C vmnet-only make[1]: Entering directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only' make[1]: Entering directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only' Using kernel build system. Using kernel build system. make -C /lib/modules/6.9.0-tkg-custom/build/include/.. M=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make[2]: Entering directory '/usr/src/linux-headers-6.9.0-tkg-custom' make -C /lib/modules/6.9.0-tkg-custom/build/include/.. M=$PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= modules make[2]: Entering directory '/usr/src/linux-headers-6.9.0-tkg-custom' CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/linux/driver.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/linux/driverLog.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/linux/hostif.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/apic.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/comport.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/cpuid.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/crosspage.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/memtrack.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/moduleloop.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/phystrack.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/sharedAreaVmmon.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/statVarsVmmon.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/driver.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/hub.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/task.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/common/vmx86.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/bootstrap/bootstrap.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/bootstrap/monLoader.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/userif.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/bootstrap/monLoaderVmmon.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/bootstrap/vmmblob.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/netif.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/procfs.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/smac_compat.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/smac.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/vnetEvent.o CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/vnetUserListener.o LD [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/vmmon.o MODPOST /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/Module.symvers CC [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/vmmon.mod.o In file included from ./include/linux/spinlock.h:305, from ./include/linux/sched.h:2138, from /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c:25: /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c: In function ‘VNetBridgeReceiveFromVNet’: /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/vmnetInt.h:44:39: error: ‘dev_base_lock’ undeclared (first use in this function); did you mean ‘device_lock’? 44 | #define dev_lock_list() read_lock(&dev_base_lock) | ^~~~~~~~~~~~~ ./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’ 56 | #define read_lock(lock) _raw_read_lock(lock) | ^~~~ /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c:587:4: note: in expansion of macro ‘dev_lock_list’ 587 | dev_lock_list(); | ^~~~~~~~~~~~~ /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/vmnetInt.h:44:39: note: each undeclared identifier is reported only once for each function it appears in 44 | #define dev_lock_list() read_lock(&dev_base_lock) | ^~~~~~~~~~~~~ ./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’ 56 | #define read_lock(lock) _raw_read_lock(lock) | ^~~~ /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c:587:4: note: in expansion of macro ‘dev_lock_list’ 587 | dev_lock_list(); | ^~~~~~~~~~~~~ /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c: In function ‘VNetBridgeUp’: /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/vmnetInt.h:44:39: error: ‘dev_base_lock’ undeclared (first use in this function); did you mean ‘device_lock’? 44 | #define dev_lock_list() read_lock(&dev_base_lock) | ^~~~~~~~~~~~~ ./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’ 56 | #define read_lock(lock) _raw_read_lock(lock) | ^~~~ /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.c:902:4: note: in expansion of macro ‘dev_lock_list’ 902 | dev_lock_list(); | ^~~~~~~~~~~~~ make[4]: *** [scripts/Makefile.build:244: /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only/bridge.o] Error 1 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/usr/src/linux-headers-6.9.0-tkg-custom/Makefile:1922: /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only] Error 2 make[2]: *** [Makefile:240: __sub-make] Error 2 make[2]: Leaving directory '/usr/src/linux-headers-6.9.0-tkg-custom' make[1]: *** [Makefile:117: vmnet.ko] Error 2 make[1]: Leaving directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmnet-only' make: *** [Makefile:21: vmnet-only] Error 2 make: *** Waiting for unfinished jobs.... LD [M] /home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only/vmmon.ko make[2]: Leaving directory '/usr/src/linux-headers-6.9.0-tkg-custom' make -C $PWD SRCROOT=$PWD/. \ MODULEBUILDDIR= postbuild make[2]: Entering directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only' make[2]: 'postbuild' is up to date. make[2]: Leaving directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only' cp -f vmmon.ko ./../vmmon.o make[1]: Leaving directory '/home/ferran/Documents/PersonalPackages/vmware-host-modules/vmmon-only'
I'm sorry, I was quite busy last few weeks. I hope to get to fixing this within next few days.
I'm sorry, I was quite busy last few weeks. I hope to get to fixing this within next few days.
Thanks, looking forward to a fix. Heads up that the kernel version 6.9.1-arch1-1 is now in stable under arch, so you may see a couple more people showing up with this.
Maybe the following will help (untested):
--- a/vmnet-only/vmnetInt.h +++ b/vmnet-only/vmnetInt.h @@ -41,8 +41,13 @@ compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \ dev_queue_xmit(skb) \ ) -#define dev_lock_list() read_lock(&dev_base_lock) -#define dev_unlock_list() read_unlock(&dev_base_lock) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0) +# define dev_lock_list() rcu_read_lock() +# define dev_unlock_list() rcu_read_unlock() +#else +# define dev_lock_list() read_lock(&dev_base_lock) +# define dev_unlock_list() read_unlock(&dev_base_lock) +#endif extern struct proto vmnet_proto;
That worked as far as I can tell, nothing complaining in dmesg, and vmware seems to be working.
@rgadsdon perfect thank you a lot
Maybe the following will help (untested):
--- a/vmnet-only/vmnetInt.h +++ b/vmnet-only/vmnetInt.h @@ -41,8 +41,13 @@ compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \ dev_queue_xmit(skb) \ ) -#define dev_lock_list() read_lock(&dev_base_lock) -#define dev_unlock_list() read_unlock(&dev_base_lock) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0) +# define dev_lock_list() rcu_read_lock() +# define dev_unlock_list() rcu_read_unlock() +#else +# define dev_lock_list() read_lock(&dev_base_lock) +# define dev_unlock_list() read_unlock(&dev_base_lock) +#endif extern struct proto vmnet_proto;
Applied this, and vmnet compiled successfully with 6.9-rc1, and brief test with Win10 Guest (F40/Plasma/X11 host) showed everything appears to be working as it should.. Thanks..
it works @LightJack05 :: thanks
tried on Kernel 6.9 :: I'm gonna compile 6.9.1
nan0desu's patch works for me (VMware Workstation Pro 17.5.2 and kernel 6.9.1-1 on openSUSE Tumbleweed) Thank you!!
Please, I need help on this
:~ $ uname -a
Linux archlinux 6.9.1-arch1-1 #1
vmware version is 17.5.2
$ sudo vmware-modconfig --console --install-all
[AppLoader] GLib does not have GSettings support.
make: Entering directory '/tmp/modconfig-2R4V5P/vmmon-only'
Using kernel build system.
/sbin/make -C /lib/modules/6.9.1-arch1-1/build/include/.. M=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/lib/modules/6.9.1-arch1-1/build'
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/linux/driver.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/linux/driverLog.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/common/apic.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/common/comport.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/common/cpuid.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/common/crosspage.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/common/memtrack.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/common/moduleloop.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/common/phystrack.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/common/sharedAreaVmmon.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/common/statVarsVmmon.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/common/task.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/bootstrap/bootstrap.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/bootstrap/monLoader.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/bootstrap/monLoaderVmmon.o
CC [M] /tmp/modconfig-2R4V5P/vmmon-only/bootstrap/vmmblob.o
In file included from /tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.c:52:
./arch/x86/include/asm/timex.h: In function ‘random_get_entropy’:
./arch/x86/include/asm/timex.h:12:24: error: implicit declaration of function ‘random_get_entropy_fallback’; did you mean ‘random_get_entropy’? [-Wimplicit-function-declaration]
12 | return random_get_entropy_fallback();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| random_get_entropy
/tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.c: At top level:
/tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.c:700:1: warning: no previous prototype for ‘Vmx86FreeVMDriver’ [-Wmissing-prototypes]
700 | Vmx86FreeVMDriver(VMDriver *vm)
| ^~~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.c:733:1: warning: no previous prototype for ‘Vmx86AllocVMDriver’ [-Wmissing-prototypes]
733 | Vmx86AllocVMDriver(uint32 numVCPUs)
| ^~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:244: /tmp/modconfig-2R4V5P/vmmon-only/common/vmx86.o] Error 1
make[3]: *** Waiting for unfinished jobs....
/tmp/modconfig-2R4V5P/vmmon-only/common/task.c:548:1: warning: no previous prototype for ‘TaskGetFlatWriteableDataSegment’ [-Wmissing-prototypes]
548 | TaskGetFlatWriteableDataSegment(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.c:76:
/tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h: In function ‘PgtblVa2MPNLocked’:
/tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h:60:8: error: implicit declaration of function ‘pgd_large’; did you mean ‘pgd_page’? [-Wimplicit-function-declaration]
60 | if (pgd_large(*pgd)) {
| ^~~~~~~~~
| pgd_page
In file included from /tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h:25:
/tmp/modconfig-2R4V5P/vmmon-only/./include/compat_pgtable.h:39:45: error: implicit declaration of function ‘p4d_large’; did you mean ‘p4d_page’? [-Wimplicit-function-declaration]
39 | # define compat_p4d_large(p4d) p4d_large(p4d)
| ^~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h:70:8: note: in expansion of macro ‘compat_p4d_large’
70 | if (compat_p4d_large(*p4d)) {
| ^~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h:78:11: error: implicit declaration of function ‘pud_large’; did you mean ‘pud_page’? [-Wimplicit-function-declaration]
78 | if (pud_large(*pud)) {
| ^~~~~~~~~
| pud_page
/tmp/modconfig-2R4V5P/vmmon-only/linux/driver.c:271:1: warning: no previous prototype for ‘LinuxDriverInit’ [-Wmissing-prototypes]
271 | LinuxDriverInit(void)
| ^~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/./include/pgtbl.h:86:14: error: implicit declaration of function ‘pmd_large’; did you mean ‘pmd_page’? [-Wimplicit-function-declaration]
86 | if (pmd_large(*pmd)) {
| ^~~~~~~~~
| pmd_page
/tmp/modconfig-2R4V5P/vmmon-only/linux/driver.c:339:1: warning: no previous prototype for ‘LinuxDriverExit’ [-Wmissing-prototypes]
339 | LinuxDriverExit(void)
| ^~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.c: At top level:
/tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.c:2926:1: warning: no previous prototype for ‘HostIFCheckTrackedMPN’ [-Wmissing-prototypes]
2926 | HostIFCheckTrackedMPN(VMDriver *vm, // IN: The VM instance
| ^~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.c:3046:1: warning: no previous prototype for ‘HostIFWritePhysicalWork’ [-Wmissing-prototypes]
3046 | HostIFWritePhysicalWork(MA ma, // MA to be written to
| ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.c:3205:1: warning: no previous prototype for ‘HostIFStartTimer’ [-Wmissing-prototypes]
3205 | HostIFStartTimer(Bool rateChanged, //IN: Did rate change?
| ^~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:244: /tmp/modconfig-2R4V5P/vmmon-only/linux/hostif.o] Error 1
make[2]: *** [/usr/lib/modules/6.9.1-arch1-1/build/Makefile:1919: /tmp/modconfig-2R4V5P/vmmon-only] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.9.1-arch1-1/build'
make: *** [Makefile:117: vmmon.ko] Error 2
make: Leaving directory '/tmp/modconfig-2R4V5P/vmmon-only'
make: Entering directory '/tmp/modconfig-2R4V5P/vmnet-only'
Using kernel build system.
/sbin/make -C /lib/modules/6.9.1-arch1-1/build/include/.. M=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory '/usr/lib/modules/6.9.1-arch1-1/build'
CC [M] /tmp/modconfig-2R4V5P/vmnet-only/driver.o
CC [M] /tmp/modconfig-2R4V5P/vmnet-only/hub.o
CC [M] /tmp/modconfig-2R4V5P/vmnet-only/userif.o
CC [M] /tmp/modconfig-2R4V5P/vmnet-only/netif.o
CC [M] /tmp/modconfig-2R4V5P/vmnet-only/bridge.o
CC [M] /tmp/modconfig-2R4V5P/vmnet-only/procfs.o
CC [M] /tmp/modconfig-2R4V5P/vmnet-only/smac_compat.o
CC [M] /tmp/modconfig-2R4V5P/vmnet-only/smac.o
CC [M] /tmp/modconfig-2R4V5P/vmnet-only/vnetEvent.o
CC [M] /tmp/modconfig-2R4V5P/vmnet-only/vnetUserListener.o
/tmp/modconfig-2R4V5P/vmnet-only/userif.c:1091:1: warning: no previous prototype for ‘VNetUserIf_Create’ [-Wmissing-prototypes]
1091 | VNetUserIf_Create(VNetPort **ret) // OUT
| ^~~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/netif.c:173:1: warning: no previous prototype for ‘VNetNetIf_Create’ [-Wmissing-prototypes]
173 | VNetNetIf_Create(char *devName, // IN:
| ^~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/vnetUserListener.c:87:1: warning: no previous prototype for ‘VNetUserListener_Create’ [-Wmissing-prototypes]
87 | VNetUserListener_Create(uint32 classMask, // IN: the listener's class mask
| ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c:258:1: warning: no previous prototype for ‘VNetBridge_Create’ [-Wmissing-prototypes]
258 | VNetBridge_Create(const char *devName, // IN: name of device (e.g., "eth0")
| ^~~~~~~~~~~~~~~~~
In file included from ./include/linux/spinlock.h:305,
from ./include/linux/sched.h:2138,
from /tmp/modconfig-2R4V5P/vmnet-only/bridge.c:25:
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c: In function ‘VNetBridgeReceiveFromVNet’:
/tmp/modconfig-2R4V5P/vmnet-only/vmnetInt.h:44:39: error: ‘dev_base_lock’ undeclared (first use in this function); did you mean ‘device_lock’?
44 | #define dev_lock_list() read_lock(&dev_base_lock)
| ^~~~~~~~~~~~~
./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’
56 | #define read_lock(lock) _raw_read_lock(lock)
| ^~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c:587:4: note: in expansion of macro ‘dev_lock_list’
587 | dev_lock_list();
| ^~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/vmnetInt.h:44:39: note: each undeclared identifier is reported only once for each function it appears in
44 | #define dev_lock_list() read_lock(&dev_base_lock)
| ^~~~~~~~~~~~~
./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’
56 | #define read_lock(lock) _raw_read_lock(lock)
| ^~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c:587:4: note: in expansion of macro ‘dev_lock_list’
587 | dev_lock_list();
| ^~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c: In function ‘VNetBridgeUp’:
/tmp/modconfig-2R4V5P/vmnet-only/vmnetInt.h:44:39: error: ‘dev_base_lock’ undeclared (first use in this function); did you mean ‘device_lock’?
44 | #define dev_lock_list() read_lock(&dev_base_lock)
| ^~~~~~~~~~~~~
./include/linux/rwlock.h:56:48: note: in definition of macro ‘read_lock’
56 | #define read_lock(lock) _raw_read_lock(lock)
| ^~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c:900:4: note: in expansion of macro ‘dev_lock_list’
900 | dev_lock_list();
| ^~~~~~~~~~~~~
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c: At top level:
/tmp/modconfig-2R4V5P/vmnet-only/bridge.c:1411:1: warning: no previous prototype for ‘VNetBridgeSendLargePacket’ [-Wmissing-prototypes]
1411 | VNetBridgeSendLargePacket(struct sk_buff *skb, // IN: packet to split
| ^~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:244: /tmp/modconfig-2R4V5P/vmnet-only/bridge.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/usr/lib/modules/6.9.1-arch1-1/build/Makefile:1919: /tmp/modconfig-2R4V5P/vmnet-only] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.9.1-arch1-1/build'
make: *** [Makefile:117: vmnet.ko] Error 2
make: Leaving directory '/tmp/modconfig-2R4V5P/vmnet-only'
Unable to install all modules. See log for details.
Please, I need help on this (...)
$ sudo vmware-modconfig --console --install-all
There's no point in using vmware-modconfig, it will not work.
Just clone nan0desu's repo (git clone https://github.com/nan0desu/vmware-host-modules.git
), then switch to the appropriate branch (git checkout tmp/workstation-17.5.2-k6.9.1
), then use make
and if compilation finishes ok sudo make install
.
Then load the new kernel modules with sudo modprobe vmmon vmnet
and you're done.
nan0desu's patch works for me (VMware Workstation Pro 17.5.2 and kernel 6.9.1-1 on openSUSE Tumbleweed) Thank you!!
Hi @Cris70, please how did you apply the patch. I am having trouble getting mine to work and apply the patch.
Please, I need help on this [...]
If you want to use vmware-modconfig, you have to use the second install method under point 0 (This is also what I do) to replace the original source files with the patched ones.
Please, I need help on this (...)
$ sudo vmware-modconfig --console --install-all
There's no point in using vmware-modconfig, it will not work. Just clone nan0desu's repo (
git clone https://github.com/nan0desu/vmware-host-modules.git
), then switch to the appropriate branch (git checkout tmp/workstation-17.5.2-k6.9.1
), then usemake
and if compilation finishes oksudo make install
. Then load the new kernel modules withsudo modprobe vmmon vmnet
and you're done.
Oh my, I feel like screaming @Cris70, it worked, thanks a lot. Do have and enjoy the rest of your day. God bless you.
Hello everyone, is anyone having this issue. I am unable to launch virtual network editor on my vmware-workstation 17.5.2. When i click on Edit > vVirtual Network Editor, nothing happens.
Hello everyone, is anyone having this issue. I am unable to launch virtual network editor on my vmware-workstation 17.5.2. When i click on Edit > vVirtual Network Editor, nothing happens.
Same here, but you should open another report rather then hijacking this one.
@K3lvinRob3rt same here also, no logs in console
nan0desu's patch works for me (VMware Workstation Pro 17.5.2 and kernel 6.9.1-1 on openSUSE Tumbleweed) Thank you!!
I confirm it is working. but I am experiencing high boot time and high shutdown time.
During shutdown I keep seeing messages like this:
INFO: task vmtoolsd:3127 blocked for more than 245 seconds.
See for example:
I think it may be related to the patch. Anyone else seeing this?
Please, I need help on this (...)
$ sudo vmware-modconfig --console --install-all
There's no point in using vmware-modconfig, it will not work. Just clone nan0desu's repo (
git clone https://github.com/nan0desu/vmware-host-modules.git
), then switch to the appropriate branch (git checkout tmp/workstation-17.5.2-k6.9.1
), then usemake
and if compilation finishes oksudo make install
. Then load the new kernel modules withsudo modprobe vmmon vmnet
and you're done.
Worked perfect for 6.9.1-arch1-2
Hi, try running Virtual Network Editor and you will see it is not working ... in my opinion the patch needed to compile modules under kernel 6.9 breaks something in the vmware workstation so Virtual Network Editor no longer works. The only way to recover it is downgrade to the kernel 6.8.9
Maybe the following will help (untested):
--- a/vmnet-only/vmnetInt.h +++ b/vmnet-only/vmnetInt.h @@ -41,8 +41,13 @@ compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \ dev_queue_xmit(skb) \ ) -#define dev_lock_list() read_lock(&dev_base_lock) -#define dev_unlock_list() read_unlock(&dev_base_lock) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0) +# define dev_lock_list() rcu_read_lock() +# define dev_unlock_list() rcu_read_unlock() +#else +# define dev_lock_list() read_lock(&dev_base_lock) +# define dev_unlock_list() read_unlock(&dev_base_lock) +#endif extern struct proto vmnet_proto;
Applied this, and vmnet compiled successfully with 6.9-rc1, and brief test with Win10 Guest (F40/Plasma/X11 host) showed everything appears to be working as it should.. Thanks..
This worked flawlessly on OpenSUSE Tumbleweed with:
Using the branch tmp/workstation-17.5.0-k6.8
Thank you for all the "works for me" reports but the problem is that we are talking about synchronization primitives here. And as these guard the access to device list, collisions are expected to be quite rare under normal circumstances. Therefore even replacing thise lock/unlock calls with no-op (i.e. "do nothing) would almost certainly pass these simple tests that it builds and running a VM does not show any issue.
Here's the process for anyone lurking here who has to use VMWare :-)
cd /usr/lib/vmware/modules/source
#vmnet
tar xvf vmnet.tar
mv vmnet.tar vmnet.tar.old
cd vmnet-only
(apply changes in https://github.com/mkubecek/vmware-host-modules/pull/252)
cd ..
tar cvf vmnet.tar vmnet-only
rm -rf vmnet-only
# vmmon
tar xvf vmmon.tar
mv vmmon.tar vmmon.tar.old
cd vmmon-only
(apply changes in https://github.com/mkubecek/vmware-host-modules/pull/252)
cd ..
tar cvf vmmon.tar vmmon-only
rm -rf vmmon-only
# Rebuild host modules
/usr/bin/vmware-modconfig --console --install-all
Kinda sad in this day and age, VMWare can't keep up with Linux kernel development on a paid product.
I used git clone -b tmp/workstation-17.5.2-k6.9.1 https://github.com/nan0desu/vmware-host-modules.git
with the approach (2b) from https://raw.githubusercontent.com/nan0desu/vmware-host-modules/master/INSTALL to build the modules successfully on kernel 6.9.2 and all appears to work fine on my Slackware Linux -current (15.0+ aka 15.1 next).
I am on Arch, 6.9.3-arch1-1
, VMWare Workstation 15.5.7.
Proposed fix allows for compilation to succeed and it is even possible to load the module. But vmware-network
service start hangs forever and running vmware-networks --start
ends with "Failed to initialize".
Maybe the following will help (untested):
--- a/vmnet-only/vmnetInt.h +++ b/vmnet-only/vmnetInt.h @@ -41,8 +41,13 @@ compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \ dev_queue_xmit(skb) \ ) -#define dev_lock_list() read_lock(&dev_base_lock) -#define dev_unlock_list() read_unlock(&dev_base_lock) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0) +# define dev_lock_list() rcu_read_lock() +# define dev_unlock_list() rcu_read_unlock() +#else +# define dev_lock_list() read_lock(&dev_base_lock) +# define dev_unlock_list() read_unlock(&dev_base_lock) +#endif extern struct proto vmnet_proto;
This works for me
Fedora 40, 6.9.4-200.fc40.x86_64 + VMware Workstation Pro 15.5.7 build-17171714
Maybe the following will help (untested):
--- a/vmnet-only/vmnetInt.h +++ b/vmnet-only/vmnetInt.h @@ -41,8 +41,13 @@ compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \ dev_queue_xmit(skb) \ ) -#define dev_lock_list() read_lock(&dev_base_lock) -#define dev_unlock_list() read_unlock(&dev_base_lock) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0) +# define dev_lock_list() rcu_read_lock() +# define dev_unlock_list() rcu_read_unlock() +#else +# define dev_lock_list() read_lock(&dev_base_lock) +# define dev_unlock_list() read_unlock(&dev_base_lock) +#endif extern struct proto vmnet_proto;
This works for me
Fedora 40, 6.9.4-200.fc40.x86_64 + VMware Workstation Pro 15.5.7 build-17171714
Me too on Pop!_OS 22.04 LTS - 6.9.3-76060903-generic - VMware Workstation 17.5.2 build-23775571
After the recent takeover of VMware, I'm hoping this issue is not proving too much of a challenge to fix 'completely', now?
After the recent takeover of VMware, I'm hoping this issue is not proving too much of a challenge to fix 'completely', now?
Probably the opposite. Broadcom doesn't take over companies in order to improve anything. They're raising prices on their enterprise stuff 2-10x or more, they made VMWare Fusion free which means it's probably dead, and who knows about Workstation, a cheap prosumer product that's likely low or 0 priority for them.
Maybe the following will help (untested):
--- a/vmnet-only/vmnetInt.h +++ b/vmnet-only/vmnetInt.h @@ -41,8 +41,13 @@ compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \ dev_queue_xmit(skb) \ ) -#define dev_lock_list() read_lock(&dev_base_lock) -#define dev_unlock_list() read_unlock(&dev_base_lock) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0) +# define dev_lock_list() rcu_read_lock() +# define dev_unlock_list() rcu_read_unlock() +#else +# define dev_lock_list() read_lock(&dev_base_lock) +# define dev_unlock_list() read_unlock(&dev_base_lock) +#endif extern struct proto vmnet_proto;
Applied this, and vmnet compiled successfully with 6.9-rc1, and brief test with Win10 Guest (F40/Plasma/X11 host) showed everything appears to be working as it should.. Thanks..
This code change worked for me with Kernel version 6.9.5
Maybe the following will help (untested):也许以下内容会有所帮助(未经测试):
--- a/vmnet-only/vmnetInt.h +++ b/vmnet-only/vmnetInt.h @@ -41,8 +41,13 @@ compat_skb_set_network_header(skb, sizeof (struct ethhdr)), \ dev_queue_xmit(skb) \ ) -#define dev_lock_list() read_lock(&dev_base_lock) -#define dev_unlock_list() read_unlock(&dev_base_lock) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 9, 0) +# define dev_lock_list() rcu_read_lock() +# define dev_unlock_list() rcu_read_unlock() +#else +# define dev_lock_list() read_lock(&dev_base_lock) +# define dev_unlock_list() read_unlock(&dev_base_lock) +#endif extern struct proto vmnet_proto;
That worked as far as I can tell, nothing complaining in dmesg, and vmware seems to be working.据我所知,这有效,dmesg 中没有任何抱怨,并且 vmware 似乎正在工作。
Thank you! This is very useful.
Has anyone managed to get vmware-network (sudo vmware-networks --start) working on their system?
@rgadsdon Maybe I'm too much of a n00b, but where did you apply this?
For future reference and anyone who is not able to apply this. The most simple process would be:
patch < patch.txt
and ENTERGetting different errors now
/tmp/vmware-host-modules/vmmon-only/./include/pgtbl.h:60:8: error: implicit declaration of function ‘pgd_large’; did you mean ‘pgd_page’? [-Wimplicit-function-declaration]
60 | if (pgd_large(*pgd)) {
| ^~~~~~~~~
| pgd_page
In file included from /tmp/vmware-host-modules/vmmon-only/./include/pgtbl.h:25:
/tmp/vmware-host-modules/vmmon-only/./include/compat_pgtable.h:39:45: error: implicit declaration of function ‘p4d_large’; did you mean ‘p4d_page’? [-Wimplicit-function-declaration]
39 | # define compat_p4d_large(p4d) p4d_large(p4d)
| ^~~~~~~~~
/tmp/vmware-host-modules/vmmon-only/./include/pgtbl.h:70:8: note: in expansion of macro ‘compat_p4d_large’
70 | if (compat_p4d_large(*p4d)) {
| ^~~~~~~~~~~~~~~~
/tmp/vmware-host-modules/vmmon-only/./include/pgtbl.h:78:11: error: implicit declaration of function ‘pud_large’; did you mean ‘pud_page’? [-Wimplicit-function-declaration]
78 | if (pud_large(*pud)) {
| ^~~~~~~~~
| pud_page
/tmp/vmware-host-modules/vmmon-only/./include/pgtbl.h:86:14: error: implicit declaration of function ‘pmd_large’; did you mean ‘pmd_page’? [-Wimplicit-function-declaration]
86 | if (pmd_large(*pmd)) {
| ^~~~~~~~~
| pmd_page
/tmp/vmware-host-modules/vmmon-only/linux/hostif.c: At top level:
/tmp/vmware-host-modules/vmmon-only/linux/hostif.c:2926:1: warning: no previous prototype for ‘HostIFCheckTrackedMPN’ [-Wmissing-prototypes]
2926 | HostIFCheckTrackedMPN(VMDriver *vm, // IN: The VM instance
| ^~~~~~~~~~~~~~~~~~~~~
/tmp/vmware-host-modules/vmmon-only/linux/hostif.c:3046:1: warning: no previous prototype for ‘HostIFWritePhysicalWork’ [-Wmissing-prototypes]
3046 | HostIFWritePhysicalWork(MA ma, // MA to be written to
| ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/vmware-host-modules/vmmon-only/linux/hostif.c:3205:1: warning: no previous prototype for ‘HostIFStartTimer’ [-Wmissing-prototypes]
3205 | HostIFStartTimer(Bool rateChanged, //IN: Did rate change?
| ^~~~~~~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:244: /tmp/vmware-host-modules/vmmon-only/linux/hostif.o] Error 1
make[3]: *** [/usr/src/kernels/6.9.6-200.fc40.x86_64/Makefile:1930: /tmp/vmware-host-modules/vmmon-only] Error 2
make[2]: *** [Makefile:252: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/kernels/6.9.6-200.fc40.x86_64'
make[1]: *** [Makefile:117: vmmon.ko] Error 2
make[1]: Leaving directory '/tmp/vmware-host-modules/vmmon-only'
make: *** [Makefile:21: vmmon-only] Error 2
make: *** Waiting for unfinished jobs....
/tmp/vmware-host-modules/vmnet-only/driver.c:60:12: error: conflicting types for ‘VNetBridge_Create’; have ‘int(char *, uint32, VNetJack *, VNetPort **)’ {aka ‘int(char *, unsigned int, VNetJack *, VNetPort **)’}
60 | extern int VNetBridge_Create(char *devName, uint32 flags, VNetJack *hubJack,
| ^~~~~~~~~~~~~~~~~
In file included from /tmp/vmware-host-modules/vmnet-only/driver.c:48:
/tmp/vmware-host-modules/vmnet-only/vnetInt.h:223:5: note: previous declaration of ‘VNetBridge_Create’ with type ‘int(const char *, uint32, VNetJack *, VNetPort **)’ {aka ‘int(const char *, unsigned int, VNetJack *, VNetPort **)’}
223 | int VNetBridge_Create(const char *devName, uint32 flags, VNetJack *hubJack,
| ^~~~~~~~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:244: /tmp/vmware-host-modules/vmnet-only/driver.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/tmp/vmware-host-modules/vmnet-only/bridge.c:1411:1: warning: no previous prototype for ‘VNetBridgeSendLargePacket’ [-Wmissing-prototypes]
1411 | VNetBridgeSendLargePacket(struct sk_buff *skb, // IN: packet to split
| ^~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [/usr/src/kernels/6.9.6-200.fc40.x86_64/Makefile:1930: /tmp/vmware-host-modules/vmnet-only] Error 2
make[2]: *** [Makefile:252: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/kernels/6.9.6-200.fc40.x86_64'
make[1]: *** [Makefile:117: vmnet.ko] Error 2
make[1]: Leaving directory '/tmp/vmware-host-modules/vmnet-only'
make: *** [Makefile:21: vmnet-only] Error 2
the patch did fix that one error.
Running Fedora Linux 40 6.9.6-200.fc40.x86_64
I actually have no clue what error this is, but why is the working directory here /tmp/vmware-host-modules/
Shouldnt it be something like /vmware-host-modules-workstation-17.5.1 depending on your version?
Did you grab the correct one for your version?
@naviafra I cloned the repo and set the branch to the workstation 17.5.1. Do I need to copy it over?
With
$ uname -a Linux 6.9.7-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.7-1 (2024-06-27) x86_64 GNU/Linux
I applied patch from https://github.com/mkubecek/vmware-host-modules/issues/239#issuecomment-2085542367 and https://github.com/mkubecek/vmware-host-modules/issues/239#issuecomment-2018855445.
It's working (tested with a Windows 11 VM)
+# define dev_lock_list() rcu_read_lock() +# define dev_unlock_list() rcu_read_unlock()
I have minimal C knowledge, so I asked claude.ai and perplexity.ai ;-)
They suggested both to use
Anyone know which one is better? I tested it also with rtnl and it's working (and I don't have to modify includes).
BTW: perplexity suggested both (rcu and rtnl)
Anyone know which one is better?
I try to answer it myself.... rtnl_lock is not so good. It's a "big kernel lock" for network-related operations. rcu_read_lock allowing for lock-free reads of shared data.
So rcu_read_lock is much better...
As we get duplicates (https://github.com/mkubecek/vmware-host-modules/issues/259): Can someone commit https://github.com/mkubecek/vmware-host-modules/pull/252?
vmmon compiles OK, but vmnet: