mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Auger <eric.auger@redhat.com>
To: eric.auger.pro@gmail.com, eric.auger@redhat.com, maz@kernel.org,
	linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu
Cc: andrew.murray@arm.com
Subject: [PATCH 0/4] KVM/ARM: Misc PMU fixes
Date: Fri, 24 Jan 2020 15:25:31 +0100	[thread overview]
Message-ID: <20200124142535.29386-1-eric.auger@redhat.com> (raw)

While writing new PMUv3 event counter kvm-unit-tests I found
some bugs related to the chained counter implementation:

- the enable state of the high counter is not taken into account,
- chain counters are not implemented along with SW_INCR type,
- SW_INCR does not take into account the global enable state

The last patch rather is an optimization that avoids manipulating
non supported counters.

Best Regards

Eric

This series can be found at:
https://github.com/eauger/linux/tree/v5.5-rc7-pmu-fixes-v1

Test:
Tested with kvm-unit-tests [1]: all tests now pass,
at the exception of one sub-test in pmu-chain-promotion
but this is a bug in test.

Other testing at higher level (perf) appreciated.

references:
[1] KVM: arm64: PMUv3 Event Counter Tests
(https://lore.kernel.org/kvmarm/c1831b6c-dc75-1bd3-6657-0375682c30af@redhat.com/T/)

History:

RFC -> v1:
- remove  [RFC 3/3] KVM: arm64: pmu: Enforce PMEVTYPER evtCount size
- add KVM: arm64: pmu: Only handle supported event counters
- Take into account the enable state of the CHAIN high counter
- revisit kvm_pmu_software_increment() implementation as suggested
  by Marc


Eric Auger (4):
  KVM: arm64: pmu: Don't increment SW_INCR if PMCR.E is unset
  KVM: arm64: pmu: Don't mark a counter as chained if the odd one is
    disabled
  KVM: arm64: pmu: Fix chained SW_INCR counters
  KVM: arm64: pmu: Only handle supported event counters

 virt/kvm/arm/pmu.c | 114 +++++++++++++++++++++++++++------------------
 1 file changed, 69 insertions(+), 45 deletions(-)

-- 
2.20.1


             reply	other threads:[~2020-01-24 14:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24 14:25 Eric Auger [this message]
2020-01-24 14:25 ` [PATCH 1/4] KVM: arm64: pmu: Don't increment SW_INCR if PMCR.E is unset Eric Auger
2020-01-24 14:25 ` [PATCH 2/4] KVM: arm64: pmu: Don't mark a counter as chained if the odd one is disabled Eric Auger
2020-01-24 14:25 ` [PATCH 3/4] KVM: arm64: pmu: Fix chained SW_INCR counters Eric Auger
2020-01-24 14:25 ` [PATCH 4/4] KVM: arm64: pmu: Only handle supported event counters Eric Auger

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=20200124142535.29386-1-eric.auger@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=andrew.murray@arm.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    /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®