From patchwork Fri Jul 12 05:28:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 168894 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp395746ilk; Thu, 11 Jul 2019 22:30:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyU9xTAo97ZTP3xhQeoQ0TXu4ZSMirV1694i3SCo5r17B70T3sBMFsYl15AhlN+Vke1V86V X-Received: by 2002:a63:24c1:: with SMTP id k184mr8853794pgk.120.1562909437019; Thu, 11 Jul 2019 22:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562909437; cv=none; d=google.com; s=arc-20160816; b=gGG8P+f4xiVBMJrt1Ixa6sG21onmLB6cPF3NNO3ulV2HzobygJ1rL8InCjhjysP8kP 4vmWUqWJA4f8Q8vB5wmz0I81uQ/9P4/XBw1BmYalUFtQalb1tW1EQuDysnmGxDKxh+Ih SvJT8XBcU72jvPAivY1tnEAdxoKBTMiHt+2jMpuvtAYV9AG5SQIL5bH65fK24s2Cmzat mVMjZGv1M842T8PYqNg8rMsR7gI4vSwd9yEA6wghfPdMMs+Rq4+xpRpBzjdiDox8XiPw Eu6k/v8c9oKbAkwxyaZAqb482YCox6DZpzeZEIwJph0nI0v14tlZ/sUCfoViZILNdyyX UJCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FDb8snX7fHtHRXPBtLwcic7/q7BlhqslXapsBvvT9m4=; b=j3c6y0AdHgDL3PyMJL1KlPhG97ahjDDiYJH0OU7aGrqQzEZ8ZZjYqUUqgf+99vtGjc H0yETlY5eO70isHp+LBcN5s4n7ouOpLGXq2WLl2Z6mLlYIRgJiawCLXQhb2jQvG2ckfv a4T7xQ3WNuWiYooGDrKK/woNkWaRdJV1CueloDEO1cxzy3lG2hxZR0K7p3QBfApysxVs n1KAH7EVXwJEmOhIAfjtxc+Mh0HejG1gbkV5e0g5krvmoJY0YXhwIMzHl6NDsWl6kcAu 3kE6clvMBubSVfL+jrn+TZEpyt4UCUTjCVL1yoSGnzyDoSq70WTBecEtyc9u1K+YN72V sp2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eiibal9G; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e36si5303191pgm.17.2019.07.11.22.30.36; Thu, 11 Jul 2019 22:30:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eiibal9G; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726095AbfGLFag (ORCPT + 13 others); Fri, 12 Jul 2019 01:30:36 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:39495 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725791AbfGLFag (ORCPT ); Fri, 12 Jul 2019 01:30:36 -0400 Received: by mail-pg1-f195.google.com with SMTP id u17so4003697pgi.6 for ; Thu, 11 Jul 2019 22:30:35 -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 :mime-version:content-transfer-encoding; bh=FDb8snX7fHtHRXPBtLwcic7/q7BlhqslXapsBvvT9m4=; b=eiibal9GFko1a+tgQN3krnXtrWdBZuqF3op4VIu+Wf3BT3yWBoqbTx9WQb/SIzb2Pv nU+5d2riU9FFB7ZObi6T0/FmOiVAW5aGYEmZjvrkkPJ2g6yeqttaBIBexfwHx+XltErC Y3DQoi4yokam/JVK9tv8g0c/tsQBw2y1zMoB/JHCIAUoY1gZtZBgHuw03VTQnbdwe9kP Pt6+p3ZXg8pzKllRVC4QKdzpBSOhLptnFhC4kPw4VLGxf9zD3HLpNXMD2tlXjktOiBhV WavqlMtulcslGCSBKhXOA08M969cG9OWXlkrqjc6vZeeITO1cX9t1Zu5KT2rCDtkxCAx U0cg== 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:mime-version:content-transfer-encoding; bh=FDb8snX7fHtHRXPBtLwcic7/q7BlhqslXapsBvvT9m4=; b=RcMLI8Mgk6ZJwQwceFaBbx0YaqypKGclDONy8pwb9N6uQNW1Cz3C7zaMOL1mbT75P8 Ht1yCTV6hmgMPEHC2VZEMvO+pl0C3IF4lppFkmf2qdpaiS3nuTmH0DNTcCJswAEWlOnO JdhbtwhWvxpOhhy5sLJpeslvJVyKXQw/dC6+VwJxGxxJlXTkri2uYGTddA48q/UpBonF bvpQKNEKY9RF5BKU+5RlkvGq5IVj+KIh/rJsnkoVHq/S616U22+PvfHjsLOcvnCzL3sH IJOjqhC9f1qP0hyuXThlIzxHumgCfTVHxbkYLCzwpOkQTFYSSg7pPHaGs5arrK2XyftR KPyw== X-Gm-Message-State: APjAAAUnpHuuNMD0mhzCaS5709RZldKU+bVbRBsaHLM9deZZ0JQZZQFz 0itpCkyJKzZq9sdfZvSUbFgfMQcubp8= X-Received: by 2002:a63:d04e:: with SMTP id s14mr8225037pgi.189.1562909435104; Thu, 11 Jul 2019 22:30:35 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id 143sm12297066pgc.6.2019.07.11.22.30.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jul 2019 22:30:34 -0700 (PDT) From: Viresh Kumar To: stable@vger.kernel.org, Julien Thierry Cc: Viresh Kumar , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Marc Zyngier , Mark Rutland , Will Deacon , Russell King , Vincent Guittot , mark.brown@arm.com Subject: [PATCH v4.4 V2 35/43] arm/arm64: KVM: Advertise SMCCC v1.1 Date: Fri, 12 Jul 2019 10:58:23 +0530 Message-Id: <7c5975b0d2850d2b728f4688a3fedfed6bcbe75c.1562908075.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b In-Reply-To: References: MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marc Zyngier commit 09e6be12effdb33bf7210c8867bbd213b66a499e upstream. The new SMC Calling Convention (v1.1) allows for a reduced overhead when calling into the firmware, and provides a new feature discovery mechanism. Make it visible to KVM guests. Tested-by: Ard Biesheuvel Reviewed-by: Christoffer Dall Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas [ Viresh: Picked only arm-smccc.h changes ] Signed-off-by: Viresh Kumar --- include/linux/arm-smccc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.21.0.rc0.269.g1a574e7a288b diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index 611d10580340..da9f3916f9a9 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -60,6 +60,19 @@ #define ARM_SMCCC_OWNER_TRUSTED_OS 50 #define ARM_SMCCC_OWNER_TRUSTED_OS_END 63 +#define ARM_SMCCC_VERSION_1_0 0x10000 +#define ARM_SMCCC_VERSION_1_1 0x10001 + +#define ARM_SMCCC_VERSION_FUNC_ID \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ + ARM_SMCCC_SMC_32, \ + 0, 0) + +#define ARM_SMCCC_ARCH_FEATURES_FUNC_ID \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ + ARM_SMCCC_SMC_32, \ + 0, 1) + #ifndef __ASSEMBLY__ /**