# 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 80 ARCH=powerpc O=/kisskb/build/powerpc-fixes_44x_iss476-smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- 44x/iss476-smp_defconfig WARNING: unmet direct dependencies detected for HOTPLUG_CPU Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n]) Selected by [y]: - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y] WARNING: unmet direct dependencies detected for HOTPLUG_CPU Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n]) Selected by [y]: - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y] WARNING: unmet direct dependencies detected for HOTPLUG_CPU Depends on [n]: SMP [=y] && (PPC_PSERIES [=n] || PPC_PMAC [=n] || PPC_POWERNV [=n] || FSL_SOC_BOOKE [=n]) Selected by [y]: - PM_SLEEP_SMP [=y] && SMP [=y] && (ARCH_SUSPEND_POSSIBLE [=y] || ARCH_HIBERNATION_POSSIBLE [=y]) && PM_SLEEP [=y] # make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-fixes_44x_iss476-smp_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- INFO: Uncompressed kernel (size 0x609198) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x700000) INFO: Uncompressed kernel (size 0x609198) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x700000) Completed OK # rm -rf /kisskb/build/powerpc-fixes_44x_iss476-smp_defconfig_powerpc-gcc5 # Build took: 0:00:53.029926