summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Marc Lenoir2024-03-01 18:47:39 +0100
committerJean-Marc Lenoir2024-03-01 18:47:39 +0100
commit3df7591e932b4237f0eeb1b4804d42a97303181d (patch)
tree3e411ee95893d520e57de0ac3d5d8c0a14afb652
parentfad2c23226bf1c2b538d1aa03d032fed66343fd7 (diff)
downloadaur-3df7591e932b4237f0eeb1b4804d42a97303181d.tar.gz
Fix compatibility with Linux 6.8-rc6
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD6
-rw-r--r--vmmon.patch216
-rw-r--r--vmnet.patch120
4 files changed, 334 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1f4e099a9ce8..83cc4327730c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = vmware-workstation14
pkgdesc = The industry standard for running multiple operating systems as virtual machines on a single Linux PC.
pkgver = 14.1.7
- pkgrel = 24
+ pkgrel = 25
url = https://www.vmware.com/products/workstation-for-linux.html
install = vmware-workstation.install
arch = x86_64
@@ -88,7 +88,7 @@ pkgbase = vmware-workstation14
sha256sums = fe1b1be8297f4170406f97dd1f8b385d911faf45afe19cbc0c26b8092b3ddf8d
sha256sums = 10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e
sha256sums = 273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac
- sha256sums = e9f1d8bdf45513701a0c9d01a703dba677545442f678a98ebecf07f0c0891f03
- sha256sums = f34cfe89820bb3cad727e9b410caa1120f1c8706a32b6a46b19a4cbbe9f7c2c5
+ sha256sums = 1789d14b184792db3fe0191aba0e4f733097dc058e73bf8c20a0a40cba74bfd8
+ sha256sums = 42cd9eeca74db7ab9493ca8824b41d7aec837992ac273f1b32601a222d654388
pkgname = vmware-workstation14
diff --git a/PKGBUILD b/PKGBUILD
index 81f77ce5ea32..493ce5e821fb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ pkgname=vmware-workstation14
pkgver=14.1.7
_buildver=12989993
_pkgver=${pkgver}_${_buildver}
-pkgrel=24
+pkgrel=25
pkgdesc='The industry standard for running multiple operating systems as virtual machines on a single Linux PC.'
arch=(x86_64)
url='https://www.vmware.com/products/workstation-for-linux.html'
@@ -125,8 +125,8 @@ sha256sums=(
'10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e'
'273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac'
- 'e9f1d8bdf45513701a0c9d01a703dba677545442f678a98ebecf07f0c0891f03'
- 'f34cfe89820bb3cad727e9b410caa1120f1c8706a32b6a46b19a4cbbe9f7c2c5'
+ '1789d14b184792db3fe0191aba0e4f733097dc058e73bf8c20a0a40cba74bfd8'
+ '42cd9eeca74db7ab9493ca8824b41d7aec837992ac273f1b32601a222d654388'
)
options=(!strip emptydirs)
diff --git a/vmmon.patch b/vmmon.patch
index be81ce0d25e9..98a264139759 100644
--- a/vmmon.patch
+++ b/vmmon.patch
@@ -1,6 +1,6 @@
--- a/vmmon/Makefile
+++ b/vmmon/Makefile
-@@ -43,7 +43,11 @@ INCLUDE += -I$(SRCROOT)/shared
+@@ -43,7 +43,11 @@
endif
@@ -62,6 +62,42 @@
static int LinuxDriverFault(struct vm_fault *fault);
#else
static int LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault);
+@@ -259,7 +261,7 @@
+ /*
+ *----------------------------------------------------------------------
+ *
+- * init_module --
++ * LinuxDriverInit --
+ *
+ * linux module entry point. Called by /sbin/insmod command
+ *
+@@ -272,7 +274,7 @@
+ */
+
+ int
+-init_module(void)
++LinuxDriverInit(void)
+ {
+ int retval;
+
+@@ -351,7 +353,7 @@
+ /*
+ *----------------------------------------------------------------------
+ *
+- * cleanup_module --
++ * LinuxDriverExit --
+ *
+ * Called by /sbin/rmmod
+ *
+@@ -360,7 +362,7 @@
+ */
+
+ void
+-cleanup_module(void)
++LinuxDriverExit(void)
+ {
+ /*
+ * XXX smp race?
@@ -594,7 +596,12 @@ LinuxDriver_Close(struct inode *inode, /
*-----------------------------------------------------------------------------
*/
@@ -88,6 +124,12 @@
return 0;
}
+@@ -1751,3 +1762,5 @@
+ * by default (i.e., neither mkinitrd nor modprobe will accept it).
+ */
+ MODULE_INFO(supported, "external");
++module_init(LinuxDriverInit);
++module_exit(LinuxDriverExit);
--- a/vmmon/linux/hostif.c
+++ a/vmmon/linux/hostif.c
@@ -47,6 +47,8 @@
@@ -406,7 +448,7 @@
int res;
int signalFD = args[1];
uint64 value = 1; // make an eventfd happy should it be there
-@@ -2493,22 +2576,32 @@ HostIF_SemaphoreSignal(uint64 *args) //
+@@ -2493,22 +2576,36 @@ HostIF_SemaphoreSignal(uint64 *args) //
return MX_WAITERROR;
}
@@ -418,7 +460,11 @@
+ */
+ eventfd = eventfd_ctx_fileget(file);
+ if (!IS_ERR(eventfd)) {
++#if COMPAT_LINUX_VERSION_CHECK_LT(6, 8, 0)
+ eventfd_signal(eventfd, 1);
++#else
++ eventfd_signal(eventfd);
++#endif
+ fput(file);
+ return MX_WAITNORMAL;
+ }
@@ -582,3 +628,169 @@ index 3f43c62..7eaa49a 100644
+#endif /* COMPAT_LINUX_VERSION_CHECK_LT(6, 5, 0) */
+
#endif /* __PGTBL_H__ */
+From add7a6d8b99565fdfa79098315b0a69fd244eda3 Mon Sep 17 00:00:00 2001
+From: Michal Kubecek <mkubecek@suse.cz>
+Date: Fri, 12 Jan 2024 08:30:33 +0100
+Subject: [PATCH] modules: fix build with -Wmissing-prototypes
+
+Mainline commit 0fcb70851fbf ("Makefile.extrawarn: turn on
+missing-prototypes globally") in 6.8-rc1 enables -Wmissing-prototypes
+globally, revealing a lot of unclean code and also some actual problems.
+This is also the case in vmmon and vmnet modules.
+
+Most of them are addressed by making functions used only within one file
+static. A special case are Vmx86_MapPage() and Vmx86_UnmapPage() which were
+defined since Workstation 14.0.0 but they are not actually used anywhere
+until 15.0.0 so that dropping them seems to be the best option.
+
+The missing prototype of random_get_entropy_fallback() is handled by
+including <linux/timex.h> rather than <asm/timex.h>.
+
+Finally, there are four functions in vmnet module which are actually used
+in multiple files but instead of proper declarations, their prototype is
+duplicated in vmnet-only/driver.c, risking that the two copies won't match
+(which actually happened in one case). The cleanest solution would be
+creating separate header files for them (bridge.h, netif.h, userif.h and
+vnetUserListener.h) and including them in the respective source file and
+driver.c. As the developers already handle similar cases by simply putting
+the declarations into vnetInt.h, let us do the same to keep things simple.
+---
+ vmmon-only/bootstrap/monLoaderVmmon.c | 1 +
+ vmmon-only/common/vmx86.c | 50 +--------------------------
+ vmmon-only/linux/driver.c | 4 +--
+ vmmon-only/linux/hostif.c | 6 ++--
+ vmnet-only/bridge.c | 2 +-
+ vmnet-only/driver.c | 16 ++-------
+ vmnet-only/vnetInt.h | 7 ++++
+ 7 files changed, 17 insertions(+), 69 deletions(-)
+
+diff --git a/vmmon-only/bootstrap/monLoaderVmmon.c b/vmmon-only/bootstrap/monLoaderVmmon.c
+index 6879e617..55bcd2c3 100644
+--- a/vmmon-only/bootstrap/monLoaderVmmon.c
++++ b/vmmon-only/bootstrap/monLoaderVmmon.c
+@@ -37,6 +37,7 @@
+ #include "x86paging_common.h"
+ #include "x86paging_64.h"
+ #include "vmx86.h"
++#include "monLoader.h"
+ #include "monLoaderLog.h"
+
+ typedef struct MonLoaderEnvContext {
+diff --git a/vmmon-only/common/vmx86.c b/vmmon-only/common/vmx86.c
+index f6b0d6fc..69455206 100644
+--- a/vmmon-only/common/vmx86.c
++++ b/vmmon-only/common/vmx86.c
+@@ -58,7 +58,7 @@
+ #include "x86svm.h"
+ #include "x86cpuid_asm.h"
+ #if defined(linux)
+-#include <asm/timex.h>
++#include <linux/timex.h>
+ #endif
+ #include "x86perfctr.h"
+ #include "x86vtinstr.h"
+@@ -3066,51 +3066,3 @@ Vmx86_GetPageRoot(VMDriver *vm, // IN:
+ *mpn = vm->ptRootMpns[vcpuid];
+ return TRUE;
+ }
+-
+-
+-/*
+- *----------------------------------------------------------------------
+- *
+- * Vmx86_MapPage --
+- *
+- * Maps the specified MPN into the host kernel address space.
+- * returns the VPN of the mapping.
+- *
+- * Results:
+- * The VPN in the kernel address space of the new mapping, or 0 if
+- * the mapping failed.
+- *
+- * Side effects:
+- * None.
+- *
+- *----------------------------------------------------------------------
+- */
+-
+-VPN
+-Vmx86_MapPage(MPN mpn) // IN:
+-{
+- return HostIF_MapPage(mpn);
+-}
+-
+-
+-/*
+- *----------------------------------------------------------------------
+- *
+- * Vmx86_UnmapPage --
+- *
+- * Unmaps the specified VPN from the host kernel address space.
+- *
+- * Results:
+- * None.
+- *
+- * Side effects:
+- * None.
+- *
+- *----------------------------------------------------------------------
+- */
+-
+-void
+-Vmx86_UnmapPage(VPN vpn) // IN:
+-{
+- HostIF_UnmapPage(vpn);
+-}
+diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
+index f015eb0b..337b1cf8 100644
+--- a/vmmon-only/linux/driver.c
++++ b/vmmon-only/linux/driver.c
+@@ -273,7 +273,7 @@ LinuxDriverInitTSCkHz(void)
+ *----------------------------------------------------------------------
+ */
+
+-int
++static int
+ LinuxDriverInit(void)
+ {
+ int retval;
+@@ -361,7 +361,7 @@ LinuxDriverInit(void)
+ *----------------------------------------------------------------------
+ */
+
+-void
++static void
+ LinuxDriverExit(void)
+ {
+ /*
+diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
+index cac16735..f33c442a 100644
+--- a/vmmon-only/linux/hostif.c
++++ b/vmmon-only/linux/hostif.c
+@@ -2818,7 +2818,7 @@ HostIF_CallOnEachCPU(void (*func)(void*), // IN: function to call
+ *-----------------------------------------------------------------------------
+ */
+
+-Bool
++static Bool
+ HostIFCheckTrackedMPN(VMDriver *vm, // IN: The VM instance
+ MPN mpn) // IN: The MPN
+ {
+@@ -2946,7 +2946,7 @@ HostIF_ReadPhysical(VMDriver *vm, // IN: The VM instance
+ *----------------------------------------------------------------------
+ */
+
+-int
++static int
+ HostIFWritePhysicalWork(MA ma, // MA to be written to
+ VA64 addr, // src data to write
+ Bool kernelBuffer, // is the buffer in kernel space?
+@@ -3085,7 +3085,7 @@ HostIF_GetCurrentPCPU(void)
+ *----------------------------------------------------------------------
+ */
+
+-int
++static int
+ HostIFStartTimer(Bool rateChanged, //IN: Did rate change?
+ unsigned int rate) //IN: current clock rate
+ {
diff --git a/vmnet.patch b/vmnet.patch
index fd0f69e49d10..04f8080b22d3 100644
--- a/vmnet.patch
+++ b/vmnet.patch
@@ -1,6 +1,6 @@
--- a/vmnet/Makefile
+++ b/vmnet/Makefile
-@@ -43,7 +43,11 @@ INCLUDE += -I$(SRCROOT)/shared
+@@ -43,7 +43,11 @@
endif
@@ -69,7 +69,7 @@
# endif
--- a/vmnet/driver.c
+++ b/vmnet/driver.c
-@@ -279,7 +279,7 @@ VNetRemovePortFromList(const VNetPort *port) // IN: port to remove from list
+@@ -279,7 +279,7 @@
/*
*----------------------------------------------------------------------
*
@@ -78,7 +78,7 @@
*
* linux module entry point. Called by /sbin/insmod command.
* Initializes module and Registers this driver for a
-@@ -296,7 +296,7 @@ VNetRemovePortFromList(const VNetPort *port) // IN: port to remove from list
+@@ -296,7 +296,7 @@
*/
int
@@ -87,7 +87,7 @@
{
int retval;
-@@ -358,7 +358,7 @@ init_module(void)
+@@ -358,7 +358,7 @@
/*
*----------------------------------------------------------------------
*
@@ -96,7 +96,7 @@
*
* Called by /sbin/rmmod. Unregisters this driver for a
* vnet major #, and deinitializes the modules. The 64-bit
-@@ -375,7 +375,7 @@ init_module(void)
+@@ -375,7 +375,7 @@
*/
void
@@ -105,7 +105,7 @@
{
unregister_chrdev(VNET_MAJOR_NUMBER, "vmnet");
VNetProtoUnregister();
-@@ -1701,3 +1701,5 @@ MODULE_LICENSE("GPL v2");
+@@ -1701,3 +1701,5 @@
* by default (i.e., neither mkinitrd nor modprobe will accept it).
*/
MODULE_INFO(supported, "external");
@@ -472,3 +472,111 @@ Fixing VMWare Player on Linux when using DHCP addresses: https://www.nikhef.nl/~
if (count < n) {
n = count;
}
+From add7a6d8b99565fdfa79098315b0a69fd244eda3 Mon Sep 17 00:00:00 2001
+From: Michal Kubecek <mkubecek@suse.cz>
+Date: Fri, 12 Jan 2024 08:30:33 +0100
+Subject: [PATCH] modules: fix build with -Wmissing-prototypes
+
+Mainline commit 0fcb70851fbf ("Makefile.extrawarn: turn on
+missing-prototypes globally") in 6.8-rc1 enables -Wmissing-prototypes
+globally, revealing a lot of unclean code and also some actual problems.
+This is also the case in vmmon and vmnet modules.
+
+Most of them are addressed by making functions used only within one file
+static. A special case are Vmx86_MapPage() and Vmx86_UnmapPage() which were
+defined since Workstation 14.0.0 but they are not actually used anywhere
+until 15.0.0 so that dropping them seems to be the best option.
+
+The missing prototype of random_get_entropy_fallback() is handled by
+including <linux/timex.h> rather than <asm/timex.h>.
+
+Finally, there are four functions in vmnet module which are actually used
+in multiple files but instead of proper declarations, their prototype is
+duplicated in vmnet-only/driver.c, risking that the two copies won't match
+(which actually happened in one case). The cleanest solution would be
+creating separate header files for them (bridge.h, netif.h, userif.h and
+vnetUserListener.h) and including them in the respective source file and
+driver.c. As the developers already handle similar cases by simply putting
+the declarations into vnetInt.h, let us do the same to keep things simple.
+---
+ vmmon-only/bootstrap/monLoaderVmmon.c | 1 +
+ vmmon-only/common/vmx86.c | 50 +--------------------------
+ vmmon-only/linux/driver.c | 4 +--
+ vmmon-only/linux/hostif.c | 6 ++--
+ vmnet-only/bridge.c | 2 +-
+ vmnet-only/driver.c | 16 ++-------
+ vmnet-only/vnetInt.h | 7 ++++
+ 7 files changed, 17 insertions(+), 69 deletions(-)
+
+diff --git a/vmnet-only/bridge.c b/vmnet-only/bridge.c
+index b144adab..b46df795 100644
+--- a/vmnet-only/bridge.c
++++ b/vmnet-only/bridge.c
+@@ -1405,7 +1405,7 @@ VNetBridgeComputeHeaderPos(struct sk_buff *skb) // IN: buffer to examine
+ *----------------------------------------------------------------------
+ */
+
+-void
++static void
+ VNetBridgeSendLargePacket(struct sk_buff *skb, // IN: packet to split
+ VNetBridge *bridge) // IN: bridge
+ {
+diff --git a/vmnet-only/driver.c b/vmnet-only/driver.c
+index 602bbfa1..a6f6a7d9 100644
+--- a/vmnet-only/driver.c
++++ b/vmnet-only/driver.c
+@@ -50,18 +50,6 @@
+
+ #include "vmnetInt.h"
+
+-/*
+- * Initialization and creation routines from other files.
+- * Putting them here reduces the need for so many header files.
+- */
+-
+-extern int VNetUserIf_Create(VNetPort **ret);
+-extern int VNetNetIf_Create(char *devName, VNetPort **ret, int hubNum);
+-extern int VNetBridge_Create(char *devName, uint32 flags, VNetJack *hubJack,
+- VNetPort **ret);
+-extern int VNetUserListener_Create(uint32 classMask, VNetJack *hubJack, VNetPort **ret);
+-
+-
+ /*
+ * Structure for cycle detection of host interfaces. This
+ * struct is only used by VNetCycleDetectIf().
+@@ -295,7 +283,7 @@ VNetRemovePortFromList(const VNetPort *port) // IN: port to remove from list
+ *----------------------------------------------------------------------
+ */
+
+-int
++static int
+ LinuxDriverInit(void)
+ {
+ int retval;
+@@ -374,7 +362,7 @@ vmnet_init_module(void)
+ *----------------------------------------------------------------------
+ */
+
+-void
++static void
+ LinuxDriverExit(void)
+ {
+ unregister_chrdev(VNET_MAJOR_NUMBER, "vmnet");
+diff --git a/vmnet-only/vnetInt.h b/vmnet-only/vnetInt.h
+index 5f41269d..cb25e3b8 100644
+--- a/vmnet-only/vnetInt.h
++++ b/vmnet-only/vnetInt.h
+@@ -225,6 +225,13 @@ extern int VNetProc_Init(void);
+
+ extern void VNetProc_Cleanup(void);
+
++int VNetNetIf_Create(char *devName, VNetPort **ret, int hubNum);
++int VNetUserIf_Create(VNetPort **ret);
++int VNetBridge_Create(const char *devName, uint32 flags, VNetJack *hubJack,
++ VNetPort **ret);
++int VNetUserListener_Create(uint32 classMask, VNetJack *hubJack,
++ VNetPort **port);
++
+
+ /*
+ *----------------------------------------------------------------------