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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60A4DC433F5 for ; Mon, 11 Oct 2021 10:59:53 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2ACFB60E9C for ; Mon, 11 Oct 2021 10:59:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2ACFB60E9C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=zSch+AjbbrPjmzkaOU2Qa2n4fB3UuHFIn3rs8V/rquM=; b=ecDedx1Tzym09/ w1rGnlGuToWAtHiRbuh1JHSEO/uGYirk+KQgWgeJaFhBWZF/r1m5/W42DjReewA61ES2ZRHXL2FGb gCZeQC0qoEEbuVTAKshjwD4Glp6jMysBiJnZZaipmw6qbqmU+C1sZSyrCuTjqsyRD7vn0Ca2PniSJ ExjLsO9kQllWQWw4fjbXotKBn4V+2GDAzdoL01UBwFNZiTk+rxic9WwidpnD6RPs1z+3KlniZmWIu DUvLREhum7kn4svfYc9+gj1tvrY+9t/rApnPHkrsko8iHUCYQNs9FiLdQdkOo6BFhw4mRRrWQ5638 vWXKDrvSyztXOsb8qsQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZt0e-008wVd-TF; Mon, 11 Oct 2021 10:58:21 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZszp-008w94-M5 for linux-arm-kernel@lists.infradead.org; Mon, 11 Oct 2021 10:57:30 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 444FC60C4B; Mon, 11 Oct 2021 10:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633949849; bh=4jS2QPRvzH9RrfAz5oqSi9tOcaS1TuR2bV3piY9c8m0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Igkm2ieeGRnPND9iBGxamkcNus8kaglYp2e8Ki/kRtIJU5ACEejUKn3g8lrizs7/d Ce5+vEiU2zBnqeBj5wpt4GpEwaBwD5bj/3c0HyhmPubYMFjrax+6DBCMZqh2+NbTuZ WQ8ji+/Q39P2fyLJQdxyOzkUU/v8YzyTTk4HDGwT8deelMd84bm+v+2yzTrYqleZWr 6+cZItLL57RaGBbx+/qvQ3UKYkJFNbQVdkoN7/N6i89i6VX39RIWfeM8yZ3SH6rB3U TgitUiwcJPxkKlMow8c723/x1Ah+XQ1HS1pnkp+buN1pHYOkJtfTa+00a9/K+aDP2M R6eYZFcGBx1Mw== Date: Mon, 11 Oct 2021 11:57:24 +0100 From: Will Deacon To: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland , Daniel Lezcano , Thomas Gleixner , Peter Shier , Raghavendra Rao Ananta , Ricardo Koller , Oliver Upton , Catalin Marinas , Linus Walleij , kernel-team@android.com Subject: Re: [PATCH v3 14/17] arm64: Add a capability for FEAT_ECV Message-ID: <20211011105723.GC4009@willie-the-truck> References: <20211010114306.2910453-1-maz@kernel.org> <20211010114306.2910453-15-maz@kernel.org> <20211011105629.GB4009@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211011105629.GB4009@willie-the-truck> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211011_035729_772048_C0B03A18 X-CRM114-Status: GOOD ( 17.58 ) 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 Mon, Oct 11, 2021 at 11:56:29AM +0100, Will Deacon wrote: > On Sun, Oct 10, 2021 at 12:43:03PM +0100, Marc Zyngier wrote: > > Add a new capability to detect the Enhanced Counter Virtualization > > feature (FEAT_ECV). > > > > Reviewed-by: Oliver Upton > > Signed-off-by: Marc Zyngier > > --- > > arch/arm64/kernel/cpufeature.c | 10 ++++++++++ > > arch/arm64/tools/cpucaps | 1 + > > 2 files changed, 11 insertions(+) > > > > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > > index f8a3067d10c6..26b11ce8fff6 100644 > > --- a/arch/arm64/kernel/cpufeature.c > > +++ b/arch/arm64/kernel/cpufeature.c > > @@ -1926,6 +1926,16 @@ static const struct arm64_cpu_capabilities arm64_features[] = { > > .sign = FTR_UNSIGNED, > > .min_field_value = 1, > > }, > > + { > > + .desc = "Enhanced Counter Virtualization", > > + .capability = ARM64_HAS_ECV, > > + .type = ARM64_CPUCAP_SYSTEM_FEATURE, > > + .matches = has_cpuid_feature, > > + .sys_reg = SYS_ID_AA64MMFR0_EL1, > > + .field_pos = ID_AA64MMFR0_ECV_SHIFT, > > + .sign = FTR_UNSIGNED, > > + .min_field_value = 1, > > + }, > > #ifdef CONFIG_ARM64_PAN > > { > > .desc = "Privileged Access Never", > > diff --git a/arch/arm64/tools/cpucaps b/arch/arm64/tools/cpucaps > > index 49305c2e6dfd..7a7c58acd8f0 100644 > > --- a/arch/arm64/tools/cpucaps > > +++ b/arch/arm64/tools/cpucaps > > @@ -18,6 +18,7 @@ HAS_CRC32 > > HAS_DCPODP > > HAS_DCPOP > > HAS_E0PD > > +HAS_ECV > > HAS_EPAN > > HAS_GENERIC_AUTH > > HAS_GENERIC_AUTH_ARCH > > We should also make the ECV field FTR_VISIBLE. ... like you do in the last patch! So: Acked-by: Will Deacon for this one. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel