From patchwork Thu Aug 29 11:34:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 172613 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp2092637ily; Thu, 29 Aug 2019 04:36:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxM7eq4oPfje4QUQIaPInmtSNENznOfQOC9wUNSGkwcGUX6dFP96HifrSgYLXvlDKcfYr/Y X-Received: by 2002:a63:d741:: with SMTP id w1mr7679784pgi.155.1567078590276; Thu, 29 Aug 2019 04:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567078590; cv=none; d=google.com; s=arc-20160816; b=XoYX5lTnrUd1mfG4srPCnZE6pYZkHOw8dvIVvCH74FOmi2HRDShZd9/kKPwG8b+g/s NYfIFtgT067XRgu+iJLVhZKP/BCT72edCGm5G4YQGduA089rIKY+ywOF8KqhCadE2z5z tqISTW42ctzLc5kHbB9BOZE+kMVSEK9ptfFEXvC3k8xDi8Hyo+rgXQ3ZLFs8iv82lyHe m3OkzvttWcEH3qB3Wu78AWRMRoxtdLzWlG0Mj0w+6Mv3885zsav3/zhLJouJLEO/R07r ch59CC+0LpesBmLOpFjG6BImR7fGcu78d+sEXxd6I91q+5uS4ua65rxvWFOTiR/NtIcj G/Qg== 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=N4Pg+XP7+p+o3PIN6zm83hnNZ8M/tn8SbnyMM+rvA6dEP8QmcZgLUOfD+I5pEMsyJI Dyd8HkYJo9kSmhf70mwaOOWiccNRep7Rd1tn4BufEUpd1SBRNDeZDUWM4c4XJC4klrB7 QkkScgOMWNzmYgCoWF9kq8IKhwdX6eFQBqJBnd/UhLX9uyGrR0oOs+fnORKlh7L9nunw EwnjaakaZBvxzPCNcdHjqW7BmN3jh+p5FB6JkhIfjywPh9NuKpmWGZanaiFxEbe3XxkL 5WwjU1sjfbG9QknuBpc9IKEg4FJf90hgBgaiGPG3M3JI8UrsoPjwbpw3oIpS/1YsCs1I MTDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MxVDtRC9; 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 c67si2276378pfb.211.2019.08.29.04.36.30; Thu, 29 Aug 2019 04:36:30 -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=MxVDtRC9; 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 S1727602AbfH2Lg3 (ORCPT + 14 others); Thu, 29 Aug 2019 07:36:29 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46876 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727600AbfH2Lg3 (ORCPT ); Thu, 29 Aug 2019 07:36:29 -0400 Received: by mail-pg1-f195.google.com with SMTP id m3so1427671pgv.13 for ; Thu, 29 Aug 2019 04:36:29 -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=MxVDtRC9Y4lv4jG9hpAos0s+xIe/ARHMDGnoPf/99+Afqj27WqVXGxDp3whA9QF9rj zy6wvMMqo4wV7qE94YEu6uNAYmR1PdZl7H1LI3+jvKB3HAGDQVz2VXLAu5QxQQce/tBe tijrc9X0p0SFXFGpn7D1/0Vt2zlF/lfu/jfnPZBOego/s4nfxvYu+221uEN/M+F0kZIQ i62nKBUOyZX4z8HEn4x2m79tYCUbVRXtoorbzSgzRr+smMy30rrjJW+3cMfV3nV4jg9R RxjZkvAcYmnbOSd/PLmZv80PXkXR0tDFpIGhFn5lfhXWdkjuEyokQp/zUJDuKEjCWkcj mPwQ== 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=AyVyJHjRgD/VujCzuvgbtOjyeaumZrnhb5kd2LCZlmSqOKjKu1gDJtpfXQ/8x2iZfG zjx4hRX+WRMbBd8Cot4ztgYFAu6LDUCMjN3rHst920gVuy12ClpAQS7PLxCqApehCSqg SbQJn0GHlRyoX9XW7anusCxkUpczeMHSTpcTNzcU2g5McKejaEdnz4SalFkw2yGJFYlY D+FxL/Xsuq+SmHSbHEvz5W2yDfP221YHwXMoRsVrEzveDba6FLtdXqZW1hwv2M/WmM4x /M1AUbdkJU6vT/GYCgPOufFJK1r2PgOHLZnidXEsiLbYgkUOvLHEWkoHSCmHzNFa6XVN /XiQ== X-Gm-Message-State: APjAAAVdoO+pqQtl0FFxWsDaDl2BejCt/74p5Lr9fEHyevWWvKhMgokl hI+78eU0lkpgxbnasXfo+Xny+oECfo4= X-Received: by 2002:a65:6850:: with SMTP id q16mr6555728pgt.423.1567078588390; Thu, 29 Aug 2019 04:36:28 -0700 (PDT) Received: from localhost ([122.167.132.221]) by smtp.gmail.com with ESMTPSA id e9sm3945514pfh.155.2019.08.29.04.36.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Aug 2019 04:36:27 -0700 (PDT) From: Viresh Kumar To: stable@vger.kernel.org, Julien Thierry , Mark Rutland Cc: Viresh Kumar , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Marc Zyngier , Will Deacon , Russell King , Vincent Guittot , mark.brown@arm.com Subject: [PATCH ARM64 v4.4 V3 36/44] arm/arm64: KVM: Advertise SMCCC v1.1 Date: Thu, 29 Aug 2019 17:04:21 +0530 Message-Id: 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__ /**