From patchwork Sun Apr 23 17:09:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9695099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4783460245 for ; Sun, 23 Apr 2017 17:18:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35A8126530 for ; Sun, 23 Apr 2017 17:18:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2905D267EC; Sun, 23 Apr 2017 17:18:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A1E1C26530 for ; Sun, 23 Apr 2017 17:18:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=GgAgQNiZaYc/JBUwq960C1Uwg6zF5Dh8L9V/2fMKPuM=; b=dm9bY2N1FAsGXlMvNq0hlanP0B B4dZLhZfrYHzWLKneaIGwr23ckUEgohNMzdwYmrFJrB1hbk1uYADQ6uRh/lPj0j9NgtFomAQf7cXy W2DhsLKzcd8TLgetX6zjL6/3rE3Kzbckuv6tUggLEu9puyCdyjopT18PzH4N8Bblbw+n76/G+XnKW BPU8iBEBYN1jSwlV9DgM1+4G71HlYsxO5LSP04zJLE1PE+Di3JUq8ctvN9xGDlqr03lUpyyBLgudu TyjLL3LQt62YtSV6VAYl0KuSb7mQiv7yM9+V+MkhTM6hJNfaP2Tj0WzHi/yU0nO5QG6rP1IWWcIhn pczpgN3A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d2L94-000752-D5; Sun, 23 Apr 2017 17:17:58 +0000 Received: from mail-wr0-f180.google.com ([209.85.128.180]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d2L2A-0006QS-He for linux-arm-kernel@lists.infradead.org; Sun, 23 Apr 2017 17:10:58 +0000 Received: by mail-wr0-f180.google.com with SMTP id z52so37735769wrc.2 for ; Sun, 23 Apr 2017 10:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B0HqgyIYN8BnZAHWJqaXaflzAnfZnldNrEF0mFbk/T0=; b=elAyJeSohLwP41F8/ERhLkxS4po3tNORxWJkf+lKcj7/j7N4jmw/tpJO61/FM+O6dz sCwMHM4GkM6rs6aodmWTuxim5+kyhUiy8ftdGBpHAQZS8o8OUyz2WJentIRqqmnwoFfc Ij/m+9kBHCrIIoQgVYMNl2ekfplxjgqbMwtl4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B0HqgyIYN8BnZAHWJqaXaflzAnfZnldNrEF0mFbk/T0=; b=e5FLtt6rL9eycMaSCJ3j0o8uLmWo8/2pjFaKiXv9iylniQpn2hOCCnG4+4nFecrCYS Y+tloV86JvDSPErUm+SDVxzsP97dFVdIEEPGQH8B4ZWsRMV9H5BDlC3XxJ8i7alHoXKl 72lhCIjCmRfPIqeK+x5SuTojRdCT8u/B0Foa9erm5MJImG5+H8TrFfn7cPMm3f5gTEgx LQ4FbqAQfYAMdFnPaIjBRnX9hx9ABjVbcJo6MDpNgTslO5DgFBpVegLugjOVkAaIo0NN mxdFIzr4u4yLKwVM/aDqYIigPXhkgf1t1xcfb+rQI2w3jkO//apiql+EP1wAgpUxvyIf 06jw== X-Gm-Message-State: AN3rC/7YfK9etixldef5aqo11bjyNSA12gH4NwPqFLn7vJ3KKmBbeX9o u9Z0x+mT8wiAWFNo X-Received: by 10.223.142.50 with SMTP id n47mr2594293wrb.188.1492967427802; Sun, 23 Apr 2017 10:10:27 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id 58sm2803521edz.2.2017.04.23.10.10.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Apr 2017 10:10:27 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 53/79] ARM: hyp-stub: Define a return value for failed stub calls Date: Sun, 23 Apr 2017 19:09:03 +0200 Message-Id: <20170423170929.27334-54-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170423170929.27334-1-cdall@linaro.org> References: <20170423170929.27334-1-cdall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170423_101051_244976_1C85E93B X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Christoffer Dall , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc Zyngier Define a standard return value to be returned when a hyp stub call fails. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/arm/include/asm/virt.h | 2 ++ arch/arm/kernel/hyp-stub.S | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/virt.h b/arch/arm/include/asm/virt.h index 4ea16fc..c16f70d 100644 --- a/arch/arm/include/asm/virt.h +++ b/arch/arm/include/asm/virt.h @@ -104,4 +104,6 @@ extern char __hyp_text_end[]; #endif /* __ASSEMBLY__ */ +#define HVC_STUB_ERR 0xbadca11 + #endif /* ! VIRT_H */ diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S index 15eaa14..b20ca88 100644 --- a/arch/arm/kernel/hyp-stub.S +++ b/arch/arm/kernel/hyp-stub.S @@ -216,7 +216,7 @@ __hyp_stub_do_trap: bne 1f bx r1 -1: mov r0, #-1 +1: ldr r0, =HVC_STUB_ERR __hyp_stub_exit: __ERET