Searched hist:"8 c2d146ee7a2e0782eea4dd70fddc1c837140136" (Results 1 – 2 of 2) sorted by relevance
/linux/arch/arm64/kvm/hyp/ |
H A D | vgic-v2-cpuif-proxy.c | diff 8c2d146ee7a2e0782eea4dd70fddc1c837140136 Thu Feb 20 17:58:38 CET 2020 James Morse <james.morse@arm.com> 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
|
/linux/arch/arm64/include/asm/ |
H A D | kvm_hyp.h | diff 8c2d146ee7a2e0782eea4dd70fddc1c837140136 Thu Feb 20 17:58:38 CET 2020 James Morse <james.morse@arm.com> 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
|