linux/arch/powerpc/platforms
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
..
4xx powerpc: Use NULL instead of 0 for null pointers 2023-10-19 17:12:47 +11:00
8xx powerpc: Untangle fixmap.h and pgtable.h and mmu.h 2023-10-19 17:12:44 +11:00
40x powerpc/machdep: Define 'compatibles' property in ppc_md and use it 2024-03-03 22:20:29 +11:00
44x powerpc/4xx: Fix warp_gpio_leds build failure 2024-03-07 00:13:28 +11:00
52xx powerpc: Stop using of_root 2024-03-03 22:20:29 +11:00
82xx powerpc/82xx: Select FSL_SOC 2023-09-18 12:23:48 +10:00
83xx powerpc/83xx: Fix build failure with FPU=n 2024-03-07 23:06:19 +11:00
85xx powerpc updates for 6.9 2024-03-15 17:53:48 -07:00
86xx powerpc/86xx: Drop unused CONFIG_MPC8610 2023-12-29 15:23:00 +11:00
512x powerpc/machdep: Define 'compatibles' property in ppc_md and use it 2024-03-03 22:20:29 +11:00
amigaone powerpc/amigaone: Make several functions static 2024-03-07 00:13:28 +11:00
book3s powerpc/vas: Limit open window failure messages in log bufffer 2023-10-20 17:10:03 +11:00
cell dentry: switch the lists of children to hlist 2023-11-25 02:32:13 -05:00
chrp powerpc: Make generic_calibrate_decr() the default 2023-03-16 08:56:48 +11:00
embedded6xx powerpc/embedded6xx: Fix no previous prototype for avr_uart_send() etc. 2024-03-07 00:13:28 +11:00
maple powerpc: Explicitly include correct DT includes 2023-08-02 22:22:19 +10:00
microwatt powerpc: Make generic_calibrate_decr() the default 2023-03-16 08:56:48 +11:00
pasemi powerpc: Stop using of_root 2024-03-03 22:20:29 +11:00
powermac powerpc updates for 6.9 2024-03-15 17:53:48 -07:00
powernv powerpc/kdump: Split KEXEC_CORE and CRASH_DUMP dependency 2024-03-17 13:34:00 +11:00
ps3 powerpc updates for 6.9 2024-03-15 17:53:48 -07:00
pseries powerpc/pseries/iommu: LPAR panics during boot up with a frozen PE 2024-04-23 14:34:00 +10:00
fsl_uli1575.c powerpc/fsl_uli1575: Mark uli_exclude_device() as static 2023-04-20 10:20:50 +10:00
Kconfig powerpc/82xx: Remove CONFIG_8260 and CONFIG_8272 2023-08-18 17:03:14 +10:00
Kconfig.cputype powerpc updates for 6.6 2023-08-31 12:43:10 -07:00
Makefile powerpc: Add Microwatt platform 2021-06-21 21:15:26 +10:00