# 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/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-ld --version # < git log --format=%s --max-count=1 2f763a4ece533902b68162890948ad5ecfbdc922 # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mvme5100_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- mvme5100_defconfig # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mvme5100_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:194:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:331:21: note: 'pdeo' was declared here /kisskb/src/ipc/shm.c: In function 'ksys_shmdt': /kisskb/src/ipc/shm.c:1712:59: warning: 'file' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/udf/unicode.c: In function 'udf_name_conv_char': /kisskb/src/fs/udf/unicode.c:132:8: warning: 'c' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/futex.c: In function 'do_futex': /kisskb/src/kernel/futex.c:1655:3: warning: 'oldval' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/futex.c:1620:6: note: 'oldval' was declared here /kisskb/src/fs/cifs/smb2pdu.c: In function 'SMB2_ioctl_init': /kisskb/src/fs/cifs/smb2pdu.c:2581:19: warning: 'in_data_buf' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/core/gen_stats.c: In function '__gnet_stats_copy_basic': /kisskb/src/net/core/gen_stats.c:157:19: warning: 'seq' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/core/dev.c: In function 'validate_xmit_skb_list': /kisskb/src/net/core/dev.c:3415:15: warning: 'tail' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c: In function 'univ8250_release_irq': /kisskb/src/drivers/tty/serial/8250/8250_core.c:242:2: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c:227:19: note: 'i' was declared here /kisskb/src/drivers/net/tun.c: In function 'tun_get_user': /kisskb/src/drivers/net/tun.c:1832:30: warning: 'copylen' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c:1525:31: warning: 'linear' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c:1745:46: note: 'linear' was declared here /kisskb/src/lib/rhashtable.c: In function 'rht_deferred_worker': /kisskb/src/include/linux/rhashtable.h:110:10: warning: 'next' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/lib/rhashtable.c:222:28: note: 'next' was declared here INFO: Uncompressed kernel (size 0x431d94) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x500000) Completed OK # rm -rf /kisskb/build/powerpc-fixes_mvme5100_defconfig_powerpc-gcc4.6 # Build took: 0:00:41.122042