summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Marc Lenoir2022-04-09 15:34:34 +0200
committerJean-Marc Lenoir2022-04-09 15:34:34 +0200
commit8bc636602e26f505c39a18cd15c7f73d9516a562 (patch)
tree4d4a9af64a99231cbdd0d3bf2104830d01d57bdf
parent71abfac85200709ac584ca10cd93c2ea5a0054e9 (diff)
downloadaur-8bc636602e26f505c39a18cd15c7f73d9516a562.tar.gz
Compatibility with Linux 5.18-rc1
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD6
-rw-r--r--vmmon.patch28
-rw-r--r--vmnet.patch63
4 files changed, 97 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1c2409642482..f93c648a680e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = vmware-workstation
pkgdesc = The industry standard for running multiple operating systems as virtual machines on a single Linux PC.
pkgver = 16.2.3
- pkgrel = 1
+ pkgrel = 2
url = https://www.vmware.com/products/workstation-for-linux.html
install = vmware-workstation.install
arch = x86_64
@@ -56,7 +56,7 @@ pkgbase = vmware-workstation
sha256sums = fe1b1be8297f4170406f97dd1f8b385d911faf45afe19cbc0c26b8092b3ddf8d
sha256sums = 10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e
sha256sums = 273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac
- sha256sums = 001844356d381d29d2b40ba53df5c902b487471d64cfb4df39498c5d2189e35b
- sha256sums = 5c05b0188543c085e1caf2795b6b151399396f4f437390aca6f6983714d5f48c
+ sha256sums = 31ed2d3766d3f3bd3b23222f67bcd39ff8edbbe8ff13fbe7b1fa565c8ed61144
+ sha256sums = c8ec6c997964f4763d9ddec138c8f6a763aa2bba6dcb8d5fc52e6babd4af4ced
pkgname = vmware-workstation
diff --git a/PKGBUILD b/PKGBUILD
index d3d331315d1e..928fe7d50b42 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,7 +17,7 @@ pkgname=vmware-workstation
pkgver=16.2.3
_buildver=19376536
_pkgver=${pkgver}_${_buildver}
-pkgrel=1
+pkgrel=2
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'
@@ -92,8 +92,8 @@ sha256sums=(
'10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e'
'273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac'
- '001844356d381d29d2b40ba53df5c902b487471d64cfb4df39498c5d2189e35b'
- '5c05b0188543c085e1caf2795b6b151399396f4f437390aca6f6983714d5f48c'
+ '31ed2d3766d3f3bd3b23222f67bcd39ff8edbbe8ff13fbe7b1fa565c8ed61144'
+ 'c8ec6c997964f4763d9ddec138c8f6a763aa2bba6dcb8d5fc52e6babd4af4ced'
)
options=(!strip emptydirs)
diff --git a/vmmon.patch b/vmmon.patch
index 56f7da0a9828..167c16fdcfdd 100644
--- a/vmmon.patch
+++ b/vmmon.patch
@@ -78,3 +78,31 @@ index 0ec30b3..b920e2d 100644
#else
/*
* Vmkernel's bogus __FreeBSD__ value causes gcc <stddef.h> to break.
+From 16d490ae022d7fc4ca867971e20e2dcd59e6ca5a Mon Sep 17 00:00:00 2001
+From: Michal Kubecek <mkubecek@suse.cz>
+Date: Mon, 4 Apr 2022 01:57:28 +0200
+Subject: [PATCH] vmmon: do not rely on HAVE_GET_KERNEL_NOFAULT
+
+Mainline commit 34737e269803 ("uaccess: add generic
+__{get,put}_kernel_nofault") in 5.18-rc1 removes HAVE_GET_KERNEL_NOFAULT
+macro as all architectures can use get_kernel_nofault() now. Check for
+existence of __get_kernel_nofault() instead and add also a version check in
+case it stops being a macro or is removed in the future.
+---
+ vmmon-only/linux/hostif.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
+index a21c300..b6326e9 100644
+--- a/vmmon-only/linux/hostif.c
++++ b/vmmon-only/linux/hostif.c
+@@ -2356,7 +2356,8 @@ isVAReadable(VA r) // IN:
+ int ret;
+
+ r = APICR_TO_ADDR(r, APICR_VERSION);
+-#ifdef HAVE_GET_KERNEL_NOFAULT
++#if defined(HAVE_GET_KERNEL_NOFAULT) || defined(__get_kernel_nofault) || \
++ (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0))
+ ret = get_kernel_nofault(dummy, (void *)r);
+ #else
+ {
diff --git a/vmnet.patch b/vmnet.patch
index 4686fa43db46..25dddb093d10 100644
--- a/vmnet.patch
+++ b/vmnet.patch
@@ -91,3 +91,66 @@ index 0ec30b3..b920e2d 100644
#else
/*
* Vmkernel's bogus __FreeBSD__ value causes gcc <stddef.h> to break.
+From 409623bd4693afada659af82e823a6291f70797a Mon Sep 17 00:00:00 2001
+From: Michal Kubecek <mkubecek@suse.cz>
+Date: Mon, 4 Apr 2022 02:05:17 +0200
+Subject: [PATCH] vmnet: use netif_rx() on newer kernels
+
+In mainline 5.18-rc1, commit baebdf48c360 ("net: dev: Makes sure netif_rx()
+can be invoked in any context.") allows calling netif_rx() from any context
+and commit 2655926aea9b ("net: Remove netif_rx_any_context() and
+netif_rx_ni().") drops netif_rx_ni() as it is no longer needed.
+
+Replace calls of netif_rx_ni() in VNetBridgeReceiveFromVNet() and
+VNetNetIfReceive() by netif_rx() when building against kernel 5.18 and
+newer.
+---
+ vmnet-only/bridge.c | 2 +-
+ vmnet-only/compat_netdevice.h | 9 +++++++++
+ vmnet-only/netif.c | 2 +-
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/vmnet-only/bridge.c b/vmnet-only/bridge.c
+index c84f8ee..d6bd3c4 100644
+--- a/vmnet-only/bridge.c
++++ b/vmnet-only/bridge.c
+@@ -691,7 +691,7 @@ VNetBridgeReceiveFromVNet(VNetJack *this, // IN: jack
+ * not do it, or netif_rx_ni() will deadlock on the cli() lock --hpreg
+ */
+
+- netif_rx_ni(clone);
++ compat_netif_rx_ni(clone);
+ # if LOGLEVEL >= 4
+ do_gettimeofday(&vnetTime);
+ # endif
+diff --git a/vmnet-only/compat_netdevice.h b/vmnet-only/compat_netdevice.h
+index bb5001b..c6cc706 100644
+--- a/vmnet-only/compat_netdevice.h
++++ b/vmnet-only/compat_netdevice.h
+@@ -196,4 +196,13 @@ typedef u32 compat_netdev_features_t;
+ #define compat_netif_trans_update(d) do { (d)->trans_start = jiffies; } while (0)
+ #endif
+
++static inline int compat_netif_rx_ni(struct sk_buff *skb)
++{
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
++ return netif_rx(skb);
++#else
++ return netif_rx_ni(skb);
++#endif
++}
++
+ #endif /* __COMPAT_NETDEVICE_H__ */
+diff --git a/vmnet-only/netif.c b/vmnet-only/netif.c
+index 8c3bbf8..35256a0 100644
+--- a/vmnet-only/netif.c
++++ b/vmnet-only/netif.c
+@@ -345,7 +345,7 @@ VNetNetIfReceive(VNetJack *this, // IN: jack
+ /* send to the host interface */
+ skb->dev = netIf->dev;
+ skb->protocol = eth_type_trans(skb, netIf->dev);
+- netif_rx_ni(skb);
++ compat_netif_rx_ni(skb);
+ netIf->stats.rx_packets++;
+
+ return;