# 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/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 2f763a4ece533902b68162890948ad5ecfbdc922 # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_wii_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- wii_defconfig # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_wii_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/kernel/futex.c: In function 'do_futex': /kisskb/src/kernel/futex.c:1645:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] return oldval == cmparg; ^ /kisskb/src/kernel/futex.c:1620:6: note: 'oldval' was declared here int oldval, ret; ^ INFO: Uncompressed kernel (size 0x90ac0c) overlaps the address of the wrapper(0x600000) INFO: Fixing the link_address of wrapper to (0xa00000) Completed OK # rm -rf /kisskb/build/powerpc-fixes_wii_defconfig_powerpc-gcc5 # Build took: 0:00:55.747869