]> git.karo-electronics.de Git - linux-beck.git/commit
ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors
authorWill Deacon <will.deacon@arm.com>
Fri, 24 Aug 2012 14:18:45 +0000 (15:18 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 25 Aug 2012 08:22:32 +0000 (09:22 +0100)
commit195bbcac2e5c12f7fb99cdcc492c3000c5537f4a
tree0ceb437685819d049b60cbf6096ed5be1149b97c
parente91d5d916f50ad2cf2394aba89d32833adce4303
ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors

Data aborts taken to hyp mode do not provide a valid instruction
syndrome field in the HSR if the faulting instruction is a memory
access using a writeback addressing mode.

For hypervisors emulating MMIO accesses to virtual peripherals, taking
such an exception requires disassembling the faulting instruction in
order to determine the behaviour of the access. Since this requires
manually walking the two stages of translation, the world must be
stopped to prevent races against page aging in the guest, where the
first-stage translation is invalidated after the hypervisor has
translated to an IPA and the physical page is reused for something else.

This patch avoids taking this heavy performance penalty when running
Linux as a guest by ensuring that our I/O accessors do not make use of
writeback addressing modes.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/io.h