linux/arch/powerpc/platforms/pseries
Gaurav Batra 49a940dbdc powerpc/pseries/iommu: LPAR panics during boot up with a frozen PE
At the time of LPAR boot up, partition firmware provides Open Firmware
property ibm,dma-window for the PE. This property is provided on the PCI
bus the PE is attached to.

There are execptions where the partition firmware might not provide this
property for the PE at the time of LPAR boot up. One of the scenario is
where the firmware has frozen the PE due to some error condition. This
PE is frozen for 24 hours or unless the whole system is reinitialized.

Within this time frame, if the LPAR is booted, the frozen PE will be
presented to the LPAR but ibm,dma-window property could be missing.

Today, under these circumstances, the LPAR oopses with NULL pointer
dereference, when configuring the PCI bus the PE is attached to.

  BUG: Kernel NULL pointer dereference on read at 0x000000c8
  Faulting instruction address: 0xc0000000001024c0
  Oops: Kernel access of bad area, sig: 7 [#1]
  LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries
  Modules linked in:
  Supported: Yes
  CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.4.0-150600.9-default #1
  Hardware name: IBM,9043-MRX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NM1060_023) hv:phyp pSeries
  NIP:  c0000000001024c0 LR: c0000000001024b0 CTR: c000000000102450
  REGS: c0000000037db5c0 TRAP: 0300   Not tainted  (6.4.0-150600.9-default)
  MSR:  8000000002009033 <SF,VEC,EE,ME,IR,DR,RI,LE>  CR: 28000822  XER: 00000000
  CFAR: c00000000010254c DAR: 00000000000000c8 DSISR: 00080000 IRQMASK: 0
  ...
  NIP [c0000000001024c0] pci_dma_bus_setup_pSeriesLP+0x70/0x2a0
  LR [c0000000001024b0] pci_dma_bus_setup_pSeriesLP+0x60/0x2a0
  Call Trace:
    pci_dma_bus_setup_pSeriesLP+0x60/0x2a0 (unreliable)
    pcibios_setup_bus_self+0x1c0/0x370
    __of_scan_bus+0x2f8/0x330
    pcibios_scan_phb+0x280/0x3d0
    pcibios_init+0x88/0x12c
    do_one_initcall+0x60/0x320
    kernel_init_freeable+0x344/0x3e4
    kernel_init+0x34/0x1d0
    ret_from_kernel_user_thread+0x14/0x1c

Fixes: b1fc44eaa9 ("pseries/iommu/ddw: Fix kdump to work in absence of ibm,dma-window")
Signed-off-by: Gaurav Batra <gbatra@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240422205141.10662-1-gbatra@linux.ibm.com
2024-04-23 14:34:00 +10:00
..
cc_platform.c powerpc/pseries/svm: Add a powerpc version of cc_platform_has() 2021-10-04 11:46:33 +02:00
cmm.c mm: Convert all PageMovable users to movable_operations 2022-08-02 12:34:03 -04:00
dlpar.c powerpc, workqueue: Use alloc_ordered_workqueue() to create ordered workqueues 2023-05-08 13:52:27 -10:00
dtl.c powerpc/pseries: Fix CONFIG_DTL=n build 2022-10-13 22:30:07 +11:00
eeh_pseries.c powerpc/rtas_pci: rename and properly expose config access APIs 2023-11-28 21:49:45 +11:00
event_sources.c powerpc/pseries: Add __init attribute to eligible functions 2021-12-23 22:33:15 +11:00
firmware.c powerpc/pseries: Add FW_FEATURE_PLPKS feature flag 2023-04-20 13:21:46 +10:00
hotplug-cpu.c powerpc/pseries: Honour current SMT state when DLPAR onlining CPUs 2023-08-02 22:49:46 +10:00
hotplug-memory.c powerpc/pseries/memhp: Log more error conditions in add path 2023-12-01 21:15:34 +11:00
hvCall_inst.c
hvCall.S powerpc/pseries: Remove unused r0 in the hcall tracing code 2023-09-30 22:52:18 +10:00
hvconsole.c tty: hvc: convert to u8 and size_t 2023-12-08 12:02:37 +01:00
hvcserver.c powerpc: move from strlcpy with unused retval to strscpy 2022-08-26 11:02:20 +10:00
ibmebus.c powerpc: ibmebus: make ibmebus_bus_type const 2024-02-15 00:14:06 +11:00
io_event_irq.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
iommu.c powerpc/pseries/iommu: LPAR panics during boot up with a frozen PE 2024-04-23 14:34:00 +10:00
Kconfig powerpc/pseries: PLPKS SED Opal keystore support 2023-10-17 09:10:06 -06:00
kexec.c powerpc: Don't include asm/setup.h in asm/machdep.h 2022-06-20 11:29:49 +10:00
lpar.c powerpc/pseries: fix accuracy of stolen time 2024-02-14 14:24:06 +11:00
lparcfg.c powerpc: Stop using of_root 2024-03-03 22:20:29 +11:00
Makefile powerpc/pseries: Add papr-vpd character driver for VPD retrieval 2023-12-13 21:38:21 +11:00
mobility.c powerpc: Remove now superfluous sentinel element from ctl_table arrays 2023-10-10 15:22:02 -07:00
msi.c powerpc: Enable support for 32 bit MSI-X vectors 2024-03-03 22:18:45 +11:00
nvram.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
of_helpers.c
of_helpers.h
papr_platform_attributes.c powerpc/pseries: Fix potential memleak in papr_get_attr() 2024-03-03 22:20:28 +11:00
papr_scm.c powerpc: papr_scm: Convert to platform remove callback returning void 2024-02-22 21:55:33 +11:00
papr-sysparm.c powerpc/pseries/papr-sysparm: Expose character device to user space 2023-12-13 21:38:21 +11:00
papr-vpd.c powerpc/pseries: Add papr-vpd character driver for VPD retrieval 2023-12-13 21:38:21 +11:00
pci_dlpar.c powerpc/pseries/iommu: DLPAR add doesn't completely initialize pci_controller 2024-02-19 16:16:34 +11:00
pci.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
plpks_sed_ops.c powerpc/pseries: PLPKS SED Opal keystore support 2023-10-17 09:10:06 -06:00
plpks-secvar.c powerpc/pseries: Fix endianness issue when parsing PLPKS secvar flags 2023-02-16 21:16:22 +11:00
plpks.c powerpc/pseries: make max polling consistent for longer H_CALLs 2024-04-22 23:37:51 +10:00
pmem.c powerpc: Remove asm/prom.h from all files that don't need it 2022-05-08 22:15:04 +10:00
power.c powerpc: declare unmodified attribute_group usages const 2022-03-08 22:15:32 +11:00
pseries_energy.c powerpc/pseries: move to use bus_get_dev_root() 2023-03-17 15:29:38 +01:00
pseries.h powerpc/rtas: Move post_mobility_fixup() declaration to pseries 2023-11-21 12:06:50 +11:00
ras.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
reconfig.c powerpc/pseries: block untrusted device tree changes when locked down 2022-09-28 19:22:14 +10:00
rng.c powerpc/pseries: wire up rng during setup_arch() 2022-06-18 10:19:10 +10:00
rtas-fadump.c powerpc: Add missing headers 2022-05-08 22:15:40 +10:00
rtas-fadump.h
rtas-work-area.c powerpc/pseries/rtas-work-area: Fix rtas_work_area_reserve_arena() kernel-doc 2023-11-07 13:13:44 +11:00
setup.c powerpc: Stop using of_root 2024-03-03 22:20:29 +11:00
smp.c powerpc/rtas: arch-wide function token lookup conversions 2023-02-13 22:35:03 +11:00
suspend.c powerpc/rtas: Move post_mobility_fixup() declaration to pseries 2023-11-21 12:06:50 +11:00
svm.c swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction 2022-04-18 07:21:12 +02:00
vas-sysfs.c powerpc/pseries/vas: Call misc_deregister if sysfs init fails 2022-05-22 15:58:31 +10:00
vas.c powerpc/pseries/vas: Migration suspend waits for no in-progress open windows 2023-12-13 22:01:47 +11:00
vas.h powerpc/pseries/vas: Migration suspend waits for no in-progress open windows 2023-12-13 22:01:47 +11:00
vio.c powerpc: vio: make vio_bus_type const 2024-02-15 00:14:06 +11:00
vphn.c powerpc/pseries: Move VPHN constants into vphn.h 2023-08-24 22:33:16 +10:00