James Morse 8c2d146ee7 KVM: arm64: Define our own swab32() to avoid a uapi static inline
KVM uses swab32() when mediating GIC MMIO accesses if the GICV is badly
aligned, and the host and guest differ in endianness.

arm64 doesn't provide a __arch_swab32(), so __fswab32() is always backed
by the macro implementation that the compiler reduces to a single
instruction. But the static-inline causes problems for KVM if the compiler
chooses not to inline this function, it may not be located in the
__hyp_text where __vgic_v2_perform_cpuif_access() needs it.

Create our own __kvm_swab32() macro that calls ___constant_swab32()
directly. This way we know it will always be inlined.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200220165839.256881-3-james.morse@arm.com
2020-02-22 11:01:47 +00:00
..
2019-12-12 09:59:38 +08:00
2019-12-06 14:18:01 -08:00
2019-09-03 15:44:40 +02:00
2019-08-21 18:47:15 +01:00
2019-11-28 11:16:43 -08:00
2019-11-06 07:46:42 -08:00
2019-11-06 14:17:35 +00:00