# git rev-parse -q --verify 2f763a4ece533902b68162890948ad5ecfbdc922^{commit} 2f763a4ece533902b68162890948ad5ecfbdc922 already have revision, skipping fetch # git checkout -q -f -B kisskb 2f763a4ece533902b68162890948ad5ecfbdc922 # git clean -qxdf # < git log -1 # commit 2f763a4ece533902b68162890948ad5ecfbdc922 # Author: Suraj Jitindar Singh # Date: Wed Jul 10 15:20:18 2019 +1000 # # powerpc: mm: Limit rma_size to 1TB when running without HV mode # # The virtual real mode addressing (VRMA) mechanism is used when a # partition is using HPT (Hash Page Table) translation and performs # real mode accesses (MSR[IR|DR] = 0) in non-hypervisor mode. In this # mode effective address bits 0:23 are treated as zero (i.e. the access # is aliased to 0) and the access is performed using an implicit 1TB SLB # entry. # # The size of the RMA (Real Memory Area) is communicated to the guest as # the size of the first memory region in the device tree. And because of # the mechanism described above can be expected to not exceed 1TB. In the # event that the host erroneously represents the RMA as being larger than # 1TB, guest accesses in real mode to memory addresses above 1TB will be # aliased down to below 1TB. This means that a memory access performed in # real mode may differ to one performed in virtual mode for the same memory # address, which would likely have unintended consequences. # # To avoid this outcome have the guest explicitly limit the size of the # RMA to the current maximum, which is 1TB. This means that even if the # first memory block is larger than 1TB, only the first 1TB should be # accessed in real mode. # # Fixes: c3ab300ea555 ("powerpc: Add POWER9 cputable entry") # Cc: stable@vger.kernel.org # v4.6+ # Signed-off-by: Suraj Jitindar Singh # Tested-by: Satheesh Rajendran # Reviewed-by: David Gibson # Link: https://lore.kernel.org/r/20190710052018.14628-1-sjitindarsingh@gmail.com # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-gcc --version # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-ld --version # < git log --format=%s --max-count=1 2f763a4ece533902b68162890948ad5ecfbdc922 # < make -s -j 80 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- defconfig # make -s -j 80 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- FIT description: Linux 5.2.0-g2f763a4ece53 Created: Sat Jul 13 05:13:31 2019 Image 0 (kernel@0) Description: Linux 5.2.0-g2f763a4ece53 Created: Sat Jul 13 05:13:31 2019 Type: Kernel Image Compression: gzip compressed Data Size: 4654153 Bytes = 4545.07 KiB = 4.44 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x80898890 Hash algo: sha1 Hash value: feecbe10106d98fd5c679267d237d11dc3b5beb5 Image 1 (fdt@boston) Description: img,boston Device Tree Created: Sat Jul 13 05:13:31 2019 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: Sat Jul 13 05:13:31 2019 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: Sat Jul 13 05:13:31 2019 Type: Flat Device Tree Compression: uncompressed Data Size: 4603 Bytes = 4.50 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 33e429f316125d86bb863c2fe8d9c42fbcf90bfb Image 4 (fdt@ocelot_pcb120) Description: MSCC Ocelot PCB120 Device Tree Created: Sat Jul 13 05:13:31 2019 Type: Flat Device Tree Compression: uncompressed Data Size: 5162 Bytes = 5.04 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 0c5db3f23ba8b80fafd8c8e4eacfcb8ad62a91ae Image 5 (fdt@xilfpga) Description: MIPSfpga (xilfpga) Device Tree Created: Sat Jul 13 05:13:31 2019 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_mipsel # Build took: 0:01:49.697204