# git rev-parse -q --verify 50087112592016a3fc10b394a55f1f1a1bde6908^{commit} 50087112592016a3fc10b394a55f1f1a1bde6908 already have revision, skipping fetch # git checkout -q -f -B kisskb 50087112592016a3fc10b394a55f1f1a1bde6908 # git clean -qxdf # < git log -1 # commit 50087112592016a3fc10b394a55f1f1a1bde6908 # Author: Suraj Jitindar Singh # Date: Thu Jun 20 11:46:49 2019 +1000 # # KVM: PPC: Book3S HV: Invalidate ERAT when flushing guest TLB entries # # When a guest vcpu moves from one physical thread to another it is # necessary for the host to perform a tlb flush on the previous core if # another vcpu from the same guest is going to run there. This is because the # guest may use the local form of the tlb invalidation instruction meaning # stale tlb entries would persist where it previously ran. This is handled # on guest entry in kvmppc_check_need_tlb_flush() which calls # flush_guest_tlb() to perform the tlb flush. # # Previously the generic radix__local_flush_tlb_lpid_guest() function was # used, however the functionality was reimplemented in flush_guest_tlb() # to avoid the trace_tlbie() call as the flushing may be done in real # mode. The reimplementation in flush_guest_tlb() was missing an erat # invalidation after flushing the tlb. # # This lead to observable memory corruption in the guest due to the # caching of stale translations. Fix this by adding the erat invalidation. # # Fixes: 70ea13f6e609 ("KVM: PPC: Book3S HV: Flush TLB on secondary radix threads") # Signed-off-by: Suraj Jitindar Singh # Signed-off-by: Michael Ellerman # < /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 50087112592016a3fc10b394a55f1f1a1bde6908 # < make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_ppc64e_defconfig+UP_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- ppc64e_defconfig # Added to kconfig CONFIG_SMP=n # yes \n | make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_ppc64e_defconfig+UP_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- oldconfig yes: standard output: Broken pipe # make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_ppc64e_defconfig+UP_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- WARNING: vmlinux.o(.text+0x39e): Section mismatch in reference from the variable start_here_multiplatform to the function .init.text:.early_setup() The function start_here_multiplatform() references the function __init .early_setup(). This is often because start_here_multiplatform lacks a __init annotation or the annotation of .early_setup is wrong. INFO: Uncompressed kernel (size 0xbded18) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xc00000) Image Name: Linux-5.2.0-rc2-g500871125920 Created: Thu Jun 20 23:54:05 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 5079459 Bytes = 4960.41 KiB = 4.84 MiB Load Address: 00000000 Entry Point: 00000000 Completed OK # rm -rf /kisskb/build/powerpc-fixes_ppc64e_defconfig+UP_powerpc-gcc5 # Build took: 0:00:58.030454