Merge remote-tracking branch 'origin/master' into buster-pve-kernel-5.11
This commit is contained in:
commit
6a4ab85881
7
Makefile
7
Makefile
@ -4,9 +4,9 @@ KERNEL_MIN=11
|
||||
KERNEL_PATCHLEVEL=22
|
||||
# increment KREL if the ABI changes (abicheck target in debian/rules)
|
||||
# rebuild packages with new KREL and run 'make abiupdate'
|
||||
KREL=2
|
||||
KREL=4
|
||||
|
||||
PKGREL=4~bpo10
|
||||
PKGREL=8~bpo10+1
|
||||
|
||||
KERNEL_MAJMIN=$(KERNEL_MAJ).$(KERNEL_MIN)
|
||||
KERNEL_VER=$(KERNEL_MAJMIN).$(KERNEL_PATCHLEVEL)
|
||||
@ -48,8 +48,9 @@ DST_DEB=${PACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
|
||||
HDR_DEB=${HDRPACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
|
||||
USR_HDR_DEB=pve-kernel-libc-dev_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
|
||||
LINUX_TOOLS_DEB=linux-tools-$(KERNEL_MAJMIN)_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
|
||||
LINUX_TOOLS_DBG_DEB=linux-tools-$(KERNEL_MAJMIN)-dbgsym_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
|
||||
|
||||
DEBS=${DST_DEB} ${HDR_DEB} ${USR_HDR_DEB} ${LINUX_TOOLS_DEB}
|
||||
DEBS=${DST_DEB} ${HDR_DEB} ${USR_HDR_DEB} ${LINUX_TOOLS_DEB} ${LINUX_TOOLS_DBG_DEB}
|
||||
|
||||
all: deb
|
||||
deb: ${DEBS}
|
||||
|
17
README
17
README
@ -98,6 +98,18 @@ which device is actually used for /dev/watchdog.
|
||||
We ship this list in /lib/modprobe.d/blacklist_pve-kernel-<VERSION>.conf
|
||||
The user typically edit /etc/modules to enable a specific watchdog device.
|
||||
|
||||
Debug kernel and modules
|
||||
------------------------
|
||||
|
||||
In order to build a -dbgsym package containing an unstripped copy of the kernel
|
||||
image and modules, enable the 'pkg.pve-kernel.debug' build profile (e.g. by
|
||||
exporting DEB_BUILD_PROFILES='pkg.pve-kernel.debug'). The resulting package can
|
||||
be used together with 'crash'/'kdump-tools' to debug kernel crashes.
|
||||
|
||||
Note: the -dbgsym package is only valid for the pve-kernel packages produced by
|
||||
the same build. A kernel/module from a different build will likely not match,
|
||||
even if both builds are of the same kernel and package version.
|
||||
|
||||
Additional information
|
||||
----------------------
|
||||
|
||||
@ -121,11 +133,6 @@ NOTE: For the exact and current list see debian/rules (PVE_CONFIG_OPTS)
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
|
||||
- add workaround for Debian bug #807000 (see
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807000)
|
||||
|
||||
CONFIG_BLK_DEV_NVME=y
|
||||
|
||||
- compile NBD and RBD modules
|
||||
CONFIG_BLK_DEV_NBD=m
|
||||
CONFIG_BLK_DEV_RBD=m
|
||||
|
25443
abi-prev-5.11.22-2-pve
25443
abi-prev-5.11.22-2-pve
File diff suppressed because it is too large
Load Diff
25441
abi-prev-5.11.22-4-pve
Normal file
25441
abi-prev-5.11.22-4-pve
Normal file
File diff suppressed because it is too large
Load Diff
39
debian/changelog
vendored
39
debian/changelog
vendored
@ -1,3 +1,42 @@
|
||||
pve-kernel (5.11.22-8~bpo10+1) buster-backports; urgency=medium
|
||||
|
||||
* Rebuild for buster-backports.
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Thu, 09 Sep 2021 09:55:58 +0200
|
||||
|
||||
pve-kernel (5.11.22-8) bullseye; urgency=medium
|
||||
|
||||
* update to Ubuntu-5.11.0-34.36
|
||||
|
||||
* fix #3552: cherry-pick PCI probe fixes
|
||||
|
||||
* build nvme as a module again to satisfy some inflexible (mellanox) modules
|
||||
insisting in being able to load the nvme-core module as dependency
|
||||
|
||||
* bump ABI to 5.11.22-4
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Fri, 27 Aug 2021 11:51:34 +0200
|
||||
|
||||
pve-kernel (5.11.22-7) bullseye; urgency=medium
|
||||
|
||||
* cherry-pick fixes for CVE-2021-3656 and CVE-2021-3653
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 18 Aug 2021 15:06:12 +0200
|
||||
|
||||
pve-kernel (5.11.22-6) bullseye; urgency=medium
|
||||
|
||||
* io_uring: don't block level reissue off completion path
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 28 Jul 2021 10:51:12 +0200
|
||||
|
||||
pve-kernel (5.11.22-5) bullseye; urgency=medium
|
||||
|
||||
* import Ubuntu-5.11.0-26.28
|
||||
|
||||
* pull in upstream stable releases from v5.10.44, v5.12.11
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 21 Jul 2021 18:25:44 +0200
|
||||
|
||||
pve-kernel (5.11.22-4~bpo10) bullseye; urgency=medium
|
||||
|
||||
* backport to Debian Buster based releases
|
||||
|
1
debian/control.in
vendored
1
debian/control.in
vendored
@ -71,6 +71,7 @@ Architecture: any
|
||||
Provides: linux-debug
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Build-Profiles: <pkg.pve-kernel.debug>
|
||||
Description: The Proxmox PVE Kernel debug image
|
||||
This package provides the kernel debug image for version @KVNAME@. The debug
|
||||
kernel image contained in this package is NOT meant to boot from - it is
|
||||
|
9
debian/rules
vendored
9
debian/rules
vendored
@ -40,7 +40,7 @@ PVE_CONFIG_OPTS= \
|
||||
-e CONFIG_BLK_DEV_SD \
|
||||
-e CONFIG_BLK_DEV_SR \
|
||||
-e CONFIG_BLK_DEV_DM \
|
||||
-e CONFIG_BLK_DEV_NVME \
|
||||
-m CONFIG_BLK_DEV_NVME \
|
||||
-e CONFIG_NLS_ISO8859_1 \
|
||||
-d CONFIG_INPUT_EVBUG \
|
||||
-d CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND \
|
||||
@ -76,6 +76,7 @@ PVE_CONFIG_OPTS= \
|
||||
-d CONFIG_UNWINDER_GUESS \
|
||||
-e CONFIG_UNWINDER_FRAME_POINTER \
|
||||
--set-str CONFIG_SYSTEM_TRUSTED_KEYS ""\
|
||||
--set-str CONFIG_SYSTEM_REVOCATION_KEYS ""\
|
||||
-d CONFIG_SECURITY_LOCKDOWN_LSM \
|
||||
-d CONFIG_SECURITY_LOCKDOWN_LSM_EARLY \
|
||||
--set-str CONFIG_LSM yama,integrity,apparmor \
|
||||
@ -138,7 +139,10 @@ binary: install
|
||||
# remove firmware
|
||||
rm -rf debian/${PVE_KERNEL_PKG}/lib/firmware
|
||||
|
||||
# debug package
|
||||
ifeq ($(filter pkg.pve-kernel.debug,$(DEB_BUILD_PROFILES)),)
|
||||
echo "'pkg.pve-kernel.debug' build profile disabled, skipping -dbgsym creation"
|
||||
else
|
||||
echo "'pkg.pve-kernel.debug' build profile enabled, creating -dbgsym contents"
|
||||
mkdir -p debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}
|
||||
mkdir debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/boot
|
||||
install -m 644 ${KERNEL_SRC}/vmlinux debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/boot/vmlinux-${KVNAME}
|
||||
@ -146,6 +150,7 @@ binary: install
|
||||
rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/source
|
||||
rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/build
|
||||
rm -f debian/${PVE_DEBUG_KERNEL_PKG}/usr/lib/debug/lib/modules/${KVNAME}/modules.*
|
||||
endif
|
||||
|
||||
# strip debug info
|
||||
find debian/${PVE_KERNEL_PKG}/lib/modules -name \*.ko -print | while read f ; do strip --strip-debug "$$f"; done
|
||||
|
@ -14,6 +14,9 @@ advansys/mcode.bin kernel/drivers/scsi/advansys.ko
|
||||
agere_ap_fw.bin kernel/drivers/net/wireless/intersil/orinoco/orinoco.ko
|
||||
agere_sta_fw.bin kernel/drivers/net/wireless/intersil/orinoco/orinoco.ko
|
||||
aic94xx-seq.fw kernel/drivers/scsi/aic94xx/aic94xx.ko
|
||||
amd/amd_sev_fam17h_model0xh.sbin kernel/drivers/crypto/ccp/ccp.ko
|
||||
amd/amd_sev_fam17h_model3xh.sbin kernel/drivers/crypto/ccp/ccp.ko
|
||||
amd/amd_sev_fam19h_model0xh.sbin kernel/drivers/crypto/ccp/ccp.ko
|
||||
amdgpu/arcturus_asd.bin kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko
|
||||
amdgpu/arcturus_gpu_info.bin kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko
|
||||
amdgpu/arcturus_mec2.bin kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko
|
||||
|
@ -55,10 +55,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
2 files changed, 111 insertions(+)
|
||||
|
||||
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
||||
index 52b2f13eb26f..8c1bec09424b 100644
|
||||
index ee85be64b680..a38a8e44422e 100644
|
||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||
@@ -3647,6 +3647,15 @@
|
||||
@@ -3653,6 +3653,15 @@
|
||||
Also, it enforces the PCI Local Bus spec
|
||||
rule that those bits should be 0 in system reset
|
||||
events (useful for kexec/kdump cases).
|
||||
@ -75,7 +75,7 @@ index 52b2f13eb26f..8c1bec09424b 100644
|
||||
Safety option to keep boot IRQs enabled. This
|
||||
should never be necessary.
|
||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||
index fb13b3109a43..ee39f6c3dc3a 100644
|
||||
index f32e521ade1e..4f3558d0c00a 100644
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -192,6 +192,106 @@ static int __init pci_apply_final_quirks(void)
|
||||
@ -185,7 +185,7 @@ index fb13b3109a43..ee39f6c3dc3a 100644
|
||||
/*
|
||||
* Decoding should be disabled for a PCI device during BAR sizing to avoid
|
||||
* conflict. But doing so may cause problems on host bridge and perhaps other
|
||||
@@ -4770,6 +4870,8 @@ static const struct pci_dev_acs_enabled {
|
||||
@@ -4857,6 +4957,8 @@ static const struct pci_dev_acs_enabled {
|
||||
{ PCI_VENDOR_ID_CAVIUM, PCI_ANY_ID, pci_quirk_cavium_acs },
|
||||
/* APM X-Gene */
|
||||
{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
|
||||
|
@ -13,7 +13,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
|
||||
index 7377346be880..0979e4ab19ae 100644
|
||||
index 14e6c73a6031..c191c9e50735 100644
|
||||
--- a/virt/kvm/kvm_main.c
|
||||
+++ b/virt/kvm/kvm_main.c
|
||||
@@ -77,7 +77,7 @@ module_param(halt_poll_ns, uint, 0644);
|
||||
|
@ -10,10 +10,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/net/core/dev.c b/net/core/dev.c
|
||||
index 76e593a4cc30..c1e9097e7a08 100644
|
||||
index b91b76890cbc..cb7ffc3e848b 100644
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -10346,7 +10346,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
|
||||
@@ -10365,7 +10365,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
|
||||
refcnt = netdev_refcnt_read(dev);
|
||||
|
||||
if (refcnt && time_after(jiffies, warning_time + 10 * HZ)) {
|
||||
|
@ -0,0 +1,46 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Ebner <f.ebner@proxmox.com>
|
||||
Date: Wed, 28 Jul 2021 08:55:31 +0200
|
||||
Subject: [PATCH] io_uring: don't block level reissue off completion path
|
||||
|
||||
Some setups, like SCSI, can throw spurious -EAGAIN off the softirq
|
||||
completion path. Normally we expect this to happen inline as part
|
||||
of submission, but apparently SCSI has a weird corner case where it
|
||||
can happen as part of normal completions.
|
||||
|
||||
This should be solved by having the -EAGAIN bubble back up the stack
|
||||
as part of submission, but previous attempts at this failed and we're
|
||||
not just quite there yet. Instead we currently use REQ_F_REISSUE to
|
||||
handle this case.
|
||||
|
||||
For now, catch it in io_rw_should_reissue() and prevent a reissue
|
||||
from a bogus path.
|
||||
|
||||
Upstream mail:
|
||||
https://lore.kernel.org/io-uring/20210727165811.284510-3-axboe@kernel.dk/T/#u
|
||||
|
||||
Originally-by: Jens Axboe <axboe@kernel.dk>
|
||||
[backport]
|
||||
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
|
||||
---
|
||||
fs/io_uring.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/fs/io_uring.c b/fs/io_uring.c
|
||||
index a0d42aea3aa1..ce5cf51a5667 100644
|
||||
--- a/fs/io_uring.c
|
||||
+++ b/fs/io_uring.c
|
||||
@@ -2731,6 +2731,13 @@ static bool io_rw_reissue(struct io_kiocb *req, long res)
|
||||
if (percpu_ref_is_dying(&req->ctx->refs))
|
||||
return false;
|
||||
|
||||
+ /*
|
||||
+ * Play it safe and assume not safe to re-import and reissue if we're
|
||||
+ * not in the original thread group (or in task context).
|
||||
+ */
|
||||
+ if (!same_thread_group(req->task, current) || !in_task())
|
||||
+ return false;
|
||||
+
|
||||
lockdep_assert_held(&req->ctx->uring_lock);
|
||||
|
||||
ret = io_sq_thread_acquire_mm_files(req->ctx, req);
|
@ -1,34 +0,0 @@
|
||||
From 8cae8cd89f05f6de223d63e6d15e31c8ba9cf53b Mon Sep 17 00:00:00 2001
|
||||
From: Eric Sandeen <sandeen@redhat.com>
|
||||
Date: Tue, 13 Jul 2021 17:49:23 +0200
|
||||
Subject: seq_file: disallow extremely large seq buffer allocations
|
||||
|
||||
There is no reasonable need for a buffer larger than this, and it avoids
|
||||
int overflow pitfalls.
|
||||
|
||||
Fixes: 058504edd026 ("fs/seq_file: fallback to vmalloc allocation")
|
||||
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
|
||||
Reported-by: Qualys Security Advisory <qsa@qualys.com>
|
||||
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
||||
Cc: stable@kernel.org
|
||||
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
||||
---
|
||||
fs/seq_file.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/fs/seq_file.c b/fs/seq_file.c
|
||||
index b117b212ef288..4a2cda04d3e29 100644
|
||||
--- a/fs/seq_file.c
|
||||
+++ b/fs/seq_file.c
|
||||
@@ -32,6 +32,9 @@ static void seq_set_overflow(struct seq_file *m)
|
||||
|
||||
static void *seq_buf_alloc(unsigned long size)
|
||||
{
|
||||
+ if (unlikely(size > MAX_RW_COUNT))
|
||||
+ return NULL;
|
||||
+
|
||||
return kvmalloc(size, GFP_KERNEL_ACCOUNT);
|
||||
}
|
||||
|
||||
--
|
||||
cgit 1.2.3-1.el7
|
@ -0,0 +1,102 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
|
||||
Date: Mon, 2 Aug 2021 10:22:30 +0200
|
||||
Subject: [PATCH] Revert "PCI: Coalesce host bridge contiguous apertures"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This reverts commit c2ff8072deba40887560dc73dd2e558ec539ea09.
|
||||
|
||||
was reverted upstream because of reports similar to
|
||||
|
||||
Link: https://bugzilla.proxmox.com/show_bug.cgi?id=3552
|
||||
Link: https://lore.kernel.org/r/20210709231529.GA3270116@roeck-us.net
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
drivers/pci/probe.c | 49 ++++-----------------------------------------
|
||||
1 file changed, 4 insertions(+), 45 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
|
||||
index 04664d4fe4be..be51670572fa 100644
|
||||
--- a/drivers/pci/probe.c
|
||||
+++ b/drivers/pci/probe.c
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <linux/hypervisor.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
-#include <linux/list_sort.h>
|
||||
#include "pci.h"
|
||||
|
||||
#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */
|
||||
@@ -875,30 +874,14 @@ static void pci_set_bus_msi_domain(struct pci_bus *bus)
|
||||
dev_set_msi_domain(&bus->dev, d);
|
||||
}
|
||||
|
||||
-static int res_cmp(void *priv, struct list_head *a, struct list_head *b)
|
||||
-{
|
||||
- struct resource_entry *entry1, *entry2;
|
||||
-
|
||||
- entry1 = container_of(a, struct resource_entry, node);
|
||||
- entry2 = container_of(b, struct resource_entry, node);
|
||||
-
|
||||
- if (entry1->res->flags != entry2->res->flags)
|
||||
- return entry1->res->flags > entry2->res->flags;
|
||||
-
|
||||
- if (entry1->offset != entry2->offset)
|
||||
- return entry1->offset > entry2->offset;
|
||||
-
|
||||
- return entry1->res->start > entry2->res->start;
|
||||
-}
|
||||
-
|
||||
static int pci_register_host_bridge(struct pci_host_bridge *bridge)
|
||||
{
|
||||
struct device *parent = bridge->dev.parent;
|
||||
- struct resource_entry *window, *next, *n;
|
||||
+ struct resource_entry *window, *n;
|
||||
struct pci_bus *bus, *b;
|
||||
- resource_size_t offset, next_offset;
|
||||
+ resource_size_t offset;
|
||||
LIST_HEAD(resources);
|
||||
- struct resource *res, *next_res;
|
||||
+ struct resource *res;
|
||||
char addr[64], *fmt;
|
||||
const char *name;
|
||||
int err;
|
||||
@@ -976,35 +959,11 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
|
||||
if (nr_node_ids > 1 && pcibus_to_node(bus) == NUMA_NO_NODE)
|
||||
dev_warn(&bus->dev, "Unknown NUMA node; performance will be reduced\n");
|
||||
|
||||
- /* Sort and coalesce contiguous windows */
|
||||
- list_sort(NULL, &resources, res_cmp);
|
||||
- resource_list_for_each_entry_safe(window, n, &resources) {
|
||||
- if (list_is_last(&window->node, &resources))
|
||||
- break;
|
||||
-
|
||||
- next = list_next_entry(window, node);
|
||||
- offset = window->offset;
|
||||
- res = window->res;
|
||||
- next_offset = next->offset;
|
||||
- next_res = next->res;
|
||||
-
|
||||
- if (res->flags != next_res->flags || offset != next_offset)
|
||||
- continue;
|
||||
-
|
||||
- if (res->end + 1 == next_res->start) {
|
||||
- next_res->start = res->start;
|
||||
- res->flags = res->start = res->end = 0;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
/* Add initial resources to the bus */
|
||||
resource_list_for_each_entry_safe(window, n, &resources) {
|
||||
+ list_move_tail(&window->node, &bridge->windows);
|
||||
offset = window->offset;
|
||||
res = window->res;
|
||||
- if (!res->end)
|
||||
- continue;
|
||||
-
|
||||
- list_move_tail(&window->node, &bridge->windows);
|
||||
|
||||
if (res->flags & IORESOURCE_BUS)
|
||||
pci_bus_insert_busn_res(bus, bus->number, res->end);
|
@ -0,0 +1,111 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
|
||||
Date: Tue, 13 Jul 2021 20:50:07 +0800
|
||||
Subject: [PATCH] PCI: Reinstate "PCI: Coalesce host bridge contiguous
|
||||
apertures"
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Built-in graphics on HP EliteDesk 805 G6 doesn't work because graphics
|
||||
can't get the BAR it needs:
|
||||
pci_bus 0000:00: root bus resource [mem 0x10020200000-0x100303fffff window]
|
||||
pci_bus 0000:00: root bus resource [mem 0x10030400000-0x100401fffff window]
|
||||
|
||||
pci 0000:00:08.1: bridge window [mem 0xd2000000-0xd23fffff]
|
||||
pci 0000:00:08.1: bridge window [mem 0x10030000000-0x100401fffff 64bit pref]
|
||||
pci 0000:00:08.1: can't claim BAR 15 [mem 0x10030000000-0x100401fffff 64bit pref]: no compatible bridge window
|
||||
pci 0000:00:08.1: [mem 0x10030000000-0x100401fffff 64bit pref] clipped to [mem 0x10030000000-0x100303fffff 64bit pref]
|
||||
pci 0000:00:08.1: bridge window [mem 0x10030000000-0x100303fffff 64bit pref]
|
||||
pci 0000:07:00.0: can't claim BAR 0 [mem 0x10030000000-0x1003fffffff 64bit pref]: no compatible bridge window
|
||||
pci 0000:07:00.0: can't claim BAR 2 [mem 0x10040000000-0x100401fffff 64bit pref]: no compatible bridge window
|
||||
|
||||
However, the root bus has two contiguous apertures that can contain the
|
||||
child resource requested.
|
||||
|
||||
Coalesce contiguous apertures so we can allocate from the entire contiguous
|
||||
region.
|
||||
|
||||
This is the second take of commit 65db04053efe ("PCI: Coalesce host
|
||||
bridge contiguous apertures"). The original approach sorts the apertures
|
||||
by address, but that makes NVMe stop working on QEMU ppc:sam460ex:
|
||||
PCI host bridge to bus 0002:00
|
||||
pci_bus 0002:00: root bus resource [io 0x0000-0xffff]
|
||||
pci_bus 0002:00: root bus resource [mem 0xd80000000-0xdffffffff] (bus address [0x80000000-0xffffffff])
|
||||
pci_bus 0002:00: root bus resource [mem 0xc0ee00000-0xc0eefffff] (bus address [0x00000000-0x000fffff])
|
||||
|
||||
After the offending commit:
|
||||
PCI host bridge to bus 0002:00
|
||||
pci_bus 0002:00: root bus resource [io 0x0000-0xffff]
|
||||
pci_bus 0002:00: root bus resource [mem 0xc0ee00000-0xc0eefffff] (bus address [0x00000000-0x000fffff])
|
||||
pci_bus 0002:00: root bus resource [mem 0xd80000000-0xdffffffff] (bus address [0x80000000-0xffffffff])
|
||||
|
||||
Since the apertures on HP EliteDesk 805 G6 are already in ascending
|
||||
order, doing a precautious sorting is not necessary.
|
||||
|
||||
Remove the sorting part to avoid the regression on ppc:sam460ex.
|
||||
|
||||
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212013
|
||||
Cc: Guenter Roeck <linux@roeck-us.net>
|
||||
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
|
||||
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
|
||||
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
|
||||
---
|
||||
drivers/pci/probe.c | 31 +++++++++++++++++++++++++++----
|
||||
1 file changed, 27 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
|
||||
index be51670572fa..133f5d2b189d 100644
|
||||
--- a/drivers/pci/probe.c
|
||||
+++ b/drivers/pci/probe.c
|
||||
@@ -877,11 +877,11 @@ static void pci_set_bus_msi_domain(struct pci_bus *bus)
|
||||
static int pci_register_host_bridge(struct pci_host_bridge *bridge)
|
||||
{
|
||||
struct device *parent = bridge->dev.parent;
|
||||
- struct resource_entry *window, *n;
|
||||
+ struct resource_entry *window, *next, *n;
|
||||
struct pci_bus *bus, *b;
|
||||
- resource_size_t offset;
|
||||
+ resource_size_t offset, next_offset;
|
||||
LIST_HEAD(resources);
|
||||
- struct resource *res;
|
||||
+ struct resource *res, *next_res;
|
||||
char addr[64], *fmt;
|
||||
const char *name;
|
||||
int err;
|
||||
@@ -959,11 +959,34 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
|
||||
if (nr_node_ids > 1 && pcibus_to_node(bus) == NUMA_NO_NODE)
|
||||
dev_warn(&bus->dev, "Unknown NUMA node; performance will be reduced\n");
|
||||
|
||||
+ /* Coalesce contiguous windows */
|
||||
+ resource_list_for_each_entry_safe(window, n, &resources) {
|
||||
+ if (list_is_last(&window->node, &resources))
|
||||
+ break;
|
||||
+
|
||||
+ next = list_next_entry(window, node);
|
||||
+ offset = window->offset;
|
||||
+ res = window->res;
|
||||
+ next_offset = next->offset;
|
||||
+ next_res = next->res;
|
||||
+
|
||||
+ if (res->flags != next_res->flags || offset != next_offset)
|
||||
+ continue;
|
||||
+
|
||||
+ if (res->end + 1 == next_res->start) {
|
||||
+ next_res->start = res->start;
|
||||
+ res->flags = res->start = res->end = 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Add initial resources to the bus */
|
||||
resource_list_for_each_entry_safe(window, n, &resources) {
|
||||
- list_move_tail(&window->node, &bridge->windows);
|
||||
offset = window->offset;
|
||||
res = window->res;
|
||||
+ if (!res->end)
|
||||
+ continue;
|
||||
+
|
||||
+ list_move_tail(&window->node, &bridge->windows);
|
||||
|
||||
if (res->flags & IORESOURCE_BUS)
|
||||
pci_bus_insert_busn_res(bus, bus->number, res->end);
|
@ -1 +1 @@
|
||||
Subproject commit e7bd377c9219094136ecce5e2258f04edbed58a0
|
||||
Subproject commit 9fb3242fa6a38d072949cbaa9183f65d56675231
|
@ -1 +1 @@
|
||||
Subproject commit 7764433c7066a5125956630116f894a12fd12109
|
||||
Subproject commit e697cc599230680f1be8bd0c2353ce090f3c3b8e
|
Loading…
Reference in New Issue
Block a user