Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp34349rdb; Thu, 16 Nov 2023 11:07:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEV2sRJQ3Krp/1b2gIAeYfcFOjVYDLhJAHILjAkNQoKCiXrRD3Nj7mbgY3n2QnZUB0fETB2 X-Received: by 2002:a17:90b:4ad0:b0:283:27e0:654b with SMTP id mh16-20020a17090b4ad000b0028327e0654bmr17006760pjb.3.1700161620039; Thu, 16 Nov 2023 11:07:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700161620; cv=none; d=google.com; s=arc-20160816; b=dbNX6RHeRez5cxQi5KbOWHiG/nuGBxUlJ08otcVxNnQiyl/1Appt6fjXtCGodmbGbg /Wg5OAbp9/sOg5KOpzhBh7RNKBNRO/u+OPs9aMrq8RzmaifIm+/hDl+Ks7fg/nofiGtz jeYiaG6J8sSb4ryFhSphyoinTRZwRFkXVzsX3rqovSNb0z8P4IDTzqHB+bI0HUX7dtdA bJrtoBsDnkTkVVQvxSHSC975++0aiwf5pwGucPWciRIXVzYVTpcgFsKcHxxfCyth6bu4 +tdwj43GN0xeJqLNZeN4grznZDn+E10c7PtnMup+6AoJHJe874aZNnR1EHeSngetTbU3 eTbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=uryGSx2r+KBBKtYnZwparRWHnho2ggpLtpZaQHsRXRw=; fh=McEOdxaGKvZUMyGpVFbGAkvzHKYFDmRxneaw75ki3PU=; b=IndvEmMa+Rra6zIfj7pLv4dReddJCBqo2EeKhYOnstU/q4WfuwtxlgOrTsvLVC9VKM /gqA5eZaHF7GCXIVbSqjx9HXkQ65o5TpmEawUCuoLh6CA+CHLY1fogul2tg4aCLEIgt6 P1UsrBxGmcvecW8PRxtMVhvgAGQON5LsVO/6S4yiambTrxvrKJj3DL9KOFxWfuIkT26J L7Ncq56U11FdSAXFXMxapgx9RO02jtHlV5etOuiEUaS4nXTameewJGIrHm27qfPZaHmn iy11aVZh9HlkQeO4fx7UC8wMnqr5cZMqrn7dE/pNdPETPS4xxjqcni54Z2U/Kj5ft/Pj t2rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=lRkle9xw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id gv22-20020a17090b11d600b00283204634bcsi130304pjb.73.2023.11.16.11.06.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 11:07:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=lRkle9xw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D5D0A825EDAE; Thu, 16 Nov 2023 11:06:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229552AbjKPTGq (ORCPT + 99 others); Thu, 16 Nov 2023 14:06:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjKPTGp (ORCPT ); Thu, 16 Nov 2023 14:06:45 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0843182 for ; Thu, 16 Nov 2023 11:06:40 -0800 (PST) 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231116114152.912344-1-jianyong.wu@arm.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 16 Nov 2023 11:06:57 -0800 (PST) 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!