From patchwork Tue May 13 16:13:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Kamensky X-Patchwork-Id: 4169461 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 E0EBC9F1C0 for ; Tue, 13 May 2014 16:18:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 24D5B20221 for ; Tue, 13 May 2014 16:18:56 +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 5B9102020A for ; Tue, 13 May 2014 16:18:55 +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 1WkFMU-0002fH-Gu; Tue, 13 May 2014 16:15:26 +0000 Received: from mail-pb0-f43.google.com ([209.85.160.43]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WkFMG-0001Sv-8W for linux-arm-kernel@lists.infradead.org; Tue, 13 May 2014 16:15:13 +0000 Received: by mail-pb0-f43.google.com with SMTP id up15so458474pbc.30 for ; Tue, 13 May 2014 09:14:56 -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=7MTiOqZXdiXDTNW1mqs0HxtSbrrNR+1SpY7EhpF7tOI=; b=CAVc5EMd7sJ9sAfvIYe3LsZ/+wyUHNU3B1yMLzfKMrJNQF8kun2xB89RBlDrIi3H6E 3g4/CBFIhNCQwFvVMgsJ0KUmv4WbHUpeLtl0nYaRuGVIZBuDQMt+3CVWOe+Ru3lDetih bUDb42MAo2/MHk7SbKcDpVz45rNNFw6ua1bEP+ti2Uf4qTb4FRWunqxog6U889FiVSts l3iW29P8yP1Buqo9FdiYVL8vPpGygkwujvX9VsUCqK4hcBokzYjP+xtUmYVfRNPIKs/B VBooTV/RUNk3mwMhaQkECTeLFTRCjI9Xwej+MbQt6QmYxmO9o6BHmPBQ3rGfgmQU8umH dEzA== X-Gm-Message-State: ALoCoQnzdnQiTbZcgdEe/xH5KnJLd+LiL7W8KLv4Y8UvK8w4w+1f65R4TVOUKU1nkQa8/HrQWW/J X-Received: by 10.66.140.6 with SMTP id rc6mr64779686pab.87.1399997696396; Tue, 13 May 2014 09:14:56 -0700 (PDT) Received: from kamensky-w530.hsd1.ca.comcast.net (c-24-6-79-41.hsd1.ca.comcast.net. [24.6.79.41]) by mx.google.com with ESMTPSA id dd5sm28958360pbc.85.2014.05.13.09.14.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 May 2014 09:14:55 -0700 (PDT) From: Victor Kamensky To: kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, agraf@suse.de Subject: [PATCH v3 04/14] ARM: KVM: __kvm_vcpu_run function return result fix in BE case Date: Tue, 13 May 2014 09:13:56 -0700 Message-Id: <1399997646-4716-5-git-send-email-victor.kamensky@linaro.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1399997646-4716-1-git-send-email-victor.kamensky@linaro.org> References: <1399997646-4716-1-git-send-email-victor.kamensky@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140513_091512_352327_E76D3BE3 X-CRM114-Status: UNSURE ( 9.08 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) 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.15 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..7dfe9e4 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 __ARMEB__ 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 /* __ARMEB__ */ bx lr @ return to IOCTL /********************************************************************