android_kernel_oneplus_msm8998/arch/arm64
Marc Zyngier e83a28c521 arm/arm64: KVM: Enforce unconditional flush to PoC when mapping to stage-2
commit 8f36ebaf21fdae99c091c67e8b6fab33969f2667 upstream.

When we fault in a page, we flush it to the PoC (Point of Coherency)
if the faulting vcpu has its own caches off, so that it can observe
the page we just brought it.

But if the vcpu has its caches on, we skip that step. Bad things
happen when *another* vcpu tries to access that page with its own
caches disabled. At that point, there is no garantee that the
data has made it to the PoC, and we access stale data.

The obvious fix is to always flush to PoC when a page is faulted
in, no matter what the state of the vcpu is.

Fixes: 2d58b733c8 ("arm64: KVM: force cache clean on page fault when caches are off")
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12 06:37:28 +01:00
..
boot arm64: dts: rockchip: add reset saradc node for rk3368 SoCs 2016-09-07 08:32:41 +02:00
configs arm64 fixes and clean-ups: 2015-11-12 15:33:11 -08:00
crypto crypto: arm64/aes-blk - honour iv_out requirement in CBC and CTR modes 2017-02-09 08:02:45 +01:00
include arm/arm64: KVM: Enforce unconditional flush to PoC when mapping to stage-2 2017-03-12 06:37:28 +01:00
kernel arm64: avoid returning from bad_mode 2017-01-26 08:23:50 +01:00
kvm arm64: KVM: Configure TCR_EL2.PS at runtime 2016-09-15 08:27:43 +02:00
lib arm64: add KASAN support 2015-10-12 17:46:36 +01:00
mm arm64: mm: Set PSTATE.PAN from the cpu_enable_pan() call 2016-12-08 07:15:24 +01:00
net arm64: bpf: add 'store immediate' instruction 2015-12-03 11:38:31 -05:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig irqchip/gicv3-its: numa: Enable workaround for Cavium thunderx erratum 23144 2016-09-15 08:27:47 +02:00
Kconfig.debug arm64: remove redundant FRAME_POINTER kconfig option and force to select it 2015-11-10 10:36:00 +00:00
Kconfig.platforms ARM: DT updates for v4.4 2015-11-10 15:06:26 -08:00
Makefile arm64: errata: Add -mpc-relative-literal-loads to build flags 2016-03-03 15:07:08 -08:00