Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2370445iob; Fri, 6 May 2022 00:48:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBTA5L5/Kt20kGLIdDm8FSNEX++BPL4/6ljp0VYMLB1yfwypU8fyvRDPM6SliIS9QvojMF X-Received: by 2002:a05:6402:1f0b:b0:427:b390:2020 with SMTP id b11-20020a0564021f0b00b00427b3902020mr2187557edb.70.1651823296164; Fri, 06 May 2022 00:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651823296; cv=none; d=google.com; s=arc-20160816; b=lFGXZjwlLb8vVrU0BZrps/wSOFkFuLfOwVwtICJJg0iKM83mUvN1s18AOG+a53NQrA qWbKrIjSxEKRcOl11vQ5PzK8Sj7NWKBDmcEkv9IWAgkN6EVVi7MfY+uLLp4KRBqDxfEZ EqPMIiQ4KrgHWvC83jDoNj2yum4Z24oEifMYgIA3wdj/tx/0Yz2Y6bVByvCwWL9kDuWb u3tUlH5E3HDzwMR3mNNJzKgMdfgrc/kzmbRx4OEJz6fQ75xQJTSCsF5oIqR5Mhh98Oro aaURBM16L8dFjHIe46RGNndvfaahgJRWv1U6YtPeTUOEOFLd9FlueWYJ3ls4lMhClgUR gpLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GsfXoNKONKDKWhJHjg7OT8XgANJP2e9G7Mc1nVY0AYE=; b=s9lUP07JRdfWprWsWLhSMG0rx2T4d+7AG1+6/mXLdubYeFhYz2J7+dQFh27k5oRSh/ m3MQYrS9bWsKrlnQBNyRD3AgX6J+RfgZSBZKVEPq7d1/I7/e3qSTEI+l9Bavv+G6PLAT lYQeHaihE7puKy6bl4Ra2X4sgaDWpqs74637+Bz3eOgEkdabe4FRl1TyGQBn2xhxDaMz AfLXWWEfeQLX0a8WV57QhJdYS2wp7mqZBoqKti3n4KHUs09flrzGVOqWFS0XkI6SBZyT aCc5mQZ0/6Wu2udNbl01Y3/o16N1I1PR7EuDks5wT3aYfOO4MxsbOTA3XfYmWuObwcEw aIlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Aq1U8sdb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id si7-20020a170906cec700b006e0d79ad8bdsi4370209ejb.307.2022.05.06.00.47.52; Fri, 06 May 2022 00:48:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Aq1U8sdb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356730AbiEDUCt (ORCPT + 99 others); Wed, 4 May 2022 16:02:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344279AbiEDUCl (ORCPT ); Wed, 4 May 2022 16:02:41 -0400 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D486E4EDF9 for ; Wed, 4 May 2022 12:58:47 -0700 (PDT) Received: by mail-il1-x12f.google.com with SMTP id s14so1549449ild.6 for ; Wed, 04 May 2022 12:58:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=GsfXoNKONKDKWhJHjg7OT8XgANJP2e9G7Mc1nVY0AYE=; b=Aq1U8sdb7NiZVJWC4vUlChWXOfRbCGaFNjbSpc0WleExMf0SKkQUNrsAlYXljTlC8V kIwakMFlClmc4+G6Yl7CQ/45/9xgObIBveZ7BjUWWP3+FAaW4C1aJyJALPCVD9lXJc+x YJ++0U3IX23F9PeoHw9+6HPC3HlHHljxhgJrbOn5aAgZau7Q6TShdWIkw27qEr4r1db0 ySclaROjZ8pxDb8YfChQRlCjxbFar+IhUVYKk3BD08+hVk5gdraFe163Ypca8nO0QyxZ DsoFqtJh0sAijvTR6s7QSXKCKou0s4gdKPXNW/z/rGUII4CS32K7EojcLfa8YVJI1oAs x6EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GsfXoNKONKDKWhJHjg7OT8XgANJP2e9G7Mc1nVY0AYE=; b=ei288ihuNeuAzC40R+9WoJ+AheSl7/15sjglZ9VnFMIwJSISz0LcjzBfWoCZoaIYEV bqtkvVJWQJF0V3Dm791e8CrY6CTRfW3W/dOHXcbW/kNB7hhnxfHKGfLhqYTLmAX8N2O7 S1lzHOD5J0ahDyM9wgAB99lDKHM8lZyiqZASgTTMhlGXtxuckZqNAo1zjDx8+Bw+0TM2 OICRgWictwA7reVZ+aaTDsDPOh7OkmPnmEuL4uKnxSL5zOcZRplN8lwzz7p4MqeaO8f1 HZtRQJ4hXzUs9Kok2VThZx0WG+J4pzjCZNvue6ZEq1w5YYZMh/OnRR+eF5wor3De2u7e nqSQ== X-Gm-Message-State: AOAM530b4rkbnjXULL0oGxMDwNpARzACaVkGyf9qWi3SEdz4VlRp0ikc 2XabiYuKekjKvxF91Bh4lmGWpQ== X-Received: by 2002:a05:6e02:164f:b0:2cf:3244:665d with SMTP id v15-20020a056e02164f00b002cf3244665dmr4183126ilu.170.1651694326903; Wed, 04 May 2022 12:58:46 -0700 (PDT) Received: from google.com (194.225.68.34.bc.googleusercontent.com. [34.68.225.194]) by smtp.gmail.com with ESMTPSA id t13-20020a02ccad000000b0032b3a7817afsm4928792jap.115.2022.05.04.12.58.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 12:58:46 -0700 (PDT) Date: Wed, 4 May 2022 19:58:42 +0000 From: Oliver Upton To: Raghavendra Rao Ananta Cc: Marc Zyngier , Andrew Jones , James Morse , Alexandru Elisei , Suzuki K Poulose , Paolo Bonzini , Catalin Marinas , Will Deacon , Peter Shier , Ricardo Koller , Reiji Watanabe , Jing Zhang , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH] selftests: KVM: aarch64: Let hypercalls use UAPI *_BIT_COUNT Message-ID: References: <20220504184415.1905224-1-rananta@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220504184415.1905224-1-rananta@google.com> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Raghavendra, On Wed, May 04, 2022 at 06:44:15PM +0000, Raghavendra Rao Ananta wrote: > The hypercalls test currently defines its own *_BMAP_BIT_MAX macros to > define the last valid feature bit for each bitmap firmware register. > However, since these definitions are already present in the uapi header, > kvm.h, as *_BMAP_BIT_COUNT, and would help to keep the test updated as > features grow, use these instead. LOL, looks like I lost that one in the end! Still, the fact that you're patching the selftest highlights the fact that there is a nonzero chance of userspace using this value incorrectly expecting it to hold true across all kernels. Since this is the route going forward can we please consider documenting the fact that _BIT_COUNT *will* change and is not stable between kernel versions. Bad UAPI expectations could throw a wrench into this entire plan we've hatched for preserving hypercall ABI. Just a warning at the end of the register documentation would suffice. > No functional change intended. > > Signed-off-by: Raghavendra Rao Ananta Besides considering the above hazard: Reviewed-by: Oliver Upton