diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2013-11-05 18:12:15 +0400 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2013-11-07 23:09:08 +0400 |
commit | ce94fe93d566bf381c6ecbd45010d36c5f04d692 (patch) | |
tree | 964abbc8b5f43d94543a053cfaa2c7e1b3fc71f5 /arch/arm/include | |
parent | 6d89d2d9b5bac9dbe40ee106ceda9307b6265234 (diff) | |
download | linux-ce94fe93d566bf381c6ecbd45010d36c5f04d692.tar.xz |
arm/arm64: KVM: PSCI: propagate caller endianness to the incoming vcpu
When booting a vcpu using PSCI, make sure we start it with the
endianness of the caller. Otherwise, secondaries can be pretty
unhappy to execute a BE kernel in LE mode...
This conforms to PSCI spec Rev B, 5.13.3.
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/kvm_emulate.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h index 8a6be05a46d7..e844b335e33a 100644 --- a/arch/arm/include/asm/kvm_emulate.h +++ b/arch/arm/include/asm/kvm_emulate.h @@ -157,6 +157,11 @@ static inline u32 kvm_vcpu_hvc_get_imm(struct kvm_vcpu *vcpu) return kvm_vcpu_get_hsr(vcpu) & HSR_HVC_IMM_MASK; } +static inline void kvm_vcpu_set_be(struct kvm_vcpu *vcpu) +{ + *vcpu_cpsr(vcpu) |= PSR_E_BIT; +} + static inline bool kvm_vcpu_is_be(struct kvm_vcpu *vcpu) { return !!(*vcpu_cpsr(vcpu) & PSR_E_BIT); |