OpenCloudOS-Kernel/arch/arm/kvm
Marc Zyngier 0d3e4d4fad arm/arm64: KVM: Use kernel mapping to perform invalidation on page fault
When handling a fault in stage-2, we need to resync I$ and D$, just
to be sure we don't leave any old cache line behind.

That's very good, except that we do so using the *user* address.
Under heavy load (swapping like crazy), we may end up in a situation
where the page gets mapped in stage-2 while being unmapped from
userspace by another CPU.

At that point, the DC/IC instructions can generate a fault, which
we handle with kvm->mmu_lock held. The box quickly deadlocks, user
is unhappy.

Instead, perform this invalidation through the kernel mapping,
which is guaranteed to be present. The box is much happier, and so
am I.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-01-29 23:24:57 +01:00
..
Kconfig ARM: KVM: enable KVM in Kconfig on big-endian systems 2014-07-11 04:57:41 -07:00
Makefile KVM: ARM: vgic: split GICv2 backend from the main vgic code 2014-07-11 04:57:34 -07:00
arm.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.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.h arm/arm64: KVM: Use set/way op trapping to track the state of the caches 2015-01-29 23:24:56 +01: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 KVM: ARM: Fix typo in comments of inject_abt() 2013-10-02 17:29:19 +01:00
guest.c arm/arm64: KVM: Clarify KVM_ARM_VCPU_INIT ABI 2014-12-13 14:15:26 +01:00
handle_exit.c arm/arm64: KVM: Complete WFI/WFE instructions 2014-08-29 11:53:53 +02:00
init.S ARM/ARM64: KVM: Nuke Hyp-mode tlbs before enabling MMU 2014-08-29 11:53:26 +02:00
interrupts.S ARM: KVM: __kvm_vcpu_run function return result fix in BE case 2014-07-11 04:57:39 -07:00
interrupts_head.S arm/arm64: KVM: Fix BE accesses to GICv2 EISR and ELRSR regs 2014-10-16 10:57:41 +02:00
mmio.c arm/arm64: KVM: avoid unnecessary guest register mangling on MMIO read 2014-11-25 13:57:28 +00:00
mmu.c arm/arm64: KVM: Use kernel mapping to perform invalidation on page fault 2015-01-29 23:24:57 +01:00
perf.c ARM: KVM: add support for minimal host vs guest profiling 2013-04-28 21:44:01 -07:00
psci.c arm/arm64: KVM: Turn off vcpus on PSCI shutdown/reboot 2014-12-13 14:15:27 +01:00
reset.c Updates for KVM/ARM, take 3 supporting more than 4 CPUs. 2013-11-11 12:02:27 +01:00
trace.h arm/arm64: KVM: Use set/way op trapping to track the state of the caches 2015-01-29 23:24:56 +01:00