All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Alexey Kuznetsov <kuznet@virtuozzo.com>,
	Konstantin Khorenko <khorenko@virtuozzo.com>,
	devel@openvz.org
Subject: [Devel] [PATCH vz10 v2 1/3] core: add skip_pci_blacklist option to probe RHEL-disabled devices
Date: Wed, 16 Sep 2026 17:40:45 +0200	[thread overview]
Message-ID: <20260916-b4-prep-khorenko-vstor-145697-mlx4-v2-1-fe0a34255714@virtuozzo.com> (raw)
In-Reply-To: <20260916-b4-prep-khorenko-vstor-145697-mlx4-v2-0-fe0a34255714@virtuozzo.com>

From: Alexey Kuznetsov <kuznet@virtuozzo.com>

RHEL refuses to drive the PCI IDs listed in rh_disabled_pci_devices[]:
pci_rh_check_status() matches the device and local_pci_probe() turns
the match into -EACCES, so no driver ever binds to it. The list is a
hardware lifecycle decision rather than a statement about a defect,
and a host whose only NIC or HBA is on it cannot be deployed at all.

Keep probing such a device when skip_pci_blacklist is set. It is still
reported, as unmaintained rather than disabled, so a support dump shows
that the hardware gets no testing and no fixes.

The option is writable at runtime and the list is consulted on every
probe, so a blacklisted device can be brought up without a reboot: set
the option and rebind the device through
/sys/bus/pci/drivers/<driver>/bind.

https://virtuozzo.atlassian.net/browse/VSTOR-145697
Feature: pci: bypass the RHEL disabled device blacklist

Signed-off-by: Alexey Kuznetsov <kuznet@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 Documentation/admin-guide/kernel-parameters.txt | 12 ++++++++++++
 kernel/rh_messages.c                            |  9 +++++++++
 2 files changed, 21 insertions(+)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 96ffb86cfa762..aea11ef7d28dc 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -6313,6 +6313,18 @@
 			apic=verbose is specified.
 			Example: apic=debug show_lapic=all
 
+	skip_pci_blacklist
+			[KNL] Bind drivers to the PCI devices that RHEL lists
+			as disabled, instead of failing their probe. Such a
+			device is reported as unmaintained hardware: it gets
+			no testing and no fixes.
+			Also writable at runtime through
+			/sys/module/kernel/parameters/skip_pci_blacklist, and
+			the list is consulted on every probe, so a device can
+			be brought up by rebinding it afterwards.
+			Format: { "0" | "1" }
+			Default: 0
+
 	slab_debug[=options[,slabs][;[options[,slabs]]...]	[MM]
 			Enabling slab_debug allows one to determine the
 			culprit if slab objects become corrupted. Enabling
diff --git a/kernel/rh_messages.c b/kernel/rh_messages.c
index bb69e8965748b..ac3c8bebb8512 100644
--- a/kernel/rh_messages.c
+++ b/kernel/rh_messages.c
@@ -149,6 +149,9 @@ static void pci_hw_unmaintained(struct pci_dev *dev)
 				   dev->device, dev->vendor, pci_name(dev));
 }
 
+static bool skip_pci_blacklist;
+core_param(skip_pci_blacklist, skip_pci_blacklist, bool, 0644);
+
 /**
  * pci_hw_disabled() - Mark a PCI device disabled.
  * @dev: the PCI device structure to match against
@@ -164,6 +167,12 @@ static bool __maybe_unused pci_hw_disabled(struct pci_dev *dev)
 	if (!ret)
 		return false;
 
+	if (skip_pci_blacklist) {
+		mark_hardware_unmaintained(dev_driver_string(&dev->dev), "%04X:%04X @ %s",
+					   dev->device, dev->vendor, pci_name(dev));
+		return false;
+	}
+
 	mark_hardware_disabled(dev_driver_string(&dev->dev), "%04X:%04X @ %s",
 				   dev->device, dev->vendor, pci_name(dev));
 	return true;

-- 
2.43.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-09-16 15:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 15:40 [Devel] [PATCH vz10 v2 0/3] Restore ConnectX-3 Pro support dropped by RHEL 10 Konstantin Khorenko
2026-09-16 15:40 ` Konstantin Khorenko [this message]
2026-09-16 15:40 ` [Devel] [PATCH vz10 v2 2/3] core: allow ConnectX-3 Pro to probe, as unmaintained hardware Konstantin Khorenko
2026-09-16 15:40 ` [Devel] [PATCH vz10 v2 3/3] configs: build the mlx4 driver, Ethernet and InfiniBand Konstantin Khorenko
2026-09-16 15:58 ` [Devel] [PATCH vz10 v2 0/3] Restore ConnectX-3 Pro support dropped by RHEL 10 Alexey Kuznetsov
2026-09-16 16:40 ` Konstantin Khorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260916-b4-prep-khorenko-vstor-145697-mlx4-v2-1-fe0a34255714@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=kuznet@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.