From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3189C47071 for ; Thu, 16 Nov 2023 20:16:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4GXuj673wKaj27cpcaE3hFPJmVze4Pf+QLsz2cd42bs=; b=L5ocNN4xlAL4nF gJVdW2ifE1GG+Fp0Qq4U28VFS0Xua3D4sQGrg3L/lpA1u5G5MsqZ+YsclPLdBcsQtr+VOrLxGE8Qq xapgQ9XMBUHdokzphJr+Bet0lNRz9kUONdSlXoceiVnDdBLZ2jKTLTbqYDtYRtBjBrxJLWov1AG4T KveTcouOMEaoKw1cHNi7f3e7vGweOXDLc8IQZ5N80ED7mN5jrPFEmuxPET2JVPJtCCDdiLPJSulE2 4HhQENPpzRU6wtHOEc1JSo5LlA52ATMGhDggVnfiA1/SIXU/N77PJCNOPmRLcSs5FXswizOgxqqzU 7hbpkUh2P0OxqN0WchrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3imF-004hA4-1t; Thu, 16 Nov 2023 20:15:51 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3hjA-004QUe-0m for linux-arm-kernel@lists.infradead.org; Thu, 16 Nov 2023 19:08:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uryGSx2r+KBBKtYnZwparRWHnho2ggpLtpZaQHsRXRw=; b=lRkle9xweJK7FFbW1FFvqC/n43 7bis5aAZ9xrI18O/ptwXmM155hy8w6KCcZlmPl2xwbuccPv5/IvODiAKZYv5Gcgiy/8r/+RZ1uqEr N0FSM9XGAlwCoi/qZDSpYUexsnBNCCvp0S0/Bq1iQvgjs3zeiTx2ffzNhelowyjCE5bEN4t0+9uum mm7li3txI51DvM5jF2I6L1DCPFqTCp7XceR4ua/NuYMhLH8ntDv5WsrX1oveXvEW/2sT/2IOlnYiU DaEX8CIQmzIgmnBc0/yBqILrTutofk5t/PfD3YbD/NVaZCrC4LWrj8FwQBxz6TgMSoQmHAyVOb/Yr uQE3YJHQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:39226) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r3hgx-0002Bb-1i; Thu, 16 Nov 2023 19:06:19 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r3hgx-0007nw-0G; Thu, 16 Nov 2023 19:06:19 +0000 Date: Thu, 16 Nov 2023 19:06:18 +0000 From: "Russell King (Oracle)" To: Jianyong Wu Cc: maz@kernel.org, james.morse@arm.com, will@kernel.org, salil.mehta@huawei.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, justin.he@arm.com Subject: Re: [PATCH] arm64/kvm: Introduce feature extension for SMCCC filter Message-ID: References: <20231116114152.912344-1-jianyong.wu@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231116114152.912344-1-jianyong.wu@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231116_110836_306915_3EE246D3 X-CRM114-Status: GOOD ( 14.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 16, 2023 at 11:41:52AM +0000, Jianyong Wu wrote: > 821d935c87b introduces support for userspace SMCCC filtering, but lack > of a way to tell userspace if we have this feature. Add a corresponding > feature extension can resolve this issue. > > For example, the incoming feature Vcpu Hotplug needs the SMCCC filter. > As there is no way to check this feature, VMM will run into error when > it calls this feature on an old kernel. It's bad for backward compatible. Can't you just attempt to use the SMCCC filtering, and if it errors out with the appropriate error code, decide that SMCCC filtering is not available? That's how most things like kernel syscalls work - if they're not implemented they return -ENOSYS. glibc can detect that and use a fallback. Imagine what it would be like if the kernel provided userspace with a large bitmap of what syscalls were implemented... -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel