[packages/VirtualBox] replace cpu_has_pge with boot_cpu_has(X86_FEATURE_PGE)
atler
atler at pld-linux.org
Tue Aug 2 17:40:06 CEST 2016
commit 0f08def2b85c9d3fbf478ee2c029270eaef31045
Author: Jan Palus <atler at pld-linux.org>
Date: Tue Aug 2 17:38:25 2016 +0200
replace cpu_has_pge with boot_cpu_has(X86_FEATURE_PGE)
for compatibility with kernel 4.7
VirtualBox-cpu_has_pge.patch | 11 +++++++++++
VirtualBox.spec | 2 ++
2 files changed, 13 insertions(+)
---
diff --git a/VirtualBox.spec b/VirtualBox.spec
index e6c1180..2e80126 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -79,6 +79,7 @@ Patch11: 18-system-xorg.patch
Patch12: %{pname}-all-translations.patch
Patch13: x32.patch
Patch14: %{pname}-no-scrextend.patch
+Patch15: %{pname}-cpu_has_pge.patch
URL: http://www.virtualbox.org/
%if %{with userspace}
%ifarch %{x8664}
@@ -531,6 +532,7 @@ cd ../..\
%endif
%patch13 -p1
%patch14 -p1
+%patch15 -p1
%{__sed} -i -e 's, at VBOX_DOC_PATH@,%{_docdir}/%{name}-%{version},' \
-e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/common/virtualbox.desktop.in
diff --git a/VirtualBox-cpu_has_pge.patch b/VirtualBox-cpu_has_pge.patch
new file mode 100644
index 0000000..61ac5d8
--- /dev/null
+++ b/VirtualBox-cpu_has_pge.patch
@@ -0,0 +1,11 @@
+--- VirtualBox-5.1.2/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h.orig 2016-08-02 17:32:06.189576892 +0200
++++ VirtualBox-5.1.2/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h 2016-08-02 17:33:03.373118295 +0200
+@@ -249,7 +249,7 @@
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 8) && defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)
+ # ifdef __PAGE_KERNEL_EXEC
+ /* >= 2.6.27 */
+-# define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC)
++# define MY_PAGE_KERNEL_EXEC __pgprot(boot_cpu_has(X86_FEATURE_PGE) ? __PAGE_KERNEL_EXEC | _PAGE_GLOBAL : __PAGE_KERNEL_EXEC)
+ # else
+ # define MY_PAGE_KERNEL_EXEC __pgprot(cpu_has_pge ? _PAGE_KERNEL_EXEC | _PAGE_GLOBAL : _PAGE_KERNEL_EXEC)
+ # endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/VirtualBox.git/commitdiff/0f08def2b85c9d3fbf478ee2c029270eaef31045
More information about the pld-cvs-commit
mailing list