PCI: determine whether a device has extended config space

Legacy PCI devices don't have any extended config space. Reading any part
thereof may return all ones or other arbitrary data, e.g. in some cases
base config space contents repeatedly.

Logic follows Linux 6.19-rc's pci_cfg_space_size(), albeit leveraging our
determination of device type; in particular some comments are taken
verbatim from there. Like with Linux'es CONFIG_PCI_QUIRKS, only the alias
detection logic is covered by the new "pci=no-quirks". The singular access
at PCI_CFG_SPACE_SIZE is left unconditional.

For Misra's sake the PCI_X_STATUS_533HMZ definition also needs amending.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
This commit is contained in:
Jan Beulich committed 2026-02-02 10:19:57 +01:00
1 parent 74f984159f
commit 173787d191
5 files changed
+147 -4

No files matched your search

+12 -3
View File
@@ -2009,12 +2009,21 @@ Only effective if CONFIG_PARTIAL_EMULATION is enabled.
behavior.**
### pci
= List of [ serr=<bool>, perr=<bool> ]
= List of [ serr=<bool>, perr=<bool>, quirks=<bool> ]
* `serr` and `perr`
Default: Signaling left as set by firmware.
Override the firmware settings, and explicitly enable or disable the
signalling of PCI System and Parity errors.
Override the firmware settings, and explicitly enable or disable the
signalling of PCI System and Parity errors.
* `quirks`
Default: `on`
In its negative form, allows to suppress certain quirk workarounds, in case
they cause issues.
### pci-phantom
> `=[<seg>:]<bus>:<device>,<stride>`
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.