mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Clark <james.clark@arm.com>
To: Oliver Upton <oliver.upton@linux.dev>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-perf-users@vger.kernel.org, suzuki.poulose@arm.com,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	Russell King <linux@armlinux.org.uk>,
	Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Zaid Al-Bassam <zalbassam@google.com>,
	Reiji Watanabe <reijiw@google.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	kvmarm@lists.linux.dev
Subject: Re: [PATCH v3 1/3] arm: perf: Include threshold control fields valid in PMEVTYPER mask
Date: Thu, 12 Oct 2023 10:45:57 +0100	[thread overview]
Message-ID: <998b90f4-1b04-72b0-7524-afe997db1b33@arm.com> (raw)
In-Reply-To: <ZSZb2H8O5fuU3UrA@linux.dev>



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/
> 



  reply	other threads:[~2023-10-12  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 14:15 [PATCH v3 0/3] arm64: perf: Add support for event counting threshold James Clark
2023-10-10 14:15 ` [PATCH v3 1/3] arm: perf: Include threshold control fields valid in PMEVTYPER mask James Clark
2023-10-11  8:24   ` Oliver Upton
2023-10-12  9:45     ` James Clark [this message]
2023-10-10 14:15 ` [PATCH v3 2/3] arm64: perf: Add support for event counting threshold James Clark
2023-10-10 14:15 ` [PATCH v3 3/3] Documentation: arm64: Document the PMU event counting threshold feature James Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=998b90f4-1b04-72b0-7524-afe997db1b33@arm.com \
    --to=james.clark@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=geert+renesas@glider.be \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=reijiw@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    --cc=zalbassam@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®