[Pkg-virtualbox-commits] [virtualbox] 01/01: Cherry-pick smap patch for jessie
Gianfranco Costamagna
locutusofborg-guest at moszumanska.debian.org
Thu Apr 23 07:42:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
locutusofborg-guest pushed a commit to branch jessie
in repository virtualbox.
commit 9f7eb7f58029672d92f7fa3e80b5456301c7440e
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date: Thu Apr 23 09:42:16 2015 +0200
Cherry-pick smap patch for jessie
---
debian/changelog | 8 +++++
debian/patches/37-disable-smap.patch | 58 ++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 67 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index bbdde7a..92a9e86 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+virtualbox (4.3.18-dfsg-4) UNRELEASED; urgency=medium
+
+ [ Moritz Mühlenhoff ]
+ * d/p/37-disable-smap.patch, cherry-pick upstream patch to fix a kernel
+ paging issue (LP: #1437845, Closes: #783142).
+
+ -- Gianfranco Costamagna <costamagnagianfranco at yahoo.it> Thu, 23 Apr 2015 09:26:50 +0200
+
virtualbox (4.3.18-dfsg-3) unstable; urgency=medium
* Conflict with upstream proprietary packages 4.3 series.
diff --git a/debian/patches/37-disable-smap.patch b/debian/patches/37-disable-smap.patch
new file mode 100644
index 0000000..c4f52bc
--- /dev/null
+++ b/debian/patches/37-disable-smap.patch
@@ -0,0 +1,58 @@
+Description: Disable SMAP when during VirtualBox kernel calls
+This fixes virtualbox on Broadwell CPUs
+
+https://www.virtualbox.org/ticket/13820
+Author: frank.mehnert at oracle.com
+
+--- virtualbox-4.3.18-dfsg.orig/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
++++ virtualbox-4.3.18-dfsg/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
+@@ -48,6 +48,12 @@
+ # include <iprt/power.h>
+ # define VBOX_WITH_SUSPEND_NOTIFICATION
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
++# include <asm/smap.h>
++#else
++static inline void clac(void) { }
++static inline void stac(void) { }
++#endif
+
+ #include <linux/sched.h>
+ #ifdef CONFIG_DEVFS_FS
+@@ -622,6 +628,7 @@ static int VBoxDrvLinuxIOCtl(struct inod
+ #endif
+ {
+ PSUPDRVSESSION pSession = (PSUPDRVSESSION)pFilp->private_data;
++ int rc;
+
+ /*
+ * Deal with the two high-speed IOCtl that takes it's arguments from
+@@ -632,12 +639,15 @@ static int VBoxDrvLinuxIOCtl(struct inod
+ || uCmd == SUP_IOCTL_FAST_DO_HM_RUN
+ || uCmd == SUP_IOCTL_FAST_DO_NOP)
+ && pSession->fUnrestricted == true))
+- return supdrvIOCtlFast(uCmd, ulArg, &g_DevExt, pSession);
++ {
++ stac();
++ rc = supdrvIOCtlFast(uCmd, ulArg, &g_DevExt, pSession);
++ clac();
++ return rc;
++ }
+ return VBoxDrvLinuxIOCtlSlow(pFilp, uCmd, ulArg, pSession);
+
+ #else /* !HAVE_UNLOCKED_IOCTL */
+-
+- int rc;
+ unlock_kernel();
+ if (RT_LIKELY( ( uCmd == SUP_IOCTL_FAST_DO_RAW_RUN
+ || uCmd == SUP_IOCTL_FAST_DO_HM_RUN
+@@ -715,7 +725,9 @@ static int VBoxDrvLinuxIOCtlSlow(struct
+ /*
+ * Process the IOCtl.
+ */
++ stac();
+ rc = supdrvIOCtl(uCmd, &g_DevExt, pSession, pHdr, cbBuf);
++ clac();
+
+ /*
+ * Copy ioctl data and output buffer back to user space.
diff --git a/debian/patches/series b/debian/patches/series
index 5b32c83..2af312a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -14,3 +14,4 @@
32-disable-guest-version-check.patch
35-libvdeplug-soname.patch
36-fix-vnc-version-string.patch
+37-disable-smap.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-virtualbox/virtualbox.git
More information about the Pkg-virtualbox-commits
mailing list