linux/arch/arm64/kvm
Marc Zyngier 9d218a1fcf arm64: KVM: flush VM pages before letting the guest enable caches
When the guest runs with caches disabled (like in an early boot
sequence, for example), all the writes are diectly going to RAM,
bypassing the caches altogether.

Once the MMU and caches are enabled, whatever sits in the cache
becomes suddenly visible, which isn't what the guest expects.

A way to avoid this potential disaster is to invalidate the cache
when the MMU is being turned on. For this, we hook into the SCTLR_EL1
trapping code, and scan the stage-2 page tables, invalidating the
pages/sections that have already been mapped in.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
2014-03-03 01:15:22 +00:00
..
emulate.c arm64: KVM: 32bit conditional execution emulation 2013-06-12 16:42:15 +01:00
guest.c arm64: KVM: Support X-Gene guest VCPU on APM X-Gene host 2013-12-28 10:28:50 +00:00
handle_exit.c First round of KVM updates for 3.14; PPC parts will come next week. 2014-01-22 21:40:43 -08:00
hyp-init.S arm64: KVM: initialize HYP mode following the kernel endianness 2013-11-06 10:10:01 +00:00
hyp.S arm/arm64: KVM: detect CPU reset on CPU_PM_EXIT 2014-02-27 19:27:10 +01:00
inject_fault.c arm64: KVM: 32bit guest fault injection 2013-06-12 16:42:18 +01:00
Kconfig arm64: KVM: Add Kconfig option for max VCPUs per-Guest 2013-12-28 10:28:50 +00:00
Makefile arm64: KVM: 32bit conditional execution emulation 2013-06-12 16:42:15 +01:00
regmap.c arm64: KVM: 32bit GP register access 2013-06-12 16:42:14 +01:00
reset.c arm64: KVM: enable initialization of a 32bit vcpu 2013-06-12 16:42:18 +01:00
sys_regs_generic_v8.c arm64: KVM: Support X-Gene guest VCPU on APM X-Gene host 2013-12-28 10:28:50 +00:00
sys_regs.c arm64: KVM: flush VM pages before letting the guest enable caches 2014-03-03 01:15:22 +00:00
sys_regs.h arm64: KVM: allows discrimination of AArch32 sysreg access 2014-03-03 01:15:21 +00:00