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 E161CEB64DA for ; Wed, 19 Jul 2023 15:11:59 +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=ywg6veDqtU6nSEXX/10ATqPW5JRjJZ/lqN/cY9SBrAg=; b=KNtpvnImf1u+dq wgR+IlfX4k4tFAjIXfazUjXyB95dU3vlY9rtG4GtEKZM1T6hT5oeNXyt+W/fO6H57b0XO87FH7mvB 6TEAJZhNJcZGZ6gV5zsyZuqs8IJIYBgrT/lkoglPZDcUqOdGhWjSaOO4yUwM8Q9yqb0D7gpgwVGxp tcxJnwx9K16iwAl4QMQvR50mI1AWKJ7C81OlBlcN4iQQ3LgT6ICWaqshw1hSyFm72cofo+Rt/r7vX FKrm3VphTzy9QsPQzC2w+CP/rss7eN0FTiDZ7fVNR42iWsi4cfawDSjQucdzsmuiUKIxK9adIE2k1 FAmLl2u/mEwe8MF9YXJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qM8q4-007sqw-3D; Wed, 19 Jul 2023 15:11:41 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qM8q2-007sqC-1G for linux-arm-kernel@lists.infradead.org; Wed, 19 Jul 2023 15:11:39 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-977e0fbd742so935398066b.2 for ; Wed, 19 Jul 2023 08:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1689779496; x=1690384296; h=in-reply-to:content-disposition:mime-version:references:mutt-fcc :mutt-references:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=tc6TNjU8sKEl8KoZXByrQkbMRMaj4S512ngwkg6RDnA=; b=DGJYolI7hqSCrVAAcV5DqDY72P1x7OMD+3zL2ZdMnc/XHNXjNtFjfPzw2dWJlAnLyb vtT3Qfij55l8gwhWdX/p2KkLStoWUV1Qfa/U2oMl3QvDX+bqv2v4M6X7XDSvjA9Q0c51 MYwBA4nKrhNJ0nFqk3XtRxzOzrhou1DxUDTqIoYoKFMi2lXW/LJeg9CvC1nn1pTCMnSF +F79a+Zl0pHj1wJS/9jpaphg88Dfmw2BUEZEta3SbLKQZuoIvCDddm0Wr7LB5W+NkwtO 8qZ4+2PrRWRfS8rntCh7H8wDoHOar/iGV1oUsWQB8zkImzCxr1vu1nwh9Hr4cKS6wjlW Lc1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689779496; x=1690384296; h=in-reply-to:content-disposition:mime-version:references:mutt-fcc :mutt-references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tc6TNjU8sKEl8KoZXByrQkbMRMaj4S512ngwkg6RDnA=; b=cbOOPoLyXKKfKCdl1V8GBikG3hqObpqMsmkHUTgvfUKSQBzwfbM2E+jhT/pvUPkNSG zNbCls4yUyv1QoYDDaZcTv8MsK0Bw0d6MW7XqgMLAZfLFkNFWDSLbjyYq9iJIQgaq5Tp 9VT9c/hIUY470qIKfI+8q8d3XMCtw7SRnTF/1TY3S29PWjXMMOb0Kn8zf4ASLp4cZJAH CaewD3rwo+PQSjrhT6euN45o/jtXaTDTQ3P4InJIZ+zPlEkM/UnRfKmQTobSCGrFwG4d bmCsrr2+096Gk5izrnb0C9xIfVn3K1NolxPW+r+lyabAtXplStV7bCgj/vznzztFOLwd FNiA== X-Gm-Message-State: ABy/qLZr9LTNdgHgjhOk6vLv/BZ0G2XvI67rZBWxdFhGD1eZRuAtCxwd TgPoeS4Ev+29yESSHrNbKe7t/w== X-Google-Smtp-Source: APBJJlGtnjM/AskePid01OrC94hzJIcVL+Pn9VTqaPMiStoDxIoDIcZNUjWPHVF99j2682gua4MXmg== X-Received: by 2002:a17:907:7e87:b0:991:7874:ef71 with SMTP id qb7-20020a1709077e8700b009917874ef71mr2830086ejc.44.1689779495862; Wed, 19 Jul 2023 08:11:35 -0700 (PDT) Received: from localhost (2001-1ae9-1c2-4c00-748-2a9a-a2a6-1362.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:748:2a9a:a2a6:1362]) by smtp.gmail.com with ESMTPSA id k6-20020a170906680600b009890e402a6bsm2454800ejr.221.2023.07.19.08.11.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 08:11:34 -0700 (PDT) Date: Wed, 19 Jul 2023 17:11:33 +0200 From: Andrew Jones To: Joey Gouly Cc: linux-arm-kernel@lists.infradead.org, nd@arm.com, broonie@kernel.org, catalin.marinas@arm.com, james.morse@arm.com, mark.rutland@arm.com, maz@kernel.org, oliver.upton@linux.dev, shuah@kernel.org, suzuki.poulose@arm.com, will@kernel.org, yuzenghui@huawei.com, haibo1.xu@intel.com Subject: Re: [PATCH v4 20/20] KVM: selftests: get-reg-list: add Permission Indirection registers Message-ID: <20230712-e563781672725ca058131775@orel> Mutt-References: <20230712145917.GA3526439@e124191.cambridge.arm.com> Mutt-Fcc: =Ventana.Sent References: <20230606145859.697944-21-joey.gouly@arm.com> <20230703120344.14247-2-ajones@ventanamicro.com> <20230712145917.GA3526439@e124191.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230712145917.GA3526439@e124191.cambridge.arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230719_081138_436101_8072B784 X-CRM114-Status: GOOD ( 21.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 Wed, Jul 12, 2023 at 03:59:17PM +0100, Joey Gouly wrote: > On Mon, Jul 03, 2023 at 02:03:45PM +0200, Andrew Jones wrote: ... > > Any reason these registers needed to be added to the base reg set? Usually > > new registers get added to their own sublist, which then get tested by > > their own subtest. > > I added them to the base set because there is no feature/capability to enable PIE [1] (unlike SVE, PMU etc) > That means they have to be part of the base set, otherwise the test will complain about missing regs. > Hi Joey, Without the registers in a blessed list, then I wouldn't expect them to be reported as 'missing', but rather as 'new' (and only when running on a platform that supports them and with a recent enough KVM to have them exposed). There are two ways to approach registers like these: 1) the way this patch has done it, i.e. add the registers to the "base" list so they'll be expected by all subtests, ensuring they'll never appear as 'new', but then also avoid false-positive 'missing' failures by filtering them out of the missing list when necessary. 2) add the registers to subtests which only run when the registers should be present (skipping the tests when not) and then always filter the registers out of the 'new' list. (It's always safe to filter explicitly defined registers out of the new list since "new" means new to the selftest, but the selftest must be aware of those registers in order to explicitly filter them, which means they can't be new :-) To me, (2) is the cleaner approach, particularly because we've had subtest skipping support and 'new' register filtering support from nearly the beginning. riscv also has some nonconfigurable registers which are only present when the platform supports them. The riscv get-one-reg series[1] has taken approach (2) to handle those. At some point maybe we can consider converting the permission indirection registers to approach (2), but it's not critical to do anytime soon. So, for now, we'll rebase the riscv series in a way that preserves using approach (1) for aarch64, but also allows using approach (2) for riscv. [1] https://lore.kernel.org/all/cover.1688010022.git.haibo1.xu@intel.com/ Thanks, drew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel