# git rev-parse -q --verify 29fd267da72951895fa2675a9ec0f4700b113543^{commit} 29fd267da72951895fa2675a9ec0f4700b113543 already have revision, skipping fetch # git checkout -q -f -B kisskb 29fd267da72951895fa2675a9ec0f4700b113543 # git clean -qxdf # < git log -1 # commit 29fd267da72951895fa2675a9ec0f4700b113543 # Author: Ganesh Goudar # Date: Fri Mar 20 16:31:19 2020 +0530 # # powerpc/pseries: Fix MCE handling on pseries # # MCE handling on pSeries platform fails as recent rework to use common # code for pSeries and PowerNV in machine check error handling tries to # access per-cpu variables in realmode. The per-cpu variables may be # outside the RMO region on pSeries platform and needs translation to be # enabled for access. Just moving these per-cpu variable into RMO region # did'nt help because we queue some work to workqueues in real mode, which # again tries to touch per-cpu variables. Also fwnmi_release_errinfo() # cannot be called when translation is not enabled. # # This patch fixes this by enabling translation in the exception handler # when all required real mode handling is done. This change only affects # the pSeries platform. # # Without this fix below kernel crash is seen on injecting # SLB multihit: # # BUG: Unable to handle kernel data access on read at 0xc00000027b205950 # Faulting instruction address: 0xc00000000003b7e0 # Oops: Kernel access of bad area, sig: 11 [#1] # LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries # Modules linked in: mcetest_slb(OE+) af_packet(E) xt_tcpudp(E) ip6t_rpfilter(E) ip6t_REJECT(E) ipt_REJECT(E) xt_conntrack(E) ip_set(E) nfnetlink(E) ebtable_nat(E) ebtable_broute(E) ip6table_nat(E) ip6table_mangle(E) ip6table_raw(E) ip6table_security(E) iptable_nat(E) nf_nat(E) nf_conntrack(E) nf_defrag_ipv6(E) nf_defrag_ipv4(E) iptable_mangle(E) iptable_raw(E) iptable_security(E) ebtable_filter(E) ebtables(E) ip6table_filter(E) ip6_tables(E) iptable_filter(E) ip_tables(E) x_tables(E) xfs(E) ibmveth(E) vmx_crypto(E) gf128mul(E) uio_pdrv_genirq(E) uio(E) crct10dif_vpmsum(E) rtc_generic(E) btrfs(E) libcrc32c(E) xor(E) zstd_decompress(E) zstd_compress(E) raid6_pq(E) sr_mod(E) sd_mod(E) cdrom(E) ibmvscsi(E) scsi_transport_srp(E) crc32c_vpmsum(E) dm_mod(E) sg(E) scsi_mod(E) # CPU: 34 PID: 8154 Comm: insmod Kdump: loaded Tainted: G OE 5.5.0-mahesh #1 # NIP: c00000000003b7e0 LR: c0000000000f2218 CTR: 0000000000000000 # REGS: c000000007dcb960 TRAP: 0300 Tainted: G OE (5.5.0-mahesh) # MSR: 8000000000001003 CR: 28002428 XER: 20040000 # CFAR: c0000000000f2214 DAR: c00000027b205950 DSISR: 40000000 IRQMASK: 0 # GPR00: c0000000000f2218 c000000007dcbbf0 c000000001544800 c000000007dcbd70 # GPR04: 0000000000000001 c000000007dcbc98 c008000000d00258 c0080000011c0000 # GPR08: 0000000000000000 0000000300000003 c000000001035950 0000000003000048 # GPR12: 000000027a1d0000 c000000007f9c000 0000000000000558 0000000000000000 # GPR16: 0000000000000540 c008000001110000 c008000001110540 0000000000000000 # GPR20: c00000000022af10 c00000025480fd70 c008000001280000 c00000004bfbb300 # GPR24: c000000001442330 c00800000800000d c008000008000000 4009287a77000510 # GPR28: 0000000000000000 0000000000000002 c000000001033d30 0000000000000001 # NIP [c00000000003b7e0] save_mce_event+0x30/0x240 # LR [c0000000000f2218] pseries_machine_check_realmode+0x2c8/0x4f0 # Call Trace: # Instruction dump: # 3c4c0151 38429050 7c0802a6 60000000 fbc1fff0 fbe1fff8 f821ffd1 3d42ffaf # 3fc2ffaf e98d0030 394a1150 3bdef530 <7d6a62aa> 1d2b0048 2f8b0063 380b0001 # ---[ end trace 46fd63f36bbdd940 ]--- # # Fixes: 9ca766f9891d ("powerpc/64s/pseries: machine check convert to use common event code") # Reviewed-by: Mahesh Salgaonkar # Reviewed-by: Nicholas Piggin # Signed-off-by: Ganesh Goudar # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20200320110119.10207-1-ganeshgr@linux.ibm.com # < /opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 29fd267da72951895fa2675a9ec0f4700b113543 # < make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_defconfig # Added to kconfig CONFIG_PPC_E500MC=y # Added to kconfig CONFIG_VIRTUALIZATION=y # Added to kconfig CONFIG_KVM_E500MC=y # Added to kconfig # < make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig .config:4064:warning: override: reassigning to symbol PPC_E500MC .config:4065:warning: override: reassigning to symbol VIRTUALIZATION # make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-9.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/kernel.h:11, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:12, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 22 | #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) | ^ /kisskb/src/include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: note: in expansion of macro 'IS_ERR_VALUE' 139 | if (IS_ERR_VALUE(fep->ring_mem_addr)) | ^~~~~~~~~~~~ /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8555cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe629ac) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) INFO: Uncompressed kernel (size 0xe521a8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xf00000) Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6755704 Bytes = 6597.37 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f0031c Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6755639 Bytes = 6597.30 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6755693 Bytes = 6597.36 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f0031c Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6755638 Bytes = 6597.30 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6752153 Bytes = 6593.90 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6753237 Bytes = 6594.96 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6755669 Bytes = 6597.33 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6753940 Bytes = 6595.64 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6753284 Bytes = 6595.00 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:08 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6716733 Bytes = 6559.31 KiB = 6.41 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:08 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6753202 Bytes = 6594.92 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f0031c Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:08 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6753188 Bytes = 6594.91 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f0031c Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:08 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6753201 Bytes = 6594.92 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f0031c Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:08 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6751965 Bytes = 6593.72 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:08 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6753745 Bytes = 6595.45 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002cc Image Name: Linux-5.6.0-rc2-g29fd267da729 Created: Wed Apr 1 02:58:08 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6753840 Bytes = 6595.55 KiB = 6.44 MiB Load Address: 00f00000 Entry Point: 00f002cc Completed OK # rm -rf /kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc9 # Build took: 0:03:10.711306