# git rev-parse -q --verify c1ed1754f271f6b7acb1bfdc8cfb62220fbed423^{commit} c1ed1754f271f6b7acb1bfdc8cfb62220fbed423 already have revision, skipping fetch # git checkout -q -f -B kisskb c1ed1754f271f6b7acb1bfdc8cfb62220fbed423 # git clean -qxdf # < git log -1 # commit c1ed1754f271f6b7acb1bfdc8cfb62220fbed423 # Author: Aneesh Kumar K.V # Date: Thu Jun 11 17:31:59 2020 +0530 # # powerpc/kvm/book3s64: Fix kernel crash with nested kvm & DEBUG_VIRTUAL # # With CONFIG_DEBUG_VIRTUAL=y, __pa() checks for addr value and if it's # less than PAGE_OFFSET it leads to a BUG(). # # #define __pa(x) # ({ # VIRTUAL_BUG_ON((unsigned long)(x) < PAGE_OFFSET); # (unsigned long)(x) & 0x0fffffffffffffffUL; # }) # # kernel BUG at arch/powerpc/kvm/book3s_64_mmu_radix.c:43! # cpu 0x70: Vector: 700 (Program Check) at [c0000018a2187360] # pc: c000000000161b30: __kvmhv_copy_tofrom_guest_radix+0x130/0x1f0 # lr: c000000000161d5c: kvmhv_copy_from_guest_radix+0x3c/0x80 # ... # kvmhv_copy_from_guest_radix+0x3c/0x80 # kvmhv_load_from_eaddr+0x48/0xc0 # kvmppc_ld+0x98/0x1e0 # kvmppc_load_last_inst+0x50/0x90 # kvmppc_hv_emulate_mmio+0x288/0x2b0 # kvmppc_book3s_radix_page_fault+0xd8/0x2b0 # kvmppc_book3s_hv_page_fault+0x37c/0x1050 # kvmppc_vcpu_run_hv+0xbb8/0x1080 # kvmppc_vcpu_run+0x34/0x50 # kvm_arch_vcpu_ioctl_run+0x2fc/0x410 # kvm_vcpu_ioctl+0x2b4/0x8f0 # ksys_ioctl+0xf4/0x150 # sys_ioctl+0x28/0x80 # system_call_exception+0x104/0x1d0 # system_call_common+0xe8/0x214 # # kvmhv_copy_tofrom_guest_radix() uses a NULL value for to/from to # indicate direction of copy. # # Avoid calling __pa() if the value is NULL to avoid the BUG(). # # Signed-off-by: Aneesh Kumar K.V # [mpe: Massage change log a bit to mention CONFIG_DEBUG_VIRTUAL] # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20200611120159.680284-1-aneesh.kumar@linux.ibm.com # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux-ld --version # < git log --format=%s --max-count=1 c1ed1754f271f6b7acb1bfdc8cfb62220fbed423 # < make -s -j 48 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mips-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux- defconfig # < make -s -j 48 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mips-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux- help # make -s -j 48 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mips-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux- olddefconfig # make -s -j 48 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mips-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/mips-linux/bin/mips-linux- FIT description: Linux 5.8.0-rc2-gc1ed1754f271 Created: Fri Jun 26 08:12:58 2020 Image 0 (kernel@0) Description: Linux 5.8.0-rc2-gc1ed1754f271 Created: Fri Jun 26 08:12:58 2020 Type: Kernel Image Compression: gzip compressed Data Size: 5000253 Bytes = 4883.06 KiB = 4.77 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x8092c1e0 Hash algo: sha1 Hash value: 49372ef7bee12cd7663780b6e43bf69e9bceda4a Image 1 (fdt@boston) Description: img,boston Device Tree Created: Fri Jun 26 08:12:58 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 3793 Bytes = 3.70 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 4799f50d688573234da6e9d7701234d394759ef4 Image 2 (fdt@ni169445) Description: NI 169445 device tree Created: Fri Jun 26 08:12:58 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 1871 Bytes = 1.83 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 51b89b31605ee62038c8468c429af091dfc75ec7 Image 3 (fdt@ocelot_pcb123) Description: MSCC Ocelot PCB123 Device Tree Created: Fri Jun 26 08:12:58 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 4639 Bytes = 4.53 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: be2724f58b66c316a61da7c11ced633f4e7e86c7 Image 4 (fdt@ocelot_pcb120) Description: MSCC Ocelot PCB120 Device Tree Created: Fri Jun 26 08:12:58 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 5198 Bytes = 5.08 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 7556b1594bd7ab9e3b3fa939d8e3e03ae58fa180 Image 5 (fdt@xilfpga) Description: MIPSfpga (xilfpga) Device Tree Created: Fri Jun 26 08:12:58 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 2708 Bytes = 2.64 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 63d058b780f65e22da30f0a183433765f1807f1d Default Configuration: 'conf@default' Configuration 0 (conf@default) Description: Generic Linux kernel Kernel: kernel@0 Configuration 1 (conf@boston) Description: Boston Linux kernel Kernel: kernel@0 FDT: fdt@boston Configuration 2 (conf@ni169445) Description: NI 169445 Linux Kernel Kernel: kernel@0 FDT: fdt@ni169445 Configuration 3 (conf@ocelot_pcb123) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb123 Configuration 4 (conf@ocelot_pcb120) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb120 Configuration 5 (conf@xilfpga) Description: MIPSfpga Linux kernel Kernel: kernel@0 FDT: fdt@xilfpga Completed OK # rm -rf /kisskb/build/powerpc-fixes_mips-defconfig_mips-gcc4.9 # Build took: 0:01:52.449373