From patchwork Thu Jun 12 16:30:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Kamensky X-Patchwork-Id: 4343481 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F31D99F3B4 for ; Thu, 12 Jun 2014 16:33:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1544520351 for ; Thu, 12 Jun 2014 16:33:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4BB2C202FF for ; Thu, 12 Jun 2014 16:33:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wv7uW-00085b-Sp; Thu, 12 Jun 2014 16:31:32 +0000 Received: from mail-pd0-f182.google.com ([209.85.192.182]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wv7ty-0007sD-Lp for linux-arm-kernel@lists.infradead.org; Thu, 12 Jun 2014 16:31:00 +0000 Received: by mail-pd0-f182.google.com with SMTP id y13so1137102pdi.27 for ; Thu, 12 Jun 2014 09:30:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IOyhL6dcyjvGr1krqH3Sz+IfhCf2rr3xDZXEsUXCC2U=; b=UsqMT2d9NCtHw3uuLlBEEBK08pCTuM6VGMK8B09Tc1NBJmqFD83+6Z3K73h/FYpGW0 5IPaB2sR95Z2oQijNC/vGouMBHnWBgglDz0qP3IzWPGjX9gNbAl90YXYW3zxV5XMh1NM lCL0+2Z6fis8z3WWD2xhtIXUnR04HAgrRvJYpKpvNU7xF5Gmpf2gwGHa++OE8YNlBvAL aGZuv5u87aIi3L6hf3NLSXXZOIDB8C94xn44ggrl7xoTRlA177m2C36klC/yTvCSKph1 sinmcs+b2QXwojkU8U6KOkU3EDYl+jThzNlOWlfMeLkdNjbAygUAPOhs0uJQe98QovRh nFsw== X-Gm-Message-State: ALoCoQlM69N6SKcIP/RMt8SH/wknzMlZ2Ly2Ny53+EKZmLSrwj/Es4lswnqIFfBdEq4iSwsRQWDQ X-Received: by 10.66.255.67 with SMTP id ao3mr22090054pad.25.1402590637401; Thu, 12 Jun 2014 09:30:37 -0700 (PDT) Received: from kamensky-w530.cisco.com (128-107-239-235.cisco.com. [128.107.239.235]) by mx.google.com with ESMTPSA id nh8sm81278030pbc.25.2014.06.12.09.30.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jun 2014 09:30:36 -0700 (PDT) From: Victor Kamensky To: kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, agraf@suse.de Subject: [PATCH v4 04/14] ARM: KVM: __kvm_vcpu_run function return result fix in BE case Date: Thu, 12 Jun 2014 09:30:03 -0700 Message-Id: <1402590613-3341-5-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1402590613-3341-1-git-send-email-victor.kamensky@linaro.org> References: <1402590613-3341-1-git-send-email-victor.kamensky@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140612_093058_755977_C2C3E857 X-CRM114-Status: UNSURE ( 9.15 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: taras.kondratiuk@linaro.org, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Victor Kamensky X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Christoffer Dall Acked-by: Marc Zyngier --- arch/arm/kvm/interrupts.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S index 24d4e65..01dcb0e 100644 --- a/arch/arm/kvm/interrupts.S +++ b/arch/arm/kvm/interrupts.S @@ -199,8 +199,13 @@ after_vfp_restore: restore_host_regs clrex @ Clear exclusive monitor +#ifndef CONFIG_CPU_ENDIAN_BE8 mov r0, r1 @ Return the return code 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 /********************************************************************