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: 9695011 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 E9DC460245 for ; Sun, 23 Apr 2017 17:12:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3DC420564 for ; Sun, 23 Apr 2017 17:12:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8AFC212BE; Sun, 23 Apr 2017 17:12:31 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 872FB20564 for ; Sun, 23 Apr 2017 17:12:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163328AbdDWRMa (ORCPT ); Sun, 23 Apr 2017 13:12:30 -0400 Received: from mail-wr0-f174.google.com ([209.85.128.174]:33259 "EHLO mail-wr0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162302AbdDWRK3 (ORCPT ); Sun, 23 Apr 2017 13:10:29 -0400 Received: by mail-wr0-f174.google.com with SMTP id w50so55836420wrc.0 for ; Sun, 23 Apr 2017 10:10:28 -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=laigDI0WBqZzYGrGfnu8efklHGxRkF8uMvWGV22nCyaqYyyTlApY3Re0YR+ZTtbWU7 H9VMWphLgbXc+mp+fKEDl23I6FrC1fkT444CO/hv8pZ95A4IFubvNi1lurbyRODbo8Gv Tt38IjjaX1q5RobwFTdcfmtjPzOrOysmC9WdKcxtXCJ+Nr/ens4wMZDhG5/bmjVl3bDO BNj0GkBZ7RGJBkBq+hEx32KK63Uy3nwBkNxTOG6+Bi9zKcCOTt0tLDXon1KshOZHChGW XTWy1N2z3VKcMIOZbl01kC6v8Nw7by7FJ0kbyyYnuSrxaTak9LcVzBu5uftJEy+/K0VB dV8g== X-Gm-Message-State: AN3rC/7Jgm4Mw9sHFaCa0gwE4xLRotBsPNFJt3rAub5MaLgyGxLrftTK 4D0+7BQb7Iphx2Mm 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?= Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Christoffer Dall 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> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.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