linux/arch/arm/kvm
Marc Zyngier b4034bde5f ARM: KVM: fix address validation for HYP mappings
__create_hyp_mappings() performs some kind of address validation before
creating the mapping, by verifying that the start address is above
PAGE_OFFSET.

This check is not completely correct for kernel memory (the upper
boundary has to be checked as well so we do not end up with highmem
pages), and wrong for IO mappings (the mapping must exist in the vmalloc
region).

Fix this by using the proper predicates (virt_addr_valid and
is_vmalloc_addr), which also work correctly on ARM64 (where the vmalloc
region is below PAGE_OFFSET).

Also change the BUG_ON() into a less agressive error return.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2013-03-06 15:48:44 -08:00
..
arch_timer.c ARM: KVM: arch_timers: Add guest timer core support 2013-02-11 19:05:11 +00:00
arm.c ARM: KVM: use kvm_kernel_vfp_t as an abstract type for VFP containers 2013-03-06 15:48:44 -08:00
coproc_a15.c KVM: ARM: Emulation framework and CP15 emulation 2013-01-23 13:29:13 -05:00
coproc.c ARM: KVM: abstract IL decoding away 2013-03-06 15:48:43 -08:00
coproc.h ARM: KVM: convert GP registers from u32 to unsigned long 2013-03-06 15:48:42 -08:00
emulate.c ARM: KVM: move kvm_condition_valid to emulate.c 2013-03-06 15:48:43 -08:00
guest.c KVM: ARM: User space API for getting/setting co-proc registers 2013-01-23 13:29:14 -05:00
handle_exit.c KVM: ARM: Reintroduce trace_kvm_hvc 2013-03-06 15:48:43 -08:00
init.S
interrupts_head.S ARM: KVM: arch_timers: Add timer world switch 2013-02-11 19:05:38 +00:00
interrupts.S KVM: ARM: Fix wrong address in comment 2013-03-06 15:48:42 -08:00
Kconfig ARM: KVM: arch_timers: Wire the init code and config option 2013-02-11 19:06:00 +00:00
Makefile ARM: KVM: move exit handler selection to a separate file 2013-03-06 15:48:43 -08:00
mmio.c ARM: KVM: abstract IL decoding away 2013-03-06 15:48:43 -08:00
mmu.c ARM: KVM: fix address validation for HYP mappings 2013-03-06 15:48:44 -08:00
psci.c KVM: ARM: Power State Coordination Interface implementation 2013-01-23 13:29:18 -05:00
reset.c
trace.h KVM: ARM: Handle I/O aborts 2013-01-23 13:29:17 -05:00
vgic.c ARM: KVM: arch_timers: Wire the init code and config option 2013-02-11 19:06:00 +00:00