From patchwork Mon Apr 3 18:37:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 9660085 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 8447860352 for ; Mon, 3 Apr 2017 18:39:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7ABB92849A for ; Mon, 3 Apr 2017 18:39:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E6AF284F5; Mon, 3 Apr 2017 18:39:19 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 028FA2849A for ; Mon, 3 Apr 2017 18:39:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754144AbdDCSjQ (ORCPT ); Mon, 3 Apr 2017 14:39:16 -0400 Received: from foss.arm.com ([217.140.101.70]:34940 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754201AbdDCSjF (ORCPT ); Mon, 3 Apr 2017 14:39:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 56B801B55; Mon, 3 Apr 2017 11:39:05 -0700 (PDT) Received: from approximate.cambridge.arm.com (approximate.cambridge.arm.com [10.1.207.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 70B533F3E1; Mon, 3 Apr 2017 11:39:03 -0700 (PDT) From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Cc: Russell King , Christoffer Dall , Mark Rutland , Catalin Marinas , James Morse , Ard Biesheuvel , Keerthy Subject: [PATCH v5 18/34] ARM: hyp-stub: Define a return value for failed stub calls Date: Mon, 3 Apr 2017 19:37:51 +0100 Message-Id: <20170403183807.1620-19-marc.zyngier@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170403183807.1620-1-marc.zyngier@arm.com> References: <20170403183807.1620-1-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Define a standard return value to be returned when a hyp stub call fails. Signed-off-by: Marc Zyngier --- 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 4ea16fcaf2ed..c16f70d6953f 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 15eaa14322a7..b20ca8815911 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