summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorJunjie Cao <junjie.cao@intel.com>2026-09-10 17:38:58 +0800
committerDave Jiang <dave.jiang@intel.com>2026-09-11 08:43:06 -0700
commitdc96f35358a14c75f1e931b1c2cb743187735f8b (patch)
tree36ad1a82bad3ce88d989608d19b68c4db7f31df0 /tools/perf/scripts/python/stackcollapse.py
parent6495547d643d69506deaa983200400ab6fce7ec7 (diff)
downloadlinux-next-dc96f35358a14c75f1e931b1c2cb743187735f8b.tar.gz
linux-next-dc96f35358a14c75f1e931b1c2cb743187735f8b.zip
cxl/regs: Reject register blocks in an unassigned BAR
cxl_decode_regblock() only checks that the Register Locator offset fits pci_resource_len(). A BAR the PCI core could not place is reset to zero start, end and flags while config space keeps the firmware value, so a zero offset passes and the block is mapped at physical address 0. On x86 ioremap() of the reserved low megabyte succeeds, the component register header does not match, and a switch port fails with "HDM decoder capability not found", pointing at the HDM decoders rather than at the BAR. Reject a BAR with no length or still unassigned, next to the existing size check. Skip empty Register Locator entries first: they decode as BAR0 offset 0 and would trip the check, and nothing looks them up. Seen with edk2-stable202602 (f6489621b8ae, reverted in stable202605), which places 64-bit non-prefetchable BARs behind a bridge in the prefetchable window. Linux refuses to claim them and the switch upstream and downstream port BAR0s find no room in the 32-bit window. QEMU q35 with a CXL switch, Fedora 43 edk2-ovmf-20260213, before: pci 0000:0d:00.0: BAR 0 [mem size 0x00010000 64bit]: can't assign; no space cxl_port port2: HDM decoder capability not found after: pcieport 0000:0d:00.0: BAR0: not assigned (type: 1) cxl_port port2: No component registers mapped cxl_port port2: Failed to map HDM decoder capability Link: https://github.com/tianocore/edk2/issues/13104 Signed-off-by: Junjie Cao <junjie.cao@intel.com> Reviewed-by: Li Ming <ming.li@zohomail.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Link: https://patch.msgid.link/20260910093858.535969-1-junjie.cao@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions