# 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-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.1.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_mpc85xx_defconfig+KVM_powerpc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.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 # yes \n | make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- oldconfig yes: standard output: Broken pipe # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.1.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:9, 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] #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' # 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' if (IS_ERR_VALUE(fep->ring_mem_addr)) ^~~~~~~~~~~~ /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) /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) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd8a4cc) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd79c98) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6378503 Bytes = 6229.01 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:09 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6378097 Bytes = 6228.61 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:10 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6377979 Bytes = 6228.50 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:10 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6379912 Bytes = 6230.38 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:10 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6378638 Bytes = 6229.14 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:11 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6377877 Bytes = 6228.40 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:12 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6377977 Bytes = 6228.49 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:12 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6379634 Bytes = 6230.11 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:12 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6378838 Bytes = 6229.33 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:12 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6379654 Bytes = 6230.13 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:12 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6378036 Bytes = 6228.55 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:12 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6342696 Bytes = 6194.04 KiB = 6.05 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:13 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6379337 Bytes = 6229.82 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:13 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6378098 Bytes = 6228.61 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e002b4 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:13 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6377951 Bytes = 6228.47 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.2.0-g2f763a4ece53 Created: Sat Jul 13 06:42:14 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6378648 Bytes = 6229.15 KiB = 6.08 MiB Load Address: 00e00000 Entry Point: 00e00314 Completed OK # rm -rf /kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc8 # Build took: 0:02:33.663107