[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <998b90f4-1b04-72b0-7524-afe997db1b33@arm.com>
Date: Thu, 12 Oct 2023 10:45:57 +0100
From: James Clark <james.clark@....com>
To: Oliver Upton <oliver.upton@...ux.dev>
Cc: linux-arm-kernel@...ts.infradead.org,
linux-perf-users@...r.kernel.org, suzuki.poulose@....com,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Jonathan Corbet <corbet@....net>,
Russell King <linux@...linux.org.uk>,
Marc Zyngier <maz@...nel.org>,
James Morse <james.morse@....com>,
Zenghui Yu <yuzenghui@...wei.com>,
Mark Rutland <mark.rutland@....com>,
Zaid Al-Bassam <zalbassam@...gle.com>,
Reiji Watanabe <reijiw@...gle.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
kvmarm@...ts.linux.dev
Subject: Re: [PATCH v3 1/3] arm: perf: Include threshold control fields valid
in PMEVTYPER mask
On 11/10/2023 09:24, Oliver Upton wrote:
> Hi James,
>
> On Tue, Oct 10, 2023 at 03:15:41PM +0100, James Clark wrote:
>> FEAT_PMUv3_TH (Armv8.8) adds two new fields to PMEVTYPER, so include
>> them in the mask. These aren't writable on 32 bit kernels as they are in
>> the high part of the register, so split the mask definition to the asm
>> files for each platform.
>>
>> Now where the value is used in some parts of KVM, include the asm file.
>> There is no impact on guest PMUs emulated with KVM because the new
>> fields are ignored when constructing the attributes for opening the
>> event. But if threshold support is added to KVM at a later time no
>> change to the mask will be needed.
>
> KVM should treat TH and TC as RES0 if the feature isn't virtualized. I'd
Ok will keep that in mind for if we virtualize it in the future. It
looks like it will have to happen conditionally depending on the
presence of the feature. But it looks like your current patch has the
res0 fix for now.
> rather move KVM away from using ARMV8_PMU_EVTYPE_MASK in the first
> place. Looks like we already have an issue with the NSH bit, so I've
> sent the below patch to fix it.
>
> https://lore.kernel.org/kvmarm/20231011081649.3226792-3-oliver.upton@linux.dev/
>
Powered by blists - more mailing lists