[Devel] [PATCH vz10 v2 1/3] core: add skip_pci_blacklist option to probe RHEL-disabled devices
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Sep 16 18:40:45 MSK 2026
From: Alexey Kuznetsov <kuznet at 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 at virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko at 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
More information about the Devel
mailing list