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 45BD4C001B0 for ; Mon, 3 Jul 2023 12:04:30 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZLuD+HgW+dyuYR2y19/rDnkKE0PRD9SUov/mXcflPZM=; b=abDgK8r1vVoFSU 8ni1V73MraY69FbZHSU5aeZq1rEcO7mi/KD7PYBGdhMzuHLVXd2dTKHdkyxbCWMZ6oxAE2v8oZcKa //A2rJk46GbguIf9mX9yb2xoazahQqzV0+fWLhHWOsbMUCedmoaSMGcsyNGgwiKjg6FAmYwR4xu6e jWizqGm+aH98nZqPeYbkekbUoX/gKXeuEtYfEwQgyiHdlITkQMG8EPbQyjjR7Xtt15L1BIWVi8HOd Rb1YZIhU0TPDWYmRUJnTAlcpKdMwf017+if7qOufCPFYc7X2sBQocwOxVf5ExoTLHXQ8mCAjjV8sn 97263/I99AXroGqXbGMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qGIHb-00AR4U-2c; Mon, 03 Jul 2023 12:03:55 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qGIHY-00AR3d-2b for linux-arm-kernel@lists.infradead.org; Mon, 03 Jul 2023 12:03:54 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9923833737eso371017966b.3 for ; Mon, 03 Jul 2023 05:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1688385828; x=1690977828; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gPrtS298QwV3ghNrMCFYIgVPajJonmXiZ5+a1Isd5aQ=; b=cyni03LnELgK/SGj236jyIP3C6odzgWZUWELmpp61Q4XTzed+1TbfvWOUS1tmGuAjd tHTPKJt2QSPGe31yoHEy9y39VNWYQ/mbxgW9TQHnCPJsQ6SMmu80lMonH2UhWb9kVV3X AAcxQP/gFWC08wNU6L+3DMYxusRTCd8bteqk2WbzeLGnkiAZNFNtMgVzXtzXcy3QKHXU o3rl96jqY9oCT9st/wMK8nYbrrb3AHd/61M5OITZtp1lrhYssgm/Cb+yctuK5RFEdnDL f0XIkZZRS1sdsZfWoaHVtZ4Tdpz1Vl/wWTJv5odc49X2ay7AilXshD/RSThAfPIqzuXx sNtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688385828; x=1690977828; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gPrtS298QwV3ghNrMCFYIgVPajJonmXiZ5+a1Isd5aQ=; b=djkiTs2JNCasYl/rkYJyX/zBuYB+bjqnzy0sZFLJHT7QQmfKJ2Fg95D8EsxKutTXIU UYhQbA4BCUkIzlTvOf9GgbaESiy3F80ME7/k4htv9GMlbTWCdnj/8RKNFrEjbuQxh99i dn9r4DGttKJi6jYAEIvCFs0/dmQVar0oBVjLkhO1K6PhBeo30kUDOKPrFJppp+zdI7+A IgbtQLSs/LZVUgsUQfyC0a4FDZJMSX6TaFJrSUQAPeZdElMjxBLdESDO5jkkmjBVcnCt q9kO4n7yYlJ5dz/BJrgBnfEdvUf1Z6agnvuua49oA3JoCEhKtD4fOi4kF5+YUMPFYPP1 hktw== X-Gm-Message-State: ABy/qLabSBv7oPOQ+8Kyfx2nllYbm0YA3x+PgILbcVVBumidYiZiDEWG 0tm2gvmj6Btt4bpKXbynNyRpLA== X-Google-Smtp-Source: APBJJlGbi1G7tavKxn2+rkia6/Qbr/eCefncprBDtFreWnmOOOwmYZkaYExpI4sQ7hLnuAZ/QgUHAw== X-Received: by 2002:a17:906:c354:b0:98f:5640:16a with SMTP id ci20-20020a170906c35400b0098f5640016amr7104865ejb.53.1688385827806; Mon, 03 Jul 2023 05:03:47 -0700 (PDT) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id o18-20020a170906289200b00982b204678fsm11836812ejd.207.2023.07.03.05.03.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 05:03:46 -0700 (PDT) From: Andrew Jones To: joey.gouly@arm.com 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 Subject: Re: [PATCH v4 20/20] KVM: selftests: get-reg-list: add Permission Indirection registers Date: Mon, 3 Jul 2023 14:03:45 +0200 Message-ID: <20230703120344.14247-2-ajones@ventanamicro.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230606145859.697944-21-joey.gouly@arm.com> References: <20230606145859.697944-21-joey.gouly@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230703_050352_853935_1890F934 X-CRM114-Status: GOOD ( 17.28 ) 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 > Add new system registers: > - ID_AA64MMFR3_EL1 > - TCR2_EL1 > - PIRE0_EL1 > - PIR_EL1 > > Signed-off-by: Joey Gouly > Cc: Marc Zyngier > Cc: Oliver Upton > Cc: Mark Brown > Cc: Shuah Khan > Acked-by: Catalin Marinas > --- > .../selftests/kvm/aarch64/get-reg-list.c | 21 +++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/tools/testing/selftests/kvm/aarch64/get-reg-list.c b/tools/testing/selftests/kvm/aarch64/get-reg-list.c > index 3ab236ceb6fc..4f10055af2aa 100644 > --- a/tools/testing/selftests/kvm/aarch64/get-reg-list.c > +++ b/tools/testing/selftests/kvm/aarch64/get-reg-list.c > @@ -56,6 +56,24 @@ struct feature_id_reg { > }; > > static struct feature_id_reg feat_id_regs[] = { > + { > + ARM64_SYS_REG(3, 0, 2, 0, 3), /* TCR2_EL1 */ > + ARM64_SYS_REG(3, 0, 0, 7, 3), /* ID_AA64MMFR3_EL1 */ > + 0, > + 1 > + }, > + { > + ARM64_SYS_REG(3, 0, 10, 2, 2), /* PIRE0_EL1 */ > + ARM64_SYS_REG(3, 0, 0, 7, 3), /* ID_AA64MMFR3_EL1 */ > + 4, > + 1 > + }, > + { > + ARM64_SYS_REG(3, 0, 10, 2, 3), /* PIR_EL1 */ > + ARM64_SYS_REG(3, 0, 0, 7, 3), /* ID_AA64MMFR3_EL1 */ > + 4, > + 1 > + } > }; > > struct vcpu_config { > @@ -873,12 +891,15 @@ static __u64 base_regs[] = { > ARM64_SYS_REG(3, 0, 2, 0, 0), /* TTBR0_EL1 */ > ARM64_SYS_REG(3, 0, 2, 0, 1), /* TTBR1_EL1 */ > ARM64_SYS_REG(3, 0, 2, 0, 2), /* TCR_EL1 */ > + ARM64_SYS_REG(3, 0, 2, 0, 3), /* TCR2_EL1 */ > ARM64_SYS_REG(3, 0, 5, 1, 0), /* AFSR0_EL1 */ > ARM64_SYS_REG(3, 0, 5, 1, 1), /* AFSR1_EL1 */ > ARM64_SYS_REG(3, 0, 5, 2, 0), /* ESR_EL1 */ > ARM64_SYS_REG(3, 0, 6, 0, 0), /* FAR_EL1 */ > ARM64_SYS_REG(3, 0, 7, 4, 0), /* PAR_EL1 */ > ARM64_SYS_REG(3, 0, 10, 2, 0), /* MAIR_EL1 */ > + ARM64_SYS_REG(3, 0, 10, 2, 2), /* PIRE0_EL1 */ > + ARM64_SYS_REG(3, 0, 10, 2, 3), /* PIR_EL1 */ Hi Joey, 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. That way the subtest can SKIP when the new registers aren't present. That approach should avoid the need for modifying for_each_missing_reg() (well, after changing the call of check_supported() to be after configuring the vcpu, in order to pass the vcpu to it, and after extending check_supported() to call check_supported_feat_reg()). Thanks, drew > ARM64_SYS_REG(3, 0, 10, 3, 0), /* AMAIR_EL1 */ > ARM64_SYS_REG(3, 0, 12, 0, 0), /* VBAR_EL1 */ > ARM64_SYS_REG(3, 0, 12, 1, 1), /* DISR_EL1 */ > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel