aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r90497-regops-5.14-fix.patch
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2021-09-24 00:21:41 -0400
committerKhem Raj <raj.khem@gmail.com>2021-09-24 08:12:36 -0700
commitcff8331f9625b2a9f1ffefef4519763b410eb33c (patch)
treec6d8f277af7369f66edfe90890e595b39e59640f /meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r90497-regops-5.14-fix.patch
parent69d39fa3d9fb93a1ff590378e7bc4b4a88359f0f (diff)
downloadmeta-openembedded-contrib-cff8331f9625b2a9f1ffefef4519763b410eb33c.tar.gz
vboxguestdrivers: fix build against 5.14+
The bump of the reference / default kernels and libc-headers to 5.14 in oe-core broke the build of the vbox guest drivers. The upstream SVN already has 5.14 fixes for the issues, so these are SVN exports of the changes. When a new release is available, we can drop the changes. Also in this patch, is a fixup for the source directory for patching. It was broken in the overrides conversion, and since there weren't any active patches at the time, we didn't notice that source wasn't set to a directory where quilt could actually find the files. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r90497-regops-5.14-fix.patch')
-rw-r--r--meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r90497-regops-5.14-fix.patch118
1 files changed, 118 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r90497-regops-5.14-fix.patch b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r90497-regops-5.14-fix.patch
new file mode 100644
index 0000000000..0d960fa4f5
--- /dev/null
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/r90497-regops-5.14-fix.patch
@@ -0,0 +1,118 @@
+Subject: Fix regops build errors with linux 5.14
+
+Upstream-Status: backport
+
+svn-id: r90497
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
+
+Index: a/src/VBox/Additions/linux/sharedfolders/regops.c
+===================================================================
+--- a/src/VBox/Additions/linux/sharedfolders/regops.c (revision 88716)
++++ a/src/VBox/Additions/linux/sharedfolders/regops.c (revision 90497)
+@@ -2126,7 +2126,11 @@
+ int rc = 0;
+
+ Assert(iov_iter_count(iter) + pStash->cb > 0);
++# if RTLNX_VER_MIN(5,14,0)
++ if (!(iter->iter_type & ITER_KVEC)) {
++#else
+ if (!(iter->type & ITER_KVEC)) {
++#endif
+ /*
+ * Do we have a stashed page?
+ */
+@@ -2372,7 +2376,9 @@
+ static size_t vbsf_iter_max_span_of_pages(struct iov_iter *iter)
+ {
+ size_t cPages;
+-# if RTLNX_VER_MIN(3,16,0)
++#if RTLNX_VER_MIN(5,14,0)
++ if (iter_is_iovec(iter) || (iter->iter_type & ITER_KVEC)) {
++#elif RTLNX_VER_MIN(3,16,0)
+ if (iter_is_iovec(iter) || (iter->type & ITER_KVEC)) {
+ #endif
+ const struct iovec *pCurIov = iter->iov;
+@@ -2436,7 +2442,11 @@
+ } else {
+ /* Won't bother with accurate counts for the next two types, just make
+ some rough estimates (does pipes have segments?): */
++# if RTLNX_VER_MIN(5,14,0)
++ size_t cSegs = iter->iter_type & ITER_BVEC ? RT_MAX(1, iter->nr_segs) : 1;
++# else
+ size_t cSegs = iter->type & ITER_BVEC ? RT_MAX(1, iter->nr_segs) : 1;
++#endif
+ cPages = (iov_iter_count(iter) + (PAGE_SIZE * 2 - 2) * cSegs) >> PAGE_SHIFT;
+ }
+ # endif
+@@ -2588,8 +2598,14 @@
+ struct vbsf_reg_info *sf_r = kio->ki_filp->private_data;
+ struct vbsf_super_info *pSuperInfo = VBSF_GET_SUPER_INFO(inode->i_sb);
+
++#if RTLNX_VER_MIN(5,14,0)
+ SFLOGFLOW(("vbsf_reg_read_iter: inode=%p file=%p size=%#zx off=%#llx type=%#x\n",
++ inode, kio->ki_filp, cbToRead, kio->ki_pos, iter->iter_type));
++#else
++ SFLOGFLOW(("vbsf_reg_read_iter: inode=%p file=%p size=%#zx off=%#llx type=%#x\n",
+ inode, kio->ki_filp, cbToRead, kio->ki_pos, iter->type));
++#endif
++
+ AssertReturn(S_ISREG(inode->i_mode), -EINVAL);
+
+ /*
+@@ -2823,9 +2839,13 @@
+ bool const fAppend = RT_BOOL(kio->ki_filp->f_flags & O_APPEND);
+ # endif
+
+-
++#if RTLNX_VER_MIN(5,14,0)
+ SFLOGFLOW(("vbsf_reg_write_iter: inode=%p file=%p size=%#zx off=%#llx type=%#x\n",
++ inode, kio->ki_filp, cbToWrite, offFile, iter->iter_type));
++#else
++ SFLOGFLOW(("vbsf_reg_write_iter: inode=%p file=%p size=%#zx off=%#llx type=%#x\n",
+ inode, kio->ki_filp, cbToWrite, offFile, iter->type));
++#endif
+ AssertReturn(S_ISREG(inode->i_mode), -EINVAL);
+
+ /*
+@@ -3737,7 +3757,27 @@
+ }
+ #endif /* KERNEL_VERSION >= 2.6.24 */
+
++#if RTLNX_VER_MIN(5,14,0)
++static int vbsf_write_end(struct file *file, struct address_space *mapping,
++ loff_t pos, unsigned int len, unsigned int copied,
++ struct page *page, void *fsdata)
++{
++ static uint64_t volatile s_cCalls = 0;
++ if (s_cCalls++ < 16)
++ {
++ printk("vboxsf: Unexpected call to vbsf_write_end(pos=%#llx len=%#x)! Please report.\n",
++ (unsigned long long)pos, len);
++ RTLogBackdoorPrintf("vboxsf: Unexpected call to vbsf_write_end(pos=%#llx len=%#x)! Please report.\n",
++ (unsigned long long)pos, len);
++# ifdef WARN_ON
++ WARN_ON(1);
++# endif
++ }
+
++ return -ENOTSUPP;
++}
++#endif
++
+ #if RTLNX_VER_MIN(2,4,10)
+
+ # ifdef VBOX_UEK
+@@ -3791,8 +3831,11 @@
+ #if RTLNX_VER_MIN(2,5,12)
+ .set_page_dirty = __set_page_dirty_buffers,
+ #endif
+-#if RTLNX_VER_MIN(2,6,24)
++#if RTLNX_VER_MIN(5,14,0)
+ .write_begin = vbsf_write_begin,
++ .write_end = vbsf_write_end,
++#elif RTLNX_VER_MIN(2,6,24)
++ .write_begin = vbsf_write_begin,
+ .write_end = simple_write_end,
+ #elif RTLNX_VER_MIN(2,5,45)
+ .prepare_write = simple_prepare_write,