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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E34BC433F5 for ; Wed, 4 May 2022 19:58:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 99B9C49EDE; Wed, 4 May 2022 15:58:50 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1q7P+4XL4ynB; Wed, 4 May 2022 15:58:49 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 9605A4B11C; Wed, 4 May 2022 15:58:49 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E96684B091 for ; Wed, 4 May 2022 15:58:48 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5lKpYHVLVfhQ for ; Wed, 4 May 2022 15:58:48 -0400 (EDT) Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id F3B9E4B08A for ; Wed, 4 May 2022 15:58:47 -0400 (EDT) Received: by mail-il1-f170.google.com with SMTP id z12so1552141ilp.8 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=KOFXLxtdmIh80knXwah4DuPx2w8Hi9f2M3YIbOJD/GYVjB/ICTDhjqDTR/OG82U6g8 nZJH4BYRIWiOeITP9DgorZtJ/3J2zxgVRxNXLfWLTGRe/TMB89ojpzasEI3+xdn8q3hr CaBrHFVTOMqelEMmyjuB88B5KN2SFmgjZy1FC2BShrq4VXJ5MMRLmNwnVjVdkHHXZesI RkI6TCgwqonvdugjXJEgK/nvECT9iEWXFuQg6rNjHapQevHKCTSjQxq/FAVtHRgOG26l ZQAxAghCjnMgF2utubpXdHsEnBckJvDQepFsNpMhMHxLQit9z3CbzDbOn+2wmU/58CwH iR1Q== X-Gm-Message-State: AOAM532e1/56o/264VmBRN32VKxIOTfWqCYcjdJ656ZwOekaCYHEkYLu tgENA+ooS7Aw6VXGJracrsK4YQ== X-Google-Smtp-Source: ABdhPJy5Bzj+uvdC2D+9IucvrmZ0XZi+3AvPJbXcQc72eVCSrPti9fdcCscTtD01OvFKOzl/PHzgiQ== 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 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-Disposition: inline In-Reply-To: <20220504184415.1905224-1-rananta@google.com> Cc: kvm@vger.kernel.org, Will Deacon , Marc Zyngier , Peter Shier , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Catalin Marinas , Paolo Bonzini , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01A34C433F5 for ; Wed, 4 May 2022 19:59:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356211AbiEDUCn (ORCPT ); Wed, 4 May 2022 16:02:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377838AbiEDUCa (ORCPT ); Wed, 4 May 2022 16:02:30 -0400 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7CD74EDFC for ; Wed, 4 May 2022 12:58:47 -0700 (PDT) Received: by mail-il1-x134.google.com with SMTP id y11so1559529ilp.4 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=QS9a2/JiPFZiBWcLxx4RpLI4I1DAVl7O/UPkrz8IOcnps2pq3GJv+WbCSmYT6tPDGy KwileYaCl/2R6lxZnuFvqEceHjw9/e/hnTAsgdN4wKM2whONvIYLZjz6Y0evE44OBhZi S9Od/XACzyN5lSaTNFnvp+FfcdodWD4Xq/BdfI6jBaudmlvH4j18Ux26JrPGzVzG+BD2 pk00Z3l4WSPBjz+5zGh/iGftsOPfbRGdQgXVK7rQK9IHt+SaaS/tjRTL3YaEmmjeWjgw Oj4H3kYTEJdMjFphNpQ6puLmp46pVf6t5YCS7UbXuyj12b1Gl/rP8nQVkGqpmeHoH31K 6NVg== X-Gm-Message-State: AOAM531+1bU95g0176BZc1Oo97P0LK/71afXb6bDYOo9DhHVsCCMpfOP x9o7KR03Xi6VQ1mv5scQvmEIiQ== X-Google-Smtp-Source: ABdhPJy5Bzj+uvdC2D+9IucvrmZ0XZi+3AvPJbXcQc72eVCSrPti9fdcCscTtD01OvFKOzl/PHzgiQ== 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> Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@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 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 BBB0FC433EF for ; Wed, 4 May 2022 20:00:01 +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=2ujmD4cW9W5yZjvFJsiSjx8sTjo7wsgyjFHyLsfJrmk=; b=SYlSCM4GUDPP0Y 4yT1iMTGKv3yxhN+iu5pUkGIGsqa39Kg1lW+JSwmXN6f123kqct9KBaseEdzsmQuTVgMvf/g47VPM ptfZZ30oDc7BgkYD1UTTVAWcu9/R7HNOg8+RXHNmGTy5bqf8QItK7AsK+TlgE9PFTD+YYoYho5UdZ IiqO7P9bFWGqoDVZjC9MEgY55NNdJhWXt9yWFKUM5tXH+Upydpgidrubgdj5evMBTYlg0xOWpq44h ruSTZpVjSPmiJiqu4bQANWuqvZMf2tKrs9rE9LiUVd8PjK7wBXLdOm7dxqAWes8YArrv6j6LkT8lA UCrKTTELvOfroAw6mNSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmL9J-00CSP2-5q; Wed, 04 May 2022 19:59:01 +0000 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmL96-00CSIm-N3 for linux-arm-kernel@lists.infradead.org; Wed, 04 May 2022 19:58:50 +0000 Received: by mail-il1-x12c.google.com with SMTP id o5so1541425ils.11 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=zsX6WrPM9whcXrMe2IX64dlQEXpS6LxQWnJKwK9kwQKxukOhQM4JpE3EDPIgxEa73c djEXo3jWq2A3rbtm1vewrTDpU1scvgqNdWrBfCLhQRbl7MlJpcvWT9aCPgRTBdzAzvfr jtXM3PwivlXdUO5M2uL7DYwpeNOwgAIJIpu47HfUSR0/7T4SNjeo0CXprt5MQVUsG3pN OQfsxMDwd64/uSD8QI/2n48m5aJ0YqDeSihJQBoXJSzq6Edx5mZAt7tWiZP6PrIKRlBY 1obSPphZN3SQqF1ceEY96k5T8F3zrWLKmsL+9ji6WYiJ7HEy1wuTXjewnWJfcJUhREJ4 dT1A== X-Gm-Message-State: AOAM533mwXo6PDGmel/EozUN5jU9QLu53Nco/piW77H1RXroNZ2o8pmG gcyT9f/kIvGTZhEUVChxSBrxjg== X-Google-Smtp-Source: ABdhPJy5Bzj+uvdC2D+9IucvrmZ0XZi+3AvPJbXcQc72eVCSrPti9fdcCscTtD01OvFKOzl/PHzgiQ== 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-Disposition: inline In-Reply-To: <20220504184415.1905224-1-rananta@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220504_125848_797991_AD8921EE X-CRM114-Status: GOOD ( 13.39 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel