summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Marc Lenoir2020-03-13 20:15:31 +0100
committerJean-Marc Lenoir2020-03-13 20:15:31 +0100
commit33379f2ada4244215ed4cd83f68e143f6980325d (patch)
treeb4383892b3462da655fe264e49389ae11874112a
parent1adb99d37b092d344b05501c6d8956a1700092e5 (diff)
downloadaur-33379f2ada4244215ed4cd83f68e143f6980325d.tar.gz
Compatibility with Linux 5.6
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD6
-rw-r--r--vmmon.patch9
-rw-r--r--vmnet.patch120
4 files changed, 70 insertions, 82 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a0c5c84934f..77992491798 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,12 @@
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 = 5
+ pkgrel = 6
url = https://www.vmware.com/products/workstation-for-linux.html
install = vmware-workstation.install
arch = x86_64
license = custom
makedepends = sqlite
- makedepends = python
- makedepends = unzip
- makedepends = uefitool-git
depends = dkms
depends = ncurses5-compat-libs
depends = fuse2
@@ -63,10 +60,6 @@ pkgbase = vmware-workstation14
source = Makefile
source = vmmon.patch
source = vmnet.patch
- source = darwinPre15-tools-10.1.6_12989998.zip.tar::https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/10.1.6/12989998/packages/com.vmware.fusion.tools.darwinPre15.zip.tar
- source = darwin-tools-10.1.6_12989998.zip.tar::https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/10.1.6/12989998/packages/com.vmware.fusion.tools.darwin.zip.tar
- source = unlocker-3.0.3.py::https://raw.githubusercontent.com/paolo-projects/unlocker/3.0.3/unlocker.py
- source = efi-unlocker-patch-1.0.0.txt
sha256sums = a9b5ff8adb885a064f582f700c2ad42aa6c2a3b1b8964f3f8cab35cc084c89c4
sha256sums = 12e7b16abf8d7e858532edabb8868919c678063c566a6535855b194aac72d55e
sha256sums = da1698bf4e73ae466c1c7fc93891eba4b9c4581856649635e6532275dbfea141
@@ -87,12 +80,8 @@ pkgbase = vmware-workstation14
sha256sums = d7a9fbf39a0345ae2f14f7f389f30b1110f605d187e0c241e99bbb18993c250d
sha256sums = 05e26d8b21d190ebabb7f693998114d9d5991d9dfb71acb4d990293a65b6b487
sha256sums = 6ce902b1dab8fc69be253abd8e79017011985eca850ff7acc7282f9ab668e35d
- sha256sums = 410cb17dead645dacb1d35c6fedf6ca8de5294117f929a69740a8df462c8a95c
- sha256sums = 38eb0f5aedf79ab6098f9c4676df521be5acbf2aa7ed47c658cba0f33c13f297
- sha256sums = 195313791f2c2cf880b0ba6c9d130e40ab6729335c0980fcc40df4209c1ed52b
- sha256sums = e36fb99a56a65d2c4d82168c8adb1ed19a9a7aaf75807c667c79a79f4968740a
- sha256sums = 1c27547dcf6fb2f436c96ee62ae8c7f5cfd14b40d8bbd35dc385e247c4fb7e0f
- sha256sums = 392c1effcdec516000e9f8ffc97f2586524d8953d3e7d6f2c5f93f2acd809d91
+ sha256sums = 7bfbabd55c4c147538e96fa89e22827c6282d1231d6958391eebb59578e6188a
+ sha256sums = e712332335fde4e4846f18c3fa8c933f173336a44546f87ea02b1e1a53f15911
pkgname = vmware-workstation14
diff --git a/PKGBUILD b/PKGBUILD
index e2d28dc4892..2aef7e4cadb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ pkgname=vmware-workstation14
pkgver=14.1.7
_buildver=12989993
_pkgver=${pkgver}_${_buildver}
-pkgrel=5
+pkgrel=6
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'
@@ -116,8 +116,8 @@ sha256sums=(
'05e26d8b21d190ebabb7f693998114d9d5991d9dfb71acb4d990293a65b6b487'
'6ce902b1dab8fc69be253abd8e79017011985eca850ff7acc7282f9ab668e35d'
- '410cb17dead645dacb1d35c6fedf6ca8de5294117f929a69740a8df462c8a95c'
- '38eb0f5aedf79ab6098f9c4676df521be5acbf2aa7ed47c658cba0f33c13f297'
+ '7bfbabd55c4c147538e96fa89e22827c6282d1231d6958391eebb59578e6188a'
+ 'e712332335fde4e4846f18c3fa8c933f173336a44546f87ea02b1e1a53f15911'
)
options=(!strip emptydirs)
diff --git a/vmmon.patch b/vmmon.patch
index e4cbb6f4b56..0d515e71750 100644
--- a/vmmon.patch
+++ b/vmmon.patch
@@ -177,6 +177,15 @@
r = APICR_TO_ADDR(r, APICR_VERSION);
ret = HostIF_CopyFromUser(&dummy, r, sizeof dummy);
set_fs(old_fs);
+@@ -2197,7 +2240,7 @@
+ volatile void *hostapic;
+
+ ASSERT_ON_COMPILE(APICR_SIZE <= PAGE_SIZE);
+- hostapic = (volatile void *) ioremap_nocache(ma, PAGE_SIZE);
++ hostapic = (volatile void *) ioremap(ma, PAGE_SIZE);
+ if (hostapic) {
+ if ((APIC_VERSIONREG(hostapic) & 0xF0) == 0x10) {
+ vm->hostAPIC.base = (volatile uint32 (*)[4]) hostapic;
@@ -2365,7 +2408,7 @@ HostIF_SemaphoreWait(VMDriver *vm, // IN:
}
diff --git a/vmnet.patch b/vmnet.patch
index 82cf37ca89a..5f1159bc712 100644
--- a/vmnet.patch
+++ b/vmnet.patch
@@ -35,8 +35,56 @@
MODULEBUILDDIR=$(MODULEBUILDDIR) modules
$(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+--- a/vmnet/procfs.c
++++ a/vmnet/procfs.c
+@@ -137,6 +137,7 @@
+ }
+
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
+ /*
+ *----------------------------------------------------------------------
+ *
+@@ -168,6 +169,7 @@
+ .release = single_release,
+ };
+ #endif
++#endif
+
+
+ /*
+@@ -203,7 +205,12 @@
+ } else {
+ ent->data = data;
+ ent->fn = fn;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
++ ent->pde = proc_create_single_data(name, mode, parent->pde,
++ VNetProcShow, ent);
++#else
+ ent->pde = proc_create_data(name, mode, parent->pde, &fops, ent);
++#endif
+ }
+ if (ent->pde != NULL) {
+ *ret = ent;
--- a/vmnet/userif.c
+++ b/vmnet/userif.c
+@@ -78,11 +78,11 @@
+ extern unsigned int vnet_max_qlen;
+
+ #if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
+-# define compat_kmap(page) kmap(page)
+-# define compat_kunmap(page) kunmap(page)
+-#else
+-# define compat_kmap(page) kmap((page).p)
+-# define compat_kunmap(page) kunmap((page).p)
++# define skb_frag_page(frag) (frag)->page
++# define skb_frag_size(frag) (frag)->size
++#endif
++#if COMPAT_LINUX_VERSION_CHECK_LT(5, 4, 0)
++# define skb_frag_off(frag) (frag)->page_offset
+ #endif
+
+ /*
@@ -137,16 +137,21 @@
*/
@@ -90,69 +138,12 @@
&recvClusterPage,
&recvClusterCount)) < 0) {
goto error_free;
-From f404bc6855ea2c731b617d3b0a2971481eb31cbd Mon Sep 17 00:00:00 2001
-From: Michal Kubecek <mkubecek@suse.cz>
-Date: Thu, 19 Sep 2019 12:20:20 +0200
-Subject: [PATCH] vmnet: handle switch of skb_frag_t to bio_vec
-
-The switch from custom skb_frag_t implementation to bio_vec in v5.4-rc1 is
-mostly transparent for modules which use accessor for skb_frag_t members.
-Unfortunately many users access the members directly and function
-VNetCsumCopyDatagram() in vmnet is one of those.
-
-Use accessors everywhere so that vmnet code is compatible with kernel 5.4
-and newer. Use "compat_" prefix to avoid clashes with backports adding the
-accessors to older codebase.
----
- vmnet-only/userif.c | 39 +++++++++++++++++++++++++++++----------
- 1 file changed, 29 insertions(+), 10 deletions(-)
-
-diff --git a/vmnet-only/userif.c b/vmnet-only/userif.c
-index d385088..aab9478 100644
---- a/vmnet-only/userif.c
-+++ b/vmnet-only/userif.c
-@@ -78,13 +78,31 @@ static int VNetUserIfSetUplinkState(VNetPort *port, uint8 linkUp);
- extern unsigned int vnet_max_qlen;
-
- #if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
--# define compat_kmap(page) kmap(page)
--# define compat_kunmap(page) kunmap(page)
-+# define compat_kmap_frag(frag) kmap((frag)->page)
-+# define compat_kunmap_frag(page) kunmap((frag)->page)
- #else
--# define compat_kmap(page) kmap((page).p)
--# define compat_kunmap(page) kunmap((page).p)
-+# define compat_kmap_frag(frag) kmap(skb_frag_page(frag))
-+# define compat_kunmap_frag(frag) kunmap(skb_frag_page(frag))
- #endif
-
-+static unsigned int compat_skb_frag_size(const skb_frag_t *frag)
-+{
-+#if COMPAT_LINUX_VERSION_CHECK_LT(3, 2, 0)
-+ return frag->size;
-+#else
-+ return skb_frag_size(frag);
-+#endif
-+}
-+
-+static unsigned int compat_skb_frag_off(const skb_frag_t *frag)
-+{
-+#if COMPAT_LINUX_VERSION_CHECK_LT(5, 4, 0)
-+ return frag->page_offset;
-+#else
-+ return skb_frag_off(frag);
-+#endif
-+}
-+
- /*
- *-----------------------------------------------------------------------------
- *
-@@ -564,20 +582,21 @@ VNetCsumCopyDatagram(const struct sk_buff *skb, // IN: skb to copy
+@@ -559,20 +564,20 @@
for (frag = skb_shinfo(skb)->frags;
frag != skb_shinfo(skb)->frags + skb_shinfo(skb)->nr_frags;
frag++) {
- if (frag->size > 0) {
-+ if (compat_skb_frag_size(frag) > 0) {
++ if (skb_frag_size(frag) > 0) {
unsigned int tmpCsum;
const void *vaddr;
@@ -160,18 +151,17 @@ index d385088..aab9478 100644
- tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset,
- curr, frag->size, 0, &err);
- compat_kunmap(frag->page);
-+ vaddr = compat_kmap_frag(frag);
-+ tmpCsum = csum_and_copy_to_user(vaddr + compat_skb_frag_off(frag),
-+ curr, compat_skb_frag_size(frag), 0,
-+ &err);
-+ compat_kunmap_frag(frag);
++ vaddr = kmap(skb_frag_page(frag));
++ tmpCsum = csum_and_copy_to_user(vaddr + skb_frag_off(frag),
++ curr, skb_frag_size(frag), 0, &err);
++ kunmap(skb_frag_page(frag));
if (err) {
return err;
}
csum = csum_block_add(csum, tmpCsum, curr - buf);
- curr += frag->size;
-+ curr += compat_skb_frag_size(frag);
++ curr += skb_frag_size(frag);
}
}