Browse Source

ARM: KVM: __kvm_vcpu_run function return result fix in BE case

The __kvm_vcpu_run function returns a 64-bit result in two registers,
which has to be adjusted for BE case.

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Victor Kamensky 11 years ago
parent
commit
6d7311b520
1 changed files with 5 additions and 0 deletions
  1. 5 0
      arch/arm/kvm/interrupts.S

+ 5 - 0
arch/arm/kvm/interrupts.S

@@ -199,8 +199,13 @@ after_vfp_restore:
 
 
 	restore_host_regs
 	restore_host_regs
 	clrex				@ Clear exclusive monitor
 	clrex				@ Clear exclusive monitor
+#ifndef CONFIG_CPU_ENDIAN_BE8
 	mov	r0, r1			@ Return the return code
 	mov	r0, r1			@ Return the return code
 	mov	r1, #0			@ Clear upper bits in return value
 	mov	r1, #0			@ Clear upper bits in return value
+#else
+	@ r1 already has return code
+	mov	r0, #0			@ Clear upper bits in return value
+#endif /* CONFIG_CPU_ENDIAN_BE8 */
 	bx	lr			@ return to IOCTL
 	bx	lr			@ return to IOCTL
 
 
 /********************************************************************
 /********************************************************************