linux-sg2042/arch/arm/kvm
Marc Zyngier 94d0e5980d arm/arm64: KVM: Perform local TLB invalidation when multiplexing vcpus on a single CPU
Architecturally, TLBs are private to the (physical) CPU they're
associated with. But when multiple vcpus from the same VM are
being multiplexed on the same CPU, the TLBs are not private
to the vcpus (and are actually shared across the VMID).

Let's consider the following scenario:

- vcpu-0 maps PA to VA
- vcpu-1 maps PA' to VA

If run on the same physical CPU, vcpu-1 can hit TLB entries generated
by vcpu-0 accesses, and access the wrong physical page.

The solution to this is to keep a per-VM map of which vcpu ran last
on each given physical CPU, and invalidate local TLBs when switching
to a different vcpu from the same VM.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2016-11-04 17:56:28 +00:00
..
hyp arm/arm64: KVM: Perform local TLB invalidation when multiplexing vcpus on a single CPU 2016-11-04 17:56:28 +00:00
Kconfig KVM: arm/arm64: Enable irqchip routing 2016-07-22 18:52:01 +01:00
Makefile ARM: KVM: Support vgic-v3 2016-09-22 13:22:21 +02:00
arm.c arm/arm64: KVM: Perform local TLB invalidation when multiplexing vcpus on a single CPU 2016-11-04 17:56:28 +00:00
coproc.c ARM: KVM: Support vgic-v3 2016-09-22 13:22:21 +02:00
coproc.h ARM: KVM: Rename struct coproc_reg::is_64 to is_64bit 2016-02-29 18:34:22 +00:00
coproc_a7.c arm/arm64: KVM: Use set/way op trapping to track the state of the caches 2015-01-29 23:24:56 +01:00
coproc_a15.c arm/arm64: KVM: Use set/way op trapping to track the state of the caches 2015-01-29 23:24:56 +01:00
emulate.c arm: KVM: Add Virtual Abort injection helper 2016-09-08 12:53:00 +02:00
guest.c KVM: ARM: Fix typos 2016-06-14 11:16:26 +02:00
handle_exit.c arm: KVM: Drop unreachable HYP abort handlers 2016-09-08 12:53:00 +02:00
init.S arm: KVM: Allow hyp teardown 2016-07-03 23:41:27 +02:00
interrupts.S ARM: KVM: Remove the old world switch 2016-02-29 18:34:14 +00:00
irq.h KVM: arm/arm64: Enable irqchip routing 2016-07-22 18:52:01 +01:00
mmio.c arm/arm64: KVM: Remove external abort test from MMIO handling 2016-09-08 12:53:00 +02:00
mmu.c KVM updates for v4.9-rc1 2016-10-06 10:49:01 -07:00
perf.c ARM: KVM: add support for minimal host vs guest profiling 2013-04-28 21:44:01 -07:00
psci.c KVM: Use simple waitqueue for vcpu->wq 2016-02-25 11:27:16 +01:00
reset.c KVM: ARM: Fix typos 2016-06-14 11:16:26 +02:00
trace.h arm/arm64: KVM: Improve kvm_exit tracepoint 2015-10-22 23:01:47 +02:00