forked from AUR/linux-vfio
Update to 4.16.3-1
This commit is contained in:
parent
ad02675f51
commit
95f3148d37
39
.SRCINFO
39
.SRCINFO
@ -1,42 +1,49 @@
|
|||||||
pkgbase = linux-vfio
|
pkgbase = linux-vfio
|
||||||
pkgver = 4.15.15
|
pkgver = 4.16.3
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = http://www.kernel.org/
|
url = https://www.kernel.org/
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
license = GPL2
|
license = GPL2
|
||||||
makedepends = xmlto
|
makedepends = xmlto
|
||||||
makedepends = docbook-xsl
|
|
||||||
makedepends = kmod
|
makedepends = kmod
|
||||||
makedepends = inetutils
|
makedepends = inetutils
|
||||||
makedepends = bc
|
makedepends = bc
|
||||||
makedepends = libelf
|
makedepends = libelf
|
||||||
options = !strip
|
options = !strip
|
||||||
source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.15.tar.xz
|
source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.tar.xz
|
||||||
source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.15.tar.sign
|
source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.16.tar.sign
|
||||||
source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.15.15.xz
|
source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.16.3.xz
|
||||||
source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.15.15.sign
|
source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.16.3.sign
|
||||||
source = config
|
source = config
|
||||||
source = 60-linux.hook
|
source = 60-linux.hook
|
||||||
source = 90-linux.hook
|
source = 90-linux.hook
|
||||||
source = linux.preset
|
source = linux.preset
|
||||||
source = add-acs-overrides.patch
|
|
||||||
source = i915-vga-arbiter.patch
|
|
||||||
source = 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
|
source = 0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
|
||||||
source = 0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
|
source = 0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
|
||||||
|
source = 0003-Partially-revert-swiotlb-remove-various-exports.patch
|
||||||
|
source = 0004-Fix-vboxguest-on-guests-with-more-than-4G-RAM.patch
|
||||||
|
source = 0005-Revert-drm-amd-display-disable-CRTCs-with-NULL-FB-on.patch
|
||||||
|
source = 0006-net-aquantia-Regression-on-reset-with-1.x-firmware.patch
|
||||||
|
source = add-acs-overrides.patch
|
||||||
|
source = i915-vga-arbiter.patch
|
||||||
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
|
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886
|
||||||
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
|
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E
|
||||||
sha256sums = 5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769
|
sha256sums = 63f6dc8e3c9f3a0273d5d6f4dca38a2413ca3a5f689329d05b750e4c87bb21b9
|
||||||
sha256sums = SKIP
|
sha256sums = SKIP
|
||||||
sha256sums = d8e7f93e24db5517a1be2030a765431120e07f7cd55e510d0de562c70e45bc00
|
sha256sums = 336252cb15f2f2574461c1d3daabf5dc207842526085802270e1e5223f645db3
|
||||||
sha256sums = SKIP
|
sha256sums = SKIP
|
||||||
sha256sums = f38927db126ec7141ea2dd70cabb2ef378552672b31db4ab621493928497abd7
|
sha256sums = 51f794dee6098b19b5f8ec2277f52a313584f2ff8b3abf111f2fd92a6ea118dd
|
||||||
sha256sums = ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21
|
sha256sums = ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21
|
||||||
sha256sums = 75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919
|
sha256sums = 75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919
|
||||||
sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65
|
sha256sums = ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65
|
||||||
sha256sums = 1a4a992199d4d70f7f35735f63a634bb605c2b594b7352ad5fd54512737d2784
|
sha256sums = a6119b46856ed2652c509fed380052e6df2be89c69a0d748cf7d8745bf35b871
|
||||||
sha256sums = 7cb4a5da6bf551dbb2db2e0b4e4d0774ee98cc30d9e617e030b27e6cba3e6293
|
sha256sums = 545566a7358d711b8d4f9924df685e2410549e20d99e5d1c0dfaccdfeafda60d
|
||||||
sha256sums = 4ffdc2a458845c2a7c03c735477dbf51b5b01b10568bf577b37a29e872135cab
|
sha256sums = bef6dd7b3a749ec072614ea4ed0bd5ea1d90519731f3438e4938d5b957032cc5
|
||||||
sha256sums = 12b281dc45f1954cc3f52276927bb2965c3132c0a8bd7f485869ced2c541d485
|
sha256sums = d647211e288436bcc010019a69f4ebf9a94c33b423c650aea8098969208ec836
|
||||||
|
sha256sums = 6fb4fb81dab69ff432767e02585b3eb6a5a39c941e4bc2a6d4940ee17116c14e
|
||||||
|
sha256sums = d49a70d3b3f60c81d93735871f01ea60cafca87588d8d0d01801b2aec92e0e93
|
||||||
|
sha256sums = abe269c6596b54a412bd8415472153f419026d4f367fa3ee1ebc8693ac66915d
|
||||||
|
sha256sums = fe3d47fe6f54d4a82c869fd29484d3f097b5906ef4d456409961a8dd647daad0
|
||||||
|
|
||||||
pkgname = linux-vfio
|
pkgname = linux-vfio
|
||||||
pkgdesc = The Linux-vfio kernel and modules
|
pkgdesc = The Linux-vfio kernel and modules
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
From 188720e92122385994143a06cb16a930053eb503 Mon Sep 17 00:00:00 2001
|
From ff9d06de19e83c0c5a00a4d46376b4d1032c4f99 Mon Sep 17 00:00:00 2001
|
||||||
Message-Id: <188720e92122385994143a06cb16a930053eb503.1520639721.git.jan.steffens@gmail.com>
|
Message-Id: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
|
||||||
From: Serge Hallyn <serge.hallyn@canonical.com>
|
From: Serge Hallyn <serge.hallyn@canonical.com>
|
||||||
Date: Fri, 31 May 2013 19:12:12 +0100
|
Date: Fri, 31 May 2013 19:12:12 +0100
|
||||||
Subject: [PATCH 1/2] add sysctl to disallow unprivileged CLONE_NEWUSER by
|
Subject: [PATCH 1/6] add sysctl to disallow unprivileged CLONE_NEWUSER by
|
||||||
default
|
default
|
||||||
|
|
||||||
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
|
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
|
||||||
@ -15,10 +15,10 @@ Signed-off-by: Daniel Micay <danielmicay@gmail.com>
|
|||||||
3 files changed, 30 insertions(+)
|
3 files changed, 30 insertions(+)
|
||||||
|
|
||||||
diff --git a/kernel/fork.c b/kernel/fork.c
|
diff --git a/kernel/fork.c b/kernel/fork.c
|
||||||
index 2295fc69717f..6f320a216e7d 100644
|
index e5d9d405ae4e..c4be89c51f25 100644
|
||||||
--- a/kernel/fork.c
|
--- a/kernel/fork.c
|
||||||
+++ b/kernel/fork.c
|
+++ b/kernel/fork.c
|
||||||
@@ -102,6 +102,11 @@
|
@@ -103,6 +103,11 @@
|
||||||
|
|
||||||
#define CREATE_TRACE_POINTS
|
#define CREATE_TRACE_POINTS
|
||||||
#include <trace/events/task.h>
|
#include <trace/events/task.h>
|
||||||
@ -30,7 +30,7 @@ index 2295fc69717f..6f320a216e7d 100644
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Minimum number of threads to boot the kernel
|
* Minimum number of threads to boot the kernel
|
||||||
@@ -1550,6 +1555,10 @@ static __latent_entropy struct task_struct *copy_process(
|
@@ -1591,6 +1596,10 @@ static __latent_entropy struct task_struct *copy_process(
|
||||||
if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS))
|
if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS))
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ index 2295fc69717f..6f320a216e7d 100644
|
|||||||
/*
|
/*
|
||||||
* Thread groups must share signals as well, and detached threads
|
* Thread groups must share signals as well, and detached threads
|
||||||
* can only be started up within the thread group.
|
* can only be started up within the thread group.
|
||||||
@@ -2343,6 +2352,12 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
|
@@ -2385,6 +2394,12 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
|
||||||
if (unshare_flags & CLONE_NEWNS)
|
if (unshare_flags & CLONE_NEWNS)
|
||||||
unshare_flags |= CLONE_FS;
|
unshare_flags |= CLONE_FS;
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ index 2295fc69717f..6f320a216e7d 100644
|
|||||||
if (err)
|
if (err)
|
||||||
goto bad_unshare_out;
|
goto bad_unshare_out;
|
||||||
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
|
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
|
||||||
index 557d46728577..c19d7a828913 100644
|
index f98f28c12020..7256d339a32a 100644
|
||||||
--- a/kernel/sysctl.c
|
--- a/kernel/sysctl.c
|
||||||
+++ b/kernel/sysctl.c
|
+++ b/kernel/sysctl.c
|
||||||
@@ -105,6 +105,9 @@ extern int core_uses_pid;
|
@@ -105,6 +105,9 @@ extern int core_uses_pid;
|
||||||
@ -68,7 +68,7 @@ index 557d46728577..c19d7a828913 100644
|
|||||||
extern int pid_max;
|
extern int pid_max;
|
||||||
extern int pid_max_min, pid_max_max;
|
extern int pid_max_min, pid_max_max;
|
||||||
extern int percpu_pagelist_fraction;
|
extern int percpu_pagelist_fraction;
|
||||||
@@ -513,6 +516,15 @@ static struct ctl_table kern_table[] = {
|
@@ -515,6 +518,15 @@ static struct ctl_table kern_table[] = {
|
||||||
.proc_handler = proc_dointvec,
|
.proc_handler = proc_dointvec,
|
||||||
},
|
},
|
||||||
#endif
|
#endif
|
||||||
@ -99,5 +99,5 @@ index 246d4d4ce5c7..f64432b45cec 100644
|
|||||||
static DEFINE_MUTEX(userns_state_mutex);
|
static DEFINE_MUTEX(userns_state_mutex);
|
||||||
|
|
||||||
--
|
--
|
||||||
2.16.2
|
2.17.0
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
From 704e31424615c87ad82424a9b09a452d762daed0 Mon Sep 17 00:00:00 2001
|
From 3dcbf4dd14d295c3a238d73e9f791a827b906058 Mon Sep 17 00:00:00 2001
|
||||||
Message-Id: <704e31424615c87ad82424a9b09a452d762daed0.1520639721.git.jan.steffens@gmail.com>
|
Message-Id: <3dcbf4dd14d295c3a238d73e9f791a827b906058.1524129246.git.jan.steffens@gmail.com>
|
||||||
In-Reply-To: <188720e92122385994143a06cb16a930053eb503.1520639721.git.jan.steffens@gmail.com>
|
In-Reply-To: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
|
||||||
References: <188720e92122385994143a06cb16a930053eb503.1520639721.git.jan.steffens@gmail.com>
|
References: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
|
||||||
From: Jim Bride <jim.bride@linux.intel.com>
|
From: Jim Bride <jim.bride@linux.intel.com>
|
||||||
Date: Mon, 6 Nov 2017 13:38:57 -0800
|
Date: Mon, 6 Nov 2017 13:38:57 -0800
|
||||||
Subject: [PATCH 2/2] drm/i915/edp: Only use the alternate fixed mode if it's
|
Subject: [PATCH 2/6] drm/i915/edp: Only use the alternate fixed mode if it's
|
||||||
asked for
|
asked for
|
||||||
|
|
||||||
In commit dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for
|
In commit dc911f5bd8aa ("drm/i915/edp: Allow alternate fixed mode for
|
||||||
@ -24,10 +24,10 @@ Signed-off-by: Jim Bride <jim.bride@linux.intel.com>
|
|||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
|
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
|
||||||
index add4b2434aa3..14a8bef9fdfe 100644
|
index a29868cd30c7..b6d07b615b12 100644
|
||||||
--- a/drivers/gpu/drm/i915/intel_dp.c
|
--- a/drivers/gpu/drm/i915/intel_dp.c
|
||||||
+++ b/drivers/gpu/drm/i915/intel_dp.c
|
+++ b/drivers/gpu/drm/i915/intel_dp.c
|
||||||
@@ -1616,7 +1616,8 @@ static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
|
@@ -1597,7 +1597,8 @@ static bool intel_edp_compare_alt_mode(struct drm_display_mode *m1,
|
||||||
m1->vdisplay == m2->vdisplay &&
|
m1->vdisplay == m2->vdisplay &&
|
||||||
m1->vsync_start == m2->vsync_start &&
|
m1->vsync_start == m2->vsync_start &&
|
||||||
m1->vsync_end == m2->vsync_end &&
|
m1->vsync_end == m2->vsync_end &&
|
||||||
@ -38,5 +38,5 @@ index add4b2434aa3..14a8bef9fdfe 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.16.2
|
2.17.0
|
||||||
|
|
||||||
|
29
0003-Partially-revert-swiotlb-remove-various-exports.patch
Normal file
29
0003-Partially-revert-swiotlb-remove-various-exports.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 1b03bcc6faecde170f9bea83accdde7bbd36df96 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <1b03bcc6faecde170f9bea83accdde7bbd36df96.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
In-Reply-To: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
References: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
|
||||||
|
Date: Fri, 6 Apr 2018 16:19:38 +0200
|
||||||
|
Subject: [PATCH 3/6] Partially revert "swiotlb: remove various exports"
|
||||||
|
|
||||||
|
This partially reverts commit 4bd89ed39b2ab8dc4ac4b6c59b07d420b0213bec.
|
||||||
|
The proprietary NVIDIA driver needs one of the exports.
|
||||||
|
---
|
||||||
|
lib/swiotlb.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
|
||||||
|
index c43ec2271469..77d699f14af7 100644
|
||||||
|
--- a/lib/swiotlb.c
|
||||||
|
+++ b/lib/swiotlb.c
|
||||||
|
@@ -1016,6 +1016,7 @@ swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems,
|
||||||
|
}
|
||||||
|
return nelems;
|
||||||
|
}
|
||||||
|
+EXPORT_SYMBOL(swiotlb_map_sg_attrs);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Unmap a set of streaming mode DMA translations. Again, cpu read rules
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
552
0004-Fix-vboxguest-on-guests-with-more-than-4G-RAM.patch
Normal file
552
0004-Fix-vboxguest-on-guests-with-more-than-4G-RAM.patch
Normal file
@ -0,0 +1,552 @@
|
|||||||
|
From b04d533fa7e16e58243296b5063a624e91d2048e Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <b04d533fa7e16e58243296b5063a624e91d2048e.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
In-Reply-To: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
References: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
|
||||||
|
Date: Wed, 11 Apr 2018 21:27:44 +0200
|
||||||
|
Subject: [PATCH 4/6] Fix vboxguest on guests with more than 4G RAM
|
||||||
|
|
||||||
|
Squashed commit of the following:
|
||||||
|
|
||||||
|
commit 042b191f6b98165d6bcca3ae09a0f9b289d6155e
|
||||||
|
Author: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
Date: Thu Mar 29 17:28:57 2018 +0200
|
||||||
|
|
||||||
|
virt: vbox: Log an error when we fail to get the host version
|
||||||
|
|
||||||
|
This was the only error path during probe without a message being logged
|
||||||
|
about what went wrong, this fixes this.
|
||||||
|
|
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
|
||||||
|
commit e4111a6c617687f7cb414ddfa8176206910db76e
|
||||||
|
Author: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
Date: Thu Mar 29 17:28:56 2018 +0200
|
||||||
|
|
||||||
|
virt: vbox: Use __get_free_pages instead of kmalloc for DMA32 memory
|
||||||
|
|
||||||
|
It is not possible to get DMA32 zone memory through kmalloc, causing
|
||||||
|
the vboxguest driver to malfunction due to getting memory above
|
||||||
|
4G which the PCI device cannot handle.
|
||||||
|
|
||||||
|
This commit changes the kmalloc calls where the 4G limit matters to
|
||||||
|
using __get_free_pages() fixing vboxguest not working on x86_64 guests
|
||||||
|
with more then 4G RAM.
|
||||||
|
|
||||||
|
Cc: stable@vger.kernel.org
|
||||||
|
Reported-by: Eloy Coto Pereiro <eloy.coto@gmail.com>
|
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
|
||||||
|
commit 2cb20368ce32e7275a351eadadd4c8f3da742a28
|
||||||
|
Author: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
Date: Thu Mar 29 17:28:55 2018 +0200
|
||||||
|
|
||||||
|
virt: vbox: Add vbg_req_free() helper function
|
||||||
|
|
||||||
|
This is a preparation patch for fixing issues on x86_64 virtual-machines
|
||||||
|
with more then 4G of RAM, atm we pass __GFP_DMA32 to kmalloc, but kmalloc
|
||||||
|
does not honor that, so we need to switch to get_pages, which means we
|
||||||
|
will not be able to use kfree to free memory allocated with vbg_alloc_req.
|
||||||
|
|
||||||
|
While at it also remove a comment on a vbg_alloc_req call which talks
|
||||||
|
about Windows (inherited from the vbox upstream cross-platform code).
|
||||||
|
|
||||||
|
Cc: stable@vger.kernel.org
|
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
|
||||||
|
commit fa5c012bc9c3e1ada5cde0bfa3c6706be97b7cb0
|
||||||
|
Author: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
Date: Thu Mar 29 17:28:54 2018 +0200
|
||||||
|
|
||||||
|
virt: vbox: Move declarations of vboxguest private functions to private header
|
||||||
|
|
||||||
|
Move the declarations of functions from vboxguest_utils.c which are only
|
||||||
|
meant for vboxguest internal use from include/linux/vbox_utils.h to
|
||||||
|
drivers/virt/vboxguest/vboxguest_core.h.
|
||||||
|
|
||||||
|
Cc: stable@vger.kernel.org
|
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
---
|
||||||
|
drivers/virt/vboxguest/vboxguest_core.c | 70 +++++++++++++-----------
|
||||||
|
drivers/virt/vboxguest/vboxguest_core.h | 9 +++
|
||||||
|
drivers/virt/vboxguest/vboxguest_linux.c | 19 ++++++-
|
||||||
|
drivers/virt/vboxguest/vboxguest_utils.c | 17 ++++--
|
||||||
|
include/linux/vbox_utils.h | 23 --------
|
||||||
|
5 files changed, 76 insertions(+), 62 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c
|
||||||
|
index 190dbf8cfcb5..2f3856a95856 100644
|
||||||
|
--- a/drivers/virt/vboxguest/vboxguest_core.c
|
||||||
|
+++ b/drivers/virt/vboxguest/vboxguest_core.c
|
||||||
|
@@ -114,7 +114,7 @@ static void vbg_guest_mappings_init(struct vbg_dev *gdev)
|
||||||
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
|
- kfree(req);
|
||||||
|
+ vbg_req_free(req, sizeof(*req));
|
||||||
|
kfree(pages);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -144,7 +144,7 @@ static void vbg_guest_mappings_exit(struct vbg_dev *gdev)
|
||||||
|
|
||||||
|
rc = vbg_req_perform(gdev, req);
|
||||||
|
|
||||||
|
- kfree(req);
|
||||||
|
+ vbg_req_free(req, sizeof(*req));
|
||||||
|
|
||||||
|
if (rc < 0) {
|
||||||
|
vbg_err("%s error: %d\n", __func__, rc);
|
||||||
|
@@ -214,8 +214,8 @@ static int vbg_report_guest_info(struct vbg_dev *gdev)
|
||||||
|
ret = vbg_status_code_to_errno(rc);
|
||||||
|
|
||||||
|
out_free:
|
||||||
|
- kfree(req2);
|
||||||
|
- kfree(req1);
|
||||||
|
+ vbg_req_free(req2, sizeof(*req2));
|
||||||
|
+ vbg_req_free(req1, sizeof(*req1));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -245,7 +245,7 @@ static int vbg_report_driver_status(struct vbg_dev *gdev, bool active)
|
||||||
|
if (rc == VERR_NOT_IMPLEMENTED) /* Compatibility with older hosts. */
|
||||||
|
rc = VINF_SUCCESS;
|
||||||
|
|
||||||
|
- kfree(req);
|
||||||
|
+ vbg_req_free(req, sizeof(*req));
|
||||||
|
|
||||||
|
return vbg_status_code_to_errno(rc);
|
||||||
|
}
|
||||||
|
@@ -431,58 +431,52 @@ static int vbg_heartbeat_host_config(struct vbg_dev *gdev, bool enabled)
|
||||||
|
rc = vbg_req_perform(gdev, req);
|
||||||
|
do_div(req->interval_ns, 1000000); /* ns -> ms */
|
||||||
|
gdev->heartbeat_interval_ms = req->interval_ns;
|
||||||
|
- kfree(req);
|
||||||
|
+ vbg_req_free(req, sizeof(*req));
|
||||||
|
|
||||||
|
return vbg_status_code_to_errno(rc);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes the heartbeat timer. This feature may be disabled by the host.
|
||||||
|
* Return: 0 or negative errno value.
|
||||||
|
* @gdev: The Guest extension device.
|
||||||
|
*/
|
||||||
|
static int vbg_heartbeat_init(struct vbg_dev *gdev)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
/* Make sure that heartbeat checking is disabled if we fail. */
|
||||||
|
ret = vbg_heartbeat_host_config(gdev, false);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
ret = vbg_heartbeat_host_config(gdev, true);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
- /*
|
||||||
|
- * Preallocate the request to use it from the timer callback because:
|
||||||
|
- * 1) on Windows vbg_req_alloc must be called at IRQL <= APC_LEVEL
|
||||||
|
- * and the timer callback runs at DISPATCH_LEVEL;
|
||||||
|
- * 2) avoid repeated allocations.
|
||||||
|
- */
|
||||||
|
gdev->guest_heartbeat_req = vbg_req_alloc(
|
||||||
|
sizeof(*gdev->guest_heartbeat_req),
|
||||||
|
VMMDEVREQ_GUEST_HEARTBEAT);
|
||||||
|
if (!gdev->guest_heartbeat_req)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
vbg_info("%s: Setting up heartbeat to trigger every %d milliseconds\n",
|
||||||
|
__func__, gdev->heartbeat_interval_ms);
|
||||||
|
mod_timer(&gdev->heartbeat_timer, 0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cleanup hearbeat code, stop HB timer and disable host heartbeat checking.
|
||||||
|
* @gdev: The Guest extension device.
|
||||||
|
*/
|
||||||
|
static void vbg_heartbeat_exit(struct vbg_dev *gdev)
|
||||||
|
{
|
||||||
|
del_timer_sync(&gdev->heartbeat_timer);
|
||||||
|
vbg_heartbeat_host_config(gdev, false);
|
||||||
|
- kfree(gdev->guest_heartbeat_req);
|
||||||
|
-
|
||||||
|
+ vbg_req_free(gdev->guest_heartbeat_req,
|
||||||
|
+ sizeof(*gdev->guest_heartbeat_req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -543,7 +537,7 @@ static int vbg_reset_host_event_filter(struct vbg_dev *gdev,
|
||||||
|
if (rc < 0)
|
||||||
|
vbg_err("%s error, rc: %d\n", __func__, rc);
|
||||||
|
|
||||||
|
- kfree(req);
|
||||||
|
+ vbg_req_free(req, sizeof(*req));
|
||||||
|
return vbg_status_code_to_errno(rc);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -617,32 +611,32 @@ static int vbg_set_session_event_filter(struct vbg_dev *gdev,
|
||||||
|
|
||||||
|
out:
|
||||||
|
mutex_unlock(&gdev->session_mutex);
|
||||||
|
- kfree(req);
|
||||||
|
+ vbg_req_free(req, sizeof(*req));
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Init and termination worker for set guest capabilities to zero on the host.
|
||||||
|
* Return: 0 or negative errno value.
|
||||||
|
* @gdev: The Guest extension device.
|
||||||
|
*/
|
||||||
|
static int vbg_reset_host_capabilities(struct vbg_dev *gdev)
|
||||||
|
{
|
||||||
|
struct vmmdev_mask *req;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_GUEST_CAPABILITIES);
|
||||||
|
if (!req)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
req->not_mask = U32_MAX;
|
||||||
|
req->or_mask = 0;
|
||||||
|
rc = vbg_req_perform(gdev, req);
|
||||||
|
if (rc < 0)
|
||||||
|
vbg_err("%s error, rc: %d\n", __func__, rc);
|
||||||
|
|
||||||
|
- kfree(req);
|
||||||
|
+ vbg_req_free(req, sizeof(*req));
|
||||||
|
return vbg_status_code_to_errno(rc);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -712,44 +706,46 @@ static int vbg_set_session_capabilities(struct vbg_dev *gdev,
|
||||||
|
|
||||||
|
out:
|
||||||
|
mutex_unlock(&gdev->session_mutex);
|
||||||
|
- kfree(req);
|
||||||
|
+ vbg_req_free(req, sizeof(*req));
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* vbg_query_host_version get the host feature mask and version information.
|
||||||
|
* Return: 0 or negative errno value.
|
||||||
|
* @gdev: The Guest extension device.
|
||||||
|
*/
|
||||||
|
static int vbg_query_host_version(struct vbg_dev *gdev)
|
||||||
|
{
|
||||||
|
struct vmmdev_host_version *req;
|
||||||
|
int rc, ret;
|
||||||
|
|
||||||
|
req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_GET_HOST_VERSION);
|
||||||
|
if (!req)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
rc = vbg_req_perform(gdev, req);
|
||||||
|
ret = vbg_status_code_to_errno(rc);
|
||||||
|
- if (ret)
|
||||||
|
+ if (ret) {
|
||||||
|
+ vbg_err("%s error: %d\n", __func__, rc);
|
||||||
|
goto out;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
snprintf(gdev->host_version, sizeof(gdev->host_version), "%u.%u.%ur%u",
|
||||||
|
req->major, req->minor, req->build, req->revision);
|
||||||
|
gdev->host_features = req->features;
|
||||||
|
|
||||||
|
vbg_info("vboxguest: host-version: %s %#x\n", gdev->host_version,
|
||||||
|
gdev->host_features);
|
||||||
|
|
||||||
|
if (!(req->features & VMMDEV_HVF_HGCM_PHYS_PAGE_LIST)) {
|
||||||
|
vbg_err("vboxguest: Error host too old (does not support page-lists)\n");
|
||||||
|
ret = -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
|
- kfree(req);
|
||||||
|
+ vbg_req_free(req, sizeof(*req));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -847,36 +843,46 @@ int vbg_core_init(struct vbg_dev *gdev, u32 fixed_events)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
err_free_reqs:
|
||||||
|
- kfree(gdev->mouse_status_req);
|
||||||
|
- kfree(gdev->ack_events_req);
|
||||||
|
- kfree(gdev->cancel_req);
|
||||||
|
- kfree(gdev->mem_balloon.change_req);
|
||||||
|
- kfree(gdev->mem_balloon.get_req);
|
||||||
|
+ vbg_req_free(gdev->mouse_status_req,
|
||||||
|
+ sizeof(*gdev->mouse_status_req));
|
||||||
|
+ vbg_req_free(gdev->ack_events_req,
|
||||||
|
+ sizeof(*gdev->ack_events_req));
|
||||||
|
+ vbg_req_free(gdev->cancel_req,
|
||||||
|
+ sizeof(*gdev->cancel_req));
|
||||||
|
+ vbg_req_free(gdev->mem_balloon.change_req,
|
||||||
|
+ sizeof(*gdev->mem_balloon.change_req));
|
||||||
|
+ vbg_req_free(gdev->mem_balloon.get_req,
|
||||||
|
+ sizeof(*gdev->mem_balloon.get_req));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call this on exit to clean-up vboxguest-core managed resources.
|
||||||
|
*
|
||||||
|
* The native code should call this before the driver is loaded,
|
||||||
|
* but don't call this on shutdown.
|
||||||
|
* @gdev: The Guest extension device.
|
||||||
|
*/
|
||||||
|
void vbg_core_exit(struct vbg_dev *gdev)
|
||||||
|
{
|
||||||
|
vbg_heartbeat_exit(gdev);
|
||||||
|
vbg_guest_mappings_exit(gdev);
|
||||||
|
|
||||||
|
/* Clear the host flags (mouse status etc). */
|
||||||
|
vbg_reset_host_event_filter(gdev, 0);
|
||||||
|
vbg_reset_host_capabilities(gdev);
|
||||||
|
vbg_core_set_mouse_status(gdev, 0);
|
||||||
|
|
||||||
|
- kfree(gdev->mouse_status_req);
|
||||||
|
- kfree(gdev->ack_events_req);
|
||||||
|
- kfree(gdev->cancel_req);
|
||||||
|
- kfree(gdev->mem_balloon.change_req);
|
||||||
|
- kfree(gdev->mem_balloon.get_req);
|
||||||
|
+ vbg_req_free(gdev->mouse_status_req,
|
||||||
|
+ sizeof(*gdev->mouse_status_req));
|
||||||
|
+ vbg_req_free(gdev->ack_events_req,
|
||||||
|
+ sizeof(*gdev->ack_events_req));
|
||||||
|
+ vbg_req_free(gdev->cancel_req,
|
||||||
|
+ sizeof(*gdev->cancel_req));
|
||||||
|
+ vbg_req_free(gdev->mem_balloon.change_req,
|
||||||
|
+ sizeof(*gdev->mem_balloon.change_req));
|
||||||
|
+ vbg_req_free(gdev->mem_balloon.get_req,
|
||||||
|
+ sizeof(*gdev->mem_balloon.get_req));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -1415,7 +1421,7 @@ static int vbg_ioctl_write_core_dump(struct vbg_dev *gdev,
|
||||||
|
req->flags = dump->u.in.flags;
|
||||||
|
dump->hdr.rc = vbg_req_perform(gdev, req);
|
||||||
|
|
||||||
|
- kfree(req);
|
||||||
|
+ vbg_req_free(req, sizeof(*req));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1513,7 +1519,7 @@ int vbg_core_set_mouse_status(struct vbg_dev *gdev, u32 features)
|
||||||
|
if (rc < 0)
|
||||||
|
vbg_err("%s error, rc: %d\n", __func__, rc);
|
||||||
|
|
||||||
|
- kfree(req);
|
||||||
|
+ vbg_req_free(req, sizeof(*req));
|
||||||
|
return vbg_status_code_to_errno(rc);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/drivers/virt/vboxguest/vboxguest_core.h b/drivers/virt/vboxguest/vboxguest_core.h
|
||||||
|
index 6c784bf4fa6d..7ad9ec45bfa9 100644
|
||||||
|
--- a/drivers/virt/vboxguest/vboxguest_core.h
|
||||||
|
+++ b/drivers/virt/vboxguest/vboxguest_core.h
|
||||||
|
@@ -171,4 +171,13 @@ irqreturn_t vbg_core_isr(int irq, void *dev_id);
|
||||||
|
|
||||||
|
void vbg_linux_mouse_event(struct vbg_dev *gdev);
|
||||||
|
|
||||||
|
+/* Private (non exported) functions form vboxguest_utils.c */
|
||||||
|
+void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type);
|
||||||
|
+void vbg_req_free(void *req, size_t len);
|
||||||
|
+int vbg_req_perform(struct vbg_dev *gdev, void *req);
|
||||||
|
+int vbg_hgcm_call32(
|
||||||
|
+ struct vbg_dev *gdev, u32 client_id, u32 function, u32 timeout_ms,
|
||||||
|
+ struct vmmdev_hgcm_function_parameter32 *parm32, u32 parm_count,
|
||||||
|
+ int *vbox_status);
|
||||||
|
+
|
||||||
|
#endif
|
||||||
|
diff --git a/drivers/virt/vboxguest/vboxguest_linux.c b/drivers/virt/vboxguest/vboxguest_linux.c
|
||||||
|
index 82e280d38cc2..398d22693234 100644
|
||||||
|
--- a/drivers/virt/vboxguest/vboxguest_linux.c
|
||||||
|
+++ b/drivers/virt/vboxguest/vboxguest_linux.c
|
||||||
|
@@ -87,52 +87,65 @@ static long vbg_misc_device_ioctl(struct file *filp, unsigned int req,
|
||||||
|
struct vbg_session *session = filp->private_data;
|
||||||
|
size_t returned_size, size;
|
||||||
|
struct vbg_ioctl_hdr hdr;
|
||||||
|
+ bool is_vmmdev_req;
|
||||||
|
int ret = 0;
|
||||||
|
void *buf;
|
||||||
|
|
||||||
|
if (copy_from_user(&hdr, (void *)arg, sizeof(hdr)))
|
||||||
|
return -EFAULT;
|
||||||
|
|
||||||
|
if (hdr.version != VBG_IOCTL_HDR_VERSION)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (hdr.size_in < sizeof(hdr) ||
|
||||||
|
(hdr.size_out && hdr.size_out < sizeof(hdr)))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
size = max(hdr.size_in, hdr.size_out);
|
||||||
|
if (_IOC_SIZE(req) && _IOC_SIZE(req) != size)
|
||||||
|
return -EINVAL;
|
||||||
|
if (size > SZ_16M)
|
||||||
|
return -E2BIG;
|
||||||
|
|
||||||
|
- /* __GFP_DMA32 because IOCTL_VMMDEV_REQUEST passes this to the host */
|
||||||
|
- buf = kmalloc(size, GFP_KERNEL | __GFP_DMA32);
|
||||||
|
+ /*
|
||||||
|
+ * IOCTL_VMMDEV_REQUEST needs the buffer to be below 4G to avoid
|
||||||
|
+ * the need for a bounce-buffer and another copy later on.
|
||||||
|
+ */
|
||||||
|
+ is_vmmdev_req = (req & ~IOCSIZE_MASK) == VBG_IOCTL_VMMDEV_REQUEST(0) ||
|
||||||
|
+ req == VBG_IOCTL_VMMDEV_REQUEST_BIG;
|
||||||
|
+
|
||||||
|
+ if (is_vmmdev_req)
|
||||||
|
+ buf = vbg_req_alloc(size, VBG_IOCTL_HDR_TYPE_DEFAULT);
|
||||||
|
+ else
|
||||||
|
+ buf = kmalloc(size, GFP_KERNEL);
|
||||||
|
if (!buf)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
if (copy_from_user(buf, (void *)arg, hdr.size_in)) {
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
if (hdr.size_in < size)
|
||||||
|
memset(buf + hdr.size_in, 0, size - hdr.size_in);
|
||||||
|
|
||||||
|
ret = vbg_core_ioctl(session, req, buf);
|
||||||
|
if (ret)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
returned_size = ((struct vbg_ioctl_hdr *)buf)->size_out;
|
||||||
|
if (returned_size > size) {
|
||||||
|
vbg_debug("%s: too much output data %zu > %zu\n",
|
||||||
|
__func__, returned_size, size);
|
||||||
|
returned_size = size;
|
||||||
|
}
|
||||||
|
if (copy_to_user((void *)arg, buf, returned_size) != 0)
|
||||||
|
ret = -EFAULT;
|
||||||
|
|
||||||
|
out:
|
||||||
|
- kfree(buf);
|
||||||
|
+ if (is_vmmdev_req)
|
||||||
|
+ vbg_req_free(buf, size);
|
||||||
|
+ else
|
||||||
|
+ kfree(buf);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
diff --git a/drivers/virt/vboxguest/vboxguest_utils.c b/drivers/virt/vboxguest/vboxguest_utils.c
|
||||||
|
index 0f0dab8023cf..bf4474214b4d 100644
|
||||||
|
--- a/drivers/virt/vboxguest/vboxguest_utils.c
|
||||||
|
+++ b/drivers/virt/vboxguest/vboxguest_utils.c
|
||||||
|
@@ -65,23 +65,32 @@ VBG_LOG(vbg_debug, pr_debug);
|
||||||
|
void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type)
|
||||||
|
{
|
||||||
|
struct vmmdev_request_header *req;
|
||||||
|
+ int order = get_order(PAGE_ALIGN(len));
|
||||||
|
|
||||||
|
- req = kmalloc(len, GFP_KERNEL | __GFP_DMA32);
|
||||||
|
+ req = (void *)__get_free_pages(GFP_KERNEL | GFP_DMA32, order);
|
||||||
|
if (!req)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
memset(req, 0xaa, len);
|
||||||
|
|
||||||
|
req->size = len;
|
||||||
|
req->version = VMMDEV_REQUEST_HEADER_VERSION;
|
||||||
|
req->request_type = req_type;
|
||||||
|
req->rc = VERR_GENERAL_FAILURE;
|
||||||
|
req->reserved1 = 0;
|
||||||
|
req->reserved2 = 0;
|
||||||
|
|
||||||
|
return req;
|
||||||
|
}
|
||||||
|
|
||||||
|
+void vbg_req_free(void *req, size_t len)
|
||||||
|
+{
|
||||||
|
+ if (!req)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ free_pages((unsigned long)req, get_order(PAGE_ALIGN(len)));
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Note this function returns a VBox status code, not a negative errno!! */
|
||||||
|
int vbg_req_perform(struct vbg_dev *gdev, void *req)
|
||||||
|
{
|
||||||
|
@@ -137,7 +146,7 @@ int vbg_hgcm_connect(struct vbg_dev *gdev,
|
||||||
|
rc = hgcm_connect->header.result;
|
||||||
|
}
|
||||||
|
|
||||||
|
- kfree(hgcm_connect);
|
||||||
|
+ vbg_req_free(hgcm_connect, sizeof(*hgcm_connect));
|
||||||
|
|
||||||
|
*vbox_status = rc;
|
||||||
|
return 0;
|
||||||
|
@@ -166,7 +175,7 @@ int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 client_id, int *vbox_status)
|
||||||
|
if (rc >= 0)
|
||||||
|
rc = hgcm_disconnect->header.result;
|
||||||
|
|
||||||
|
- kfree(hgcm_disconnect);
|
||||||
|
+ vbg_req_free(hgcm_disconnect, sizeof(*hgcm_disconnect));
|
||||||
|
|
||||||
|
*vbox_status = rc;
|
||||||
|
return 0;
|
||||||
|
@@ -623,7 +632,7 @@ int vbg_hgcm_call(struct vbg_dev *gdev, u32 client_id, u32 function,
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!leak_it)
|
||||||
|
- kfree(call);
|
||||||
|
+ vbg_req_free(call, size);
|
||||||
|
|
||||||
|
free_bounce_bufs:
|
||||||
|
if (bounce_bufs) {
|
||||||
|
diff --git a/include/linux/vbox_utils.h b/include/linux/vbox_utils.h
|
||||||
|
index c71def6b310f..a240ed2a0372 100644
|
||||||
|
--- a/include/linux/vbox_utils.h
|
||||||
|
+++ b/include/linux/vbox_utils.h
|
||||||
|
@@ -24,39 +24,16 @@ __printf(1, 2) void vbg_debug(const char *fmt, ...);
|
||||||
|
#define vbg_debug pr_debug
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-/**
|
||||||
|
- * Allocate memory for generic request and initialize the request header.
|
||||||
|
- *
|
||||||
|
- * Return: the allocated memory
|
||||||
|
- * @len: Size of memory block required for the request.
|
||||||
|
- * @req_type: The generic request type.
|
||||||
|
- */
|
||||||
|
-void *vbg_req_alloc(size_t len, enum vmmdev_request_type req_type);
|
||||||
|
-
|
||||||
|
-/**
|
||||||
|
- * Perform a generic request.
|
||||||
|
- *
|
||||||
|
- * Return: VBox status code
|
||||||
|
- * @gdev: The Guest extension device.
|
||||||
|
- * @req: Pointer to the request structure.
|
||||||
|
- */
|
||||||
|
-int vbg_req_perform(struct vbg_dev *gdev, void *req);
|
||||||
|
-
|
||||||
|
int vbg_hgcm_connect(struct vbg_dev *gdev,
|
||||||
|
struct vmmdev_hgcm_service_location *loc,
|
||||||
|
u32 *client_id, int *vbox_status);
|
||||||
|
|
||||||
|
int vbg_hgcm_disconnect(struct vbg_dev *gdev, u32 client_id, int *vbox_status);
|
||||||
|
|
||||||
|
int vbg_hgcm_call(struct vbg_dev *gdev, u32 client_id, u32 function,
|
||||||
|
u32 timeout_ms, struct vmmdev_hgcm_function_parameter *parms,
|
||||||
|
u32 parm_count, int *vbox_status);
|
||||||
|
|
||||||
|
-int vbg_hgcm_call32(
|
||||||
|
- struct vbg_dev *gdev, u32 client_id, u32 function, u32 timeout_ms,
|
||||||
|
- struct vmmdev_hgcm_function_parameter32 *parm32, u32 parm_count,
|
||||||
|
- int *vbox_status);
|
||||||
|
-
|
||||||
|
/**
|
||||||
|
* Convert a VirtualBox status code to a standard Linux kernel return value.
|
||||||
|
* Return: 0 or negative errno value.
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
@ -0,0 +1,95 @@
|
|||||||
|
From 23675bf063a1b39fccd29e7f573ec6729a11b3fa Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <23675bf063a1b39fccd29e7f573ec6729a11b3fa.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
In-Reply-To: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
References: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
From: Harry Wentland <harry.wentland@amd.com>
|
||||||
|
Date: Thu, 12 Apr 2018 10:51:52 -0400
|
||||||
|
Subject: [PATCH 5/6] Revert "drm/amd/display: disable CRTCs with NULL FB on
|
||||||
|
their primary plane (V2)"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
This seems to cause flickering and lock-ups for a wide range of users.
|
||||||
|
Revert until we've found a proper fix for the flickering and lock-ups.
|
||||||
|
|
||||||
|
This reverts commit 36cc549d59864b7161f0e23d710c1c4d1b9cf022.
|
||||||
|
|
||||||
|
Cc: Shirish S <shirish.s@amd.com>
|
||||||
|
Cc: Alex Deucher <alexander.deucher@amd.com>
|
||||||
|
Cc: stable@vger.kernel.org
|
||||||
|
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
||||||
|
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
|
||||||
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||||||
|
---
|
||||||
|
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 31 -------------------
|
||||||
|
1 file changed, 31 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
|
||||||
|
index 63c67346d316..8a6e6fbc78cd 100644
|
||||||
|
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
|
||||||
|
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
|
||||||
|
@@ -4776,60 +4776,29 @@ static int dm_update_planes_state(struct dc *dc,
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int dm_atomic_check_plane_state_fb(struct drm_atomic_state *state,
|
||||||
|
- struct drm_crtc *crtc)
|
||||||
|
-{
|
||||||
|
- struct drm_plane *plane;
|
||||||
|
- struct drm_crtc_state *crtc_state;
|
||||||
|
-
|
||||||
|
- WARN_ON(!drm_atomic_get_new_crtc_state(state, crtc));
|
||||||
|
-
|
||||||
|
- drm_for_each_plane_mask(plane, state->dev, crtc->state->plane_mask) {
|
||||||
|
- struct drm_plane_state *plane_state =
|
||||||
|
- drm_atomic_get_plane_state(state, plane);
|
||||||
|
-
|
||||||
|
- if (IS_ERR(plane_state))
|
||||||
|
- return -EDEADLK;
|
||||||
|
-
|
||||||
|
- crtc_state = drm_atomic_get_crtc_state(plane_state->state, crtc);
|
||||||
|
- if (IS_ERR(crtc_state))
|
||||||
|
- return PTR_ERR(crtc_state);
|
||||||
|
-
|
||||||
|
- if (crtc->primary == plane && crtc_state->active) {
|
||||||
|
- if (!plane_state->fb)
|
||||||
|
- return -EINVAL;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- return 0;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static int amdgpu_dm_atomic_check(struct drm_device *dev,
|
||||||
|
struct drm_atomic_state *state)
|
||||||
|
{
|
||||||
|
struct amdgpu_device *adev = dev->dev_private;
|
||||||
|
struct dc *dc = adev->dm.dc;
|
||||||
|
struct dm_atomic_state *dm_state = to_dm_atomic_state(state);
|
||||||
|
struct drm_connector *connector;
|
||||||
|
struct drm_connector_state *old_con_state, *new_con_state;
|
||||||
|
struct drm_crtc *crtc;
|
||||||
|
struct drm_crtc_state *old_crtc_state, *new_crtc_state;
|
||||||
|
int ret, i;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This bool will be set for true for any modeset/reset
|
||||||
|
* or plane update which implies non fast surface update.
|
||||||
|
*/
|
||||||
|
bool lock_and_validation_needed = false;
|
||||||
|
|
||||||
|
ret = drm_atomic_helper_check_modeset(dev, state);
|
||||||
|
if (ret)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
|
||||||
|
- ret = dm_atomic_check_plane_state_fb(state, crtc);
|
||||||
|
- if (ret)
|
||||||
|
- goto fail;
|
||||||
|
-
|
||||||
|
if (!drm_atomic_crtc_needs_modeset(new_crtc_state) &&
|
||||||
|
!new_crtc_state->color_mgmt_changed)
|
||||||
|
continue;
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
@ -0,0 +1,72 @@
|
|||||||
|
From fb08717dc5ecf3ada73f93663b528d9d4ce4380b Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <fb08717dc5ecf3ada73f93663b528d9d4ce4380b.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
In-Reply-To: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
References: <ff9d06de19e83c0c5a00a4d46376b4d1032c4f99.1524129246.git.jan.steffens@gmail.com>
|
||||||
|
From: Igor Russkikh <igor.russkikh@aquantia.com>
|
||||||
|
Date: Wed, 11 Apr 2018 15:23:24 +0300
|
||||||
|
Subject: [PATCH 6/6] net: aquantia: Regression on reset with 1.x firmware
|
||||||
|
|
||||||
|
On ASUS XG-C100C with 1.5.44 firmware a special mode called "dirty wake"
|
||||||
|
is active. With this mode when motherboard gets powered (but no poweron
|
||||||
|
happens yet), NIC automatically enables powersave link and watches
|
||||||
|
for WOL packet.
|
||||||
|
This normally allows to powerup the PC after AC power failures.
|
||||||
|
|
||||||
|
Not all motherboards or bios settings gives power to PCI slots,
|
||||||
|
so this mode is not enabled on all the hardware.
|
||||||
|
|
||||||
|
4.16 linux driver introduced full hardware reset sequence
|
||||||
|
This is required since before that we had no NIC hardware
|
||||||
|
reset implemented and there were side effects of "not clean start".
|
||||||
|
|
||||||
|
But this full reset is incompatible with "dirty wake" WOL feature
|
||||||
|
it keeps the PHY link in a special mode forever. As a consequence,
|
||||||
|
driver sees no link and no traffic.
|
||||||
|
|
||||||
|
To fix this we forcibly change FW state to idle state before doing
|
||||||
|
the full reset. This makes FW to restore link state.
|
||||||
|
|
||||||
|
Fixes: c8c82eb net: aquantia: Introduce global AQC hardware reset sequence
|
||||||
|
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
|
||||||
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
---
|
||||||
|
.../aquantia/atlantic/hw_atl/hw_atl_utils.c | 16 ++++++++++++++++
|
||||||
|
1 file changed, 16 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
|
||||||
|
index d3b847ec7465..c58b2c227260 100644
|
||||||
|
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
|
||||||
|
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c
|
||||||
|
@@ -48,6 +48,8 @@
|
||||||
|
#define FORCE_FLASHLESS 0
|
||||||
|
|
||||||
|
static int hw_atl_utils_ver_match(u32 ver_expected, u32 ver_actual);
|
||||||
|
+static int hw_atl_utils_mpi_set_state(struct aq_hw_s *self,
|
||||||
|
+ enum hal_atl_utils_fw_state_e state);
|
||||||
|
|
||||||
|
int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops)
|
||||||
|
{
|
||||||
|
@@ -247,6 +249,20 @@ int hw_atl_utils_soft_reset(struct aq_hw_s *self)
|
||||||
|
|
||||||
|
self->rbl_enabled = (boot_exit_code != 0);
|
||||||
|
|
||||||
|
+ /* FW 1.x may bootup in an invalid POWER state (WOL feature).
|
||||||
|
+ * We should work around this by forcing its state back to DEINIT
|
||||||
|
+ */
|
||||||
|
+ if (!hw_atl_utils_ver_match(HW_ATL_FW_VER_1X,
|
||||||
|
+ aq_hw_read_reg(self,
|
||||||
|
+ HW_ATL_MPI_FW_VERSION))) {
|
||||||
|
+ int err = 0;
|
||||||
|
+
|
||||||
|
+ hw_atl_utils_mpi_set_state(self, MPI_DEINIT);
|
||||||
|
+ AQ_HW_WAIT_FOR((aq_hw_read_reg(self, HW_ATL_MPI_STATE_ADR) &
|
||||||
|
+ HW_ATL_MPI_STATE_MSK) == MPI_DEINIT,
|
||||||
|
+ 10, 1000U);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (self->rbl_enabled)
|
||||||
|
return hw_atl_utils_soft_reset_rbl(self);
|
||||||
|
else
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
92
PKGBUILD
92
PKGBUILD
@ -2,59 +2,60 @@
|
|||||||
# Maintainer: Mark Weiman <markzz@archlinux.net>
|
# Maintainer: Mark Weiman <markzz@archlinux.net>
|
||||||
|
|
||||||
pkgbase=linux-vfio
|
pkgbase=linux-vfio
|
||||||
_srcname=linux-4.15
|
_srcname=linux-4.16
|
||||||
pkgver=4.15.15
|
pkgver=4.16.3
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="http://www.kernel.org/"
|
url="https://www.kernel.org/"
|
||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'libelf')
|
makedepends=('xmlto' 'kmod' 'inetutils' 'bc' 'libelf')
|
||||||
options=('!strip')
|
options=('!strip')
|
||||||
source=("https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
|
source=(
|
||||||
"https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.sign"
|
https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign}
|
||||||
"https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
|
https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.{xz,sign}
|
||||||
"https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.sign"
|
config # the main kernel config file
|
||||||
# the main kernel config files
|
60-linux.hook # pacman hook for depmod
|
||||||
'config'
|
90-linux.hook # pacman hook for initramfs regeneration
|
||||||
# pacman hook for depmod
|
linux.preset # standard config files for mkinitcpio ramdisk
|
||||||
'60-linux.hook'
|
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
|
||||||
# pacman hook for initramfs regeneration
|
0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
|
||||||
'90-linux.hook'
|
0003-Partially-revert-swiotlb-remove-various-exports.patch
|
||||||
# standard config files for mkinitcpio ramdisk
|
0004-Fix-vboxguest-on-guests-with-more-than-4G-RAM.patch
|
||||||
'linux.preset'
|
0005-Revert-drm-amd-display-disable-CRTCs-with-NULL-FB-on.patch
|
||||||
# patches for pci passthrough
|
0006-net-aquantia-Regression-on-reset-with-1.x-firmware.patch
|
||||||
'add-acs-overrides.patch'
|
# patches for pci passthrough
|
||||||
'i915-vga-arbiter.patch'
|
add-acs-overrides.patch
|
||||||
0001-add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by.patch
|
i915-vga-arbiter.patch
|
||||||
0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
|
|
||||||
)
|
)
|
||||||
sha256sums=('5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769'
|
validpgpkeys=(
|
||||||
|
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
|
||||||
|
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
||||||
|
)
|
||||||
|
sha256sums=('63f6dc8e3c9f3a0273d5d6f4dca38a2413ca3a5f689329d05b750e4c87bb21b9'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'd8e7f93e24db5517a1be2030a765431120e07f7cd55e510d0de562c70e45bc00'
|
'336252cb15f2f2574461c1d3daabf5dc207842526085802270e1e5223f645db3'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'f38927db126ec7141ea2dd70cabb2ef378552672b31db4ab621493928497abd7'
|
'51f794dee6098b19b5f8ec2277f52a313584f2ff8b3abf111f2fd92a6ea118dd'
|
||||||
'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
|
'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21'
|
||||||
'75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
|
'75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919'
|
||||||
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
|
'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65'
|
||||||
'1a4a992199d4d70f7f35735f63a634bb605c2b594b7352ad5fd54512737d2784'
|
'a6119b46856ed2652c509fed380052e6df2be89c69a0d748cf7d8745bf35b871'
|
||||||
'7cb4a5da6bf551dbb2db2e0b4e4d0774ee98cc30d9e617e030b27e6cba3e6293'
|
'545566a7358d711b8d4f9924df685e2410549e20d99e5d1c0dfaccdfeafda60d'
|
||||||
'4ffdc2a458845c2a7c03c735477dbf51b5b01b10568bf577b37a29e872135cab'
|
'bef6dd7b3a749ec072614ea4ed0bd5ea1d90519731f3438e4938d5b957032cc5'
|
||||||
'12b281dc45f1954cc3f52276927bb2965c3132c0a8bd7f485869ced2c541d485')
|
'd647211e288436bcc010019a69f4ebf9a94c33b423c650aea8098969208ec836'
|
||||||
validpgpkeys=(
|
'6fb4fb81dab69ff432767e02585b3eb6a5a39c941e4bc2a6d4940ee17116c14e'
|
||||||
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
|
'd49a70d3b3f60c81d93735871f01ea60cafca87588d8d0d01801b2aec92e0e93'
|
||||||
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
'abe269c6596b54a412bd8415472153f419026d4f367fa3ee1ebc8693ac66915d'
|
||||||
)
|
'fe3d47fe6f54d4a82c869fd29484d3f097b5906ef4d456409961a8dd647daad0')
|
||||||
|
|
||||||
_kernelname=${pkgbase#linux}
|
_kernelname=${pkgbase#linux}
|
||||||
|
: ${_kernelname:=-ARCH}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd ${_srcname}
|
cd ${_srcname}
|
||||||
|
|
||||||
# add upstream patch
|
# add upstream patch
|
||||||
patch -p1 -i ../patch-${pkgver}
|
patch -p1 -i ../patch-${pkgver}
|
||||||
chmod +x tools/objtool/sync-check.sh # GNU patch doesn't support git-style file mode
|
|
||||||
|
|
||||||
# security patches
|
|
||||||
|
|
||||||
# add latest fixes from stable queue, if needed
|
# add latest fixes from stable queue, if needed
|
||||||
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
||||||
@ -65,6 +66,18 @@ prepare() {
|
|||||||
# https://bugs.archlinux.org/task/56711
|
# https://bugs.archlinux.org/task/56711
|
||||||
patch -Np1 -i ../0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
|
patch -Np1 -i ../0002-drm-i915-edp-Only-use-the-alternate-fixed-mode-if-it.patch
|
||||||
|
|
||||||
|
# NVIDIA driver compat
|
||||||
|
patch -Np1 -i ../0003-Partially-revert-swiotlb-remove-various-exports.patch
|
||||||
|
|
||||||
|
# https://bugs.archlinux.org/task/58153
|
||||||
|
patch -Np1 -i ../0004-Fix-vboxguest-on-guests-with-more-than-4G-RAM.patch
|
||||||
|
|
||||||
|
# https://bugs.archlinux.org/task/58158
|
||||||
|
patch -Np1 -i ../0005-Revert-drm-amd-display-disable-CRTCs-with-NULL-FB-on.patch
|
||||||
|
|
||||||
|
# https://bugs.archlinux.org/task/58174
|
||||||
|
patch -Np1 -i ../0006-net-aquantia-Regression-on-reset-with-1.x-firmware.patch
|
||||||
|
|
||||||
# patches for vga arbiter fix in intel systems
|
# patches for vga arbiter fix in intel systems
|
||||||
patch -p1 -i "${srcdir}/i915-vga-arbiter.patch"
|
patch -p1 -i "${srcdir}/i915-vga-arbiter.patch"
|
||||||
|
|
||||||
@ -76,6 +89,7 @@ CONFIG_LOCALVERSION="${_kernelname}"
|
|||||||
CONFIG_LOCALVERSION_AUTO=n
|
CONFIG_LOCALVERSION_AUTO=n
|
||||||
END
|
END
|
||||||
|
|
||||||
|
# set extraversion to pkgrel and empty localversion
|
||||||
sed -e "/^EXTRAVERSION =/s/=.*/= -${pkgrel}/" \
|
sed -e "/^EXTRAVERSION =/s/=.*/= -${pkgrel}/" \
|
||||||
-e "/^EXTRAVERSION =/aLOCALVERSION =" \
|
-e "/^EXTRAVERSION =/aLOCALVERSION =" \
|
||||||
-i Makefile
|
-i Makefile
|
||||||
@ -124,7 +138,7 @@ _package() {
|
|||||||
cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
|
cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
|
||||||
|
|
||||||
# make room for external modules
|
# make room for external modules
|
||||||
local _extramodules="extramodules-${_basekernel}${_kernelname:--ARCH}"
|
local _extramodules="extramodules-${_basekernel}${_kernelname}"
|
||||||
ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
|
ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
|
||||||
|
|
||||||
# add real version for building modules and running depmod from hook
|
# add real version for building modules and running depmod from hook
|
||||||
@ -183,9 +197,6 @@ _package-headers() {
|
|||||||
install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
|
install -Dt "${_builddir}/drivers/md" -m644 drivers/md/*.h
|
||||||
install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
|
install -Dt "${_builddir}/net/mac80211" -m644 net/mac80211/*.h
|
||||||
|
|
||||||
# http://bugs.archlinux.org/task/9912
|
|
||||||
install -Dt "${_builddir}/drivers/media/dvb-core" -m644 drivers/media/dvb-core/*.h
|
|
||||||
|
|
||||||
# http://bugs.archlinux.org/task/13146
|
# http://bugs.archlinux.org/task/13146
|
||||||
install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
install -Dt "${_builddir}/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||||
|
|
||||||
@ -213,6 +224,9 @@ _package-headers() {
|
|||||||
# remove files already in linux-docs package
|
# remove files already in linux-docs package
|
||||||
rm -r "${_builddir}/Documentation"
|
rm -r "${_builddir}/Documentation"
|
||||||
|
|
||||||
|
# remove now broken symlinks
|
||||||
|
find -L "${_builddir}" -type l -printf 'Removing %P\n' -delete
|
||||||
|
|
||||||
# Fix permissions
|
# Fix permissions
|
||||||
chmod -R u=rwX,go=rX "${_builddir}"
|
chmod -R u=rwX,go=rX "${_builddir}"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
From 0457fc4aaca4bc954154347b209d1da78ba7f2d7 Mon Sep 17 00:00:00 2001
|
From 8afeb76790377fe42c4c91c9cb7d311078e9a7ae Mon Sep 17 00:00:00 2001
|
||||||
From: Mark Weiman <mark.weiman@markzz.com>
|
From: Mark Weiman <mark.weiman@markzz.com>
|
||||||
Date: Wed, 7 Feb 2018 16:04:03 -0500
|
Date: Fri, 20 Apr 2018 13:17:23 -0400
|
||||||
Subject: [PATCH] pci: Enable overrides for missing ACS capabilities (4.15)
|
Subject: [PATCH] pci: Enable overrides for missing ACS capabilities (4.16)
|
||||||
|
|
||||||
This an updated version of Alex Williamson's patch from:
|
This an updated version of Alex Williamson's patch from:
|
||||||
https://lkml.org/lkml/2013/5/30/513
|
https://lkml.org/lkml/2013/5/30/513
|
||||||
@ -47,15 +47,15 @@ your customers the hassle of this boot option.
|
|||||||
|
|
||||||
Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
|
Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
|
||||||
---
|
---
|
||||||
Documentation/admin-guide/kernel-parameters.txt | 9 +++
|
.../admin-guide/kernel-parameters.txt | 9 ++
|
||||||
drivers/pci/quirks.c | 101 ++++++++++++++++++++++++
|
drivers/pci/quirks.c | 101 ++++++++++++++++++
|
||||||
2 files changed, 110 insertions(+)
|
2 files changed, 110 insertions(+)
|
||||||
|
|
||||||
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
||||||
index 46b26bfee27b..9018767828b0 100644
|
index 1d1d53f85ddd..fa7110ca99e2 100644
|
||||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||||
@@ -2966,6 +2966,15 @@
|
@@ -2983,6 +2983,15 @@
|
||||||
nomsi [MSI] If the PCI_MSI kernel config parameter is
|
nomsi [MSI] If the PCI_MSI kernel config parameter is
|
||||||
enabled, this kernel boot option can be used to
|
enabled, this kernel boot option can be used to
|
||||||
disable the use of MSI interrupts system-wide.
|
disable the use of MSI interrupts system-wide.
|
||||||
@ -72,10 +72,10 @@ index 46b26bfee27b..9018767828b0 100644
|
|||||||
Safety option to keep boot IRQs enabled. This
|
Safety option to keep boot IRQs enabled. This
|
||||||
should never be necessary.
|
should never be necessary.
|
||||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||||
index 10684b17d0bd..091c8a0aca1e 100644
|
index 46d47bd6ca1f..90aaf6ae8544 100644
|
||||||
--- a/drivers/pci/quirks.c
|
--- a/drivers/pci/quirks.c
|
||||||
+++ b/drivers/pci/quirks.c
|
+++ b/drivers/pci/quirks.c
|
||||||
@@ -3680,6 +3680,106 @@ static int __init pci_apply_final_quirks(void)
|
@@ -3687,6 +3687,106 @@ static int __init pci_apply_final_quirks(void)
|
||||||
|
|
||||||
fs_initcall_sync(pci_apply_final_quirks);
|
fs_initcall_sync(pci_apply_final_quirks);
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ index 10684b17d0bd..091c8a0aca1e 100644
|
|||||||
/*
|
/*
|
||||||
* Following are device-specific reset methods which can be used to
|
* Following are device-specific reset methods which can be used to
|
||||||
* reset a single function if other methods (e.g. FLR, PM D0->D3) are
|
* reset a single function if other methods (e.g. FLR, PM D0->D3) are
|
||||||
@@ -4512,6 +4612,7 @@ static const struct pci_dev_acs_enabled {
|
@@ -4523,6 +4623,7 @@ static const struct pci_dev_acs_enabled {
|
||||||
{ PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
|
{ PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
|
||||||
/* APM X-Gene */
|
/* APM X-Gene */
|
||||||
{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
|
{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
|
||||||
@ -191,5 +191,5 @@ index 10684b17d0bd..091c8a0aca1e 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
--
|
--
|
||||||
2.16.1
|
2.17.0
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
From 7209b38ae2b81e6d79aecb77263580f8840e459a Mon Sep 17 00:00:00 2001
|
From 5918c8e3a6d12e391f05ea85b24a19a899dd16b1 Mon Sep 17 00:00:00 2001
|
||||||
From: Mark Weiman <mark.weiman@markzz.com>
|
From: Mark Weiman <mark.weiman@markzz.com>
|
||||||
Date: Wed, 7 Feb 2018 19:50:27 -0500
|
Date: Fri, 20 Apr 2018 13:16:39 -0400
|
||||||
Subject: [PATCH] i915: Add module option to support VGA arbiter on HD devices
|
Subject: [PATCH] i915: Add module option to support VGA arbiter on HD devices
|
||||||
(4.15)
|
(4.16)
|
||||||
|
|
||||||
This is an updated version of Alex Williamson's patch from:
|
This is an updated version of Alex Williamson's patch from:
|
||||||
https://lkml.org/lkml/2014/5/9/517
|
https://lkml.org/lkml/2014/5/9/517
|
||||||
@ -37,23 +37,23 @@ until after vgacon->fbcon handoff.
|
|||||||
|
|
||||||
Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
|
Signed-off-by: Mark Weiman <mark.weiman@markzz.com>
|
||||||
---
|
---
|
||||||
drivers/gpu/drm/i915/i915_drv.c | 22 +++++++++++++++++++---
|
drivers/gpu/drm/i915/i915_drv.c | 22 ++++++++++++++++---
|
||||||
drivers/gpu/drm/i915/i915_params.c | 3 +++
|
drivers/gpu/drm/i915/i915_params.c | 3 +++
|
||||||
drivers/gpu/drm/i915/i915_params.h | 1 +
|
drivers/gpu/drm/i915/i915_params.h | 1 +
|
||||||
drivers/gpu/drm/i915/intel_display.c | 33 +++++++++++++++++++++++++++++++++
|
drivers/gpu/drm/i915/intel_display.c | 33 ++++++++++++++++++++++++++++
|
||||||
drivers/gpu/drm/i915/intel_drv.h | 1 +
|
drivers/gpu/drm/i915/intel_drv.h | 1 +
|
||||||
5 files changed, 57 insertions(+), 3 deletions(-)
|
5 files changed, 57 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
|
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
|
||||||
index 2cf10d17acfb..794590a2dcf3 100644
|
index 2f5209de0391..7c875c651236 100644
|
||||||
--- a/drivers/gpu/drm/i915/i915_drv.c
|
--- a/drivers/gpu/drm/i915/i915_drv.c
|
||||||
+++ b/drivers/gpu/drm/i915/i915_drv.c
|
+++ b/drivers/gpu/drm/i915/i915_drv.c
|
||||||
@@ -641,10 +641,20 @@ static int i915_load_modeset_init(struct drm_device *dev)
|
@@ -647,10 +647,20 @@ static int i915_load_modeset_init(struct drm_device *dev)
|
||||||
* If we are a secondary display controller (!PCI_DISPLAY_CLASS_VGA),
|
* If we are a secondary display controller (!PCI_DISPLAY_CLASS_VGA),
|
||||||
* then we do not take part in VGA arbitration and the
|
* then we do not take part in VGA arbitration and the
|
||||||
* vga_client_register() fails with -ENODEV.
|
* vga_client_register() fails with -ENODEV.
|
||||||
+ *
|
+ *
|
||||||
+ * NB. The set_decode callback here actually works on GMCH
|
+ * NB. The set_decode callback here actually works on GMCH
|
||||||
+ * devices, on newer HD devices we can only disable VGA MMIO space.
|
+ * devices, on newer HD devices we can only disable VGA MMIO space.
|
||||||
+ * Disabling VGA I/O space requires disabling I/O in the PCI command
|
+ * Disabling VGA I/O space requires disabling I/O in the PCI command
|
||||||
+ * register. Nonetheless, we like to pretend that we participate in
|
+ * register. Nonetheless, we like to pretend that we participate in
|
||||||
@ -72,7 +72,7 @@ index 2cf10d17acfb..794590a2dcf3 100644
|
|||||||
|
|
||||||
intel_register_dsm_handler();
|
intel_register_dsm_handler();
|
||||||
|
|
||||||
@@ -686,6 +696,12 @@ static int i915_load_modeset_init(struct drm_device *dev)
|
@@ -692,6 +702,12 @@ static int i915_load_modeset_init(struct drm_device *dev)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto cleanup_gem;
|
goto cleanup_gem;
|
||||||
|
|
||||||
@ -86,10 +86,10 @@ index 2cf10d17acfb..794590a2dcf3 100644
|
|||||||
intel_hpd_init(dev_priv);
|
intel_hpd_init(dev_priv);
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
|
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
|
||||||
index b4faeb6aa2bd..fdf2ce69b34d 100644
|
index b5f3eb4fa8a3..8fe95b729c22 100644
|
||||||
--- a/drivers/gpu/drm/i915/i915_params.c
|
--- a/drivers/gpu/drm/i915/i915_params.c
|
||||||
+++ b/drivers/gpu/drm/i915/i915_params.c
|
+++ b/drivers/gpu/drm/i915/i915_params.c
|
||||||
@@ -146,6 +146,9 @@ i915_param_named(disable_display, bool, 0400,
|
@@ -133,6 +133,9 @@ i915_param_named(disable_display, bool, 0400,
|
||||||
i915_param_named_unsafe(enable_cmd_parser, bool, 0400,
|
i915_param_named_unsafe(enable_cmd_parser, bool, 0400,
|
||||||
"Enable command parsing (true=enabled [default], false=disabled)");
|
"Enable command parsing (true=enabled [default], false=disabled)");
|
||||||
|
|
||||||
@ -100,10 +100,10 @@ index b4faeb6aa2bd..fdf2ce69b34d 100644
|
|||||||
"Enable the MMIO debug code for the first N failures (default: off). "
|
"Enable the MMIO debug code for the first N failures (default: off). "
|
||||||
"This may negatively affect performance.");
|
"This may negatively affect performance.");
|
||||||
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
|
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
|
||||||
index c7292268ed43..75577d34b0c8 100644
|
index c96360398072..f76b34e91ea0 100644
|
||||||
--- a/drivers/gpu/drm/i915/i915_params.h
|
--- a/drivers/gpu/drm/i915/i915_params.h
|
||||||
+++ b/drivers/gpu/drm/i915/i915_params.h
|
+++ b/drivers/gpu/drm/i915/i915_params.h
|
||||||
@@ -56,6 +56,7 @@
|
@@ -58,6 +58,7 @@ struct drm_printer;
|
||||||
/* leave bools at the end to not create holes */ \
|
/* leave bools at the end to not create holes */ \
|
||||||
param(bool, alpha_support, IS_ENABLED(CONFIG_DRM_I915_ALPHA_SUPPORT)) \
|
param(bool, alpha_support, IS_ENABLED(CONFIG_DRM_I915_ALPHA_SUPPORT)) \
|
||||||
param(bool, enable_cmd_parser, true) \
|
param(bool, enable_cmd_parser, true) \
|
||||||
@ -112,10 +112,10 @@ index c7292268ed43..75577d34b0c8 100644
|
|||||||
param(bool, fastboot, false) \
|
param(bool, fastboot, false) \
|
||||||
param(bool, prefault_disable, false) \
|
param(bool, prefault_disable, false) \
|
||||||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
|
||||||
index 50f8443641b8..06aebb05f23c 100644
|
index f288bcc7be22..9d6e3d35a2ff 100644
|
||||||
--- a/drivers/gpu/drm/i915/intel_display.c
|
--- a/drivers/gpu/drm/i915/intel_display.c
|
||||||
+++ b/drivers/gpu/drm/i915/intel_display.c
|
+++ b/drivers/gpu/drm/i915/intel_display.c
|
||||||
@@ -14379,6 +14379,36 @@ static void i915_disable_vga(struct drm_i915_private *dev_priv)
|
@@ -14335,6 +14335,36 @@ static void i915_disable_vga(struct drm_i915_private *dev_priv)
|
||||||
POSTING_READ(vga_reg);
|
POSTING_READ(vga_reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ index 50f8443641b8..06aebb05f23c 100644
|
|||||||
void intel_modeset_init_hw(struct drm_device *dev)
|
void intel_modeset_init_hw(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||||
@@ -14877,6 +14907,7 @@ void i915_redisable_vga_power_on(struct drm_i915_private *dev_priv)
|
@@ -14854,6 +14884,7 @@ void i915_redisable_vga_power_on(struct drm_i915_private *dev_priv)
|
||||||
if (!(I915_READ(vga_reg) & VGA_DISP_DISABLE)) {
|
if (!(I915_READ(vga_reg) & VGA_DISP_DISABLE)) {
|
||||||
DRM_DEBUG_KMS("Something enabled VGA plane, disabling it\n");
|
DRM_DEBUG_KMS("Something enabled VGA plane, disabling it\n");
|
||||||
i915_disable_vga(dev_priv);
|
i915_disable_vga(dev_priv);
|
||||||
@ -160,7 +160,7 @@ index 50f8443641b8..06aebb05f23c 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15252,6 +15283,8 @@ void intel_modeset_cleanup(struct drm_device *dev)
|
@@ -15225,6 +15256,8 @@ void intel_modeset_cleanup(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||||
|
|
||||||
@ -170,10 +170,10 @@ index 50f8443641b8..06aebb05f23c 100644
|
|||||||
WARN_ON(!llist_empty(&dev_priv->atomic_helper.free_list));
|
WARN_ON(!llist_empty(&dev_priv->atomic_helper.free_list));
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
|
||||||
index 5d77f75a9f9c..982fff761e9d 100644
|
index 30f791f89d64..a922629bf376 100644
|
||||||
--- a/drivers/gpu/drm/i915/intel_drv.h
|
--- a/drivers/gpu/drm/i915/intel_drv.h
|
||||||
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
+++ b/drivers/gpu/drm/i915/intel_drv.h
|
||||||
@@ -1340,6 +1340,7 @@ int vlv_get_cck_clock_hpll(struct drm_i915_private *dev_priv,
|
@@ -1348,6 +1348,7 @@ int vlv_get_cck_clock_hpll(struct drm_i915_private *dev_priv,
|
||||||
const char *name, u32 reg);
|
const char *name, u32 reg);
|
||||||
void lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv);
|
void lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv);
|
||||||
void lpt_disable_iclkip(struct drm_i915_private *dev_priv);
|
void lpt_disable_iclkip(struct drm_i915_private *dev_priv);
|
||||||
@ -182,5 +182,5 @@ index 5d77f75a9f9c..982fff761e9d 100644
|
|||||||
unsigned int intel_fb_xy_to_linear(int x, int y,
|
unsigned int intel_fb_xy_to_linear(int x, int y,
|
||||||
const struct intel_plane_state *state,
|
const struct intel_plane_state *state,
|
||||||
--
|
--
|
||||||
2.16.1
|
2.17.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user