All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Wei Huang <wei@redhat.com>
Cc: kvm@vger.kernel.org, marc.zyngier@arm.com,
	catalin.marinas@arm.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, shannon.zhao@linaro.org
Subject: Re: [PATCH v3 1/1] KVM: ARM64: Fix the issues when guest PMCCFILTR is configured
Date: Thu, 17 Nov 2016 13:30:39 +0000	[thread overview]
Message-ID: <20161117133039.GH22855@arm.com> (raw)
In-Reply-To: <1479316160-8567-1-git-send-email-wei@redhat.com>

On Wed, Nov 16, 2016 at 11:09:20AM -0600, Wei Huang wrote:
> KVM calls kvm_pmu_set_counter_event_type() when PMCCFILTR is configured.
> But this function can't deals with PMCCFILTR correctly because the evtCount
> bits of PMCCFILTR, which is reserved 0, conflits with the SW_INCR event
> type of other PMXEVTYPER<n> registers. To fix it, when eventsel == 0, this
> function shouldn't return immediately; instead it needs to check further
> if select_idx is ARMV8_PMU_CYCLE_IDX.
> 
> Another issue is that KVM shouldn't copy the eventsel bits of PMCCFILTER
> blindly to attr.config. Instead it ought to convert the request to the
> "cpu cycle" event type (i.e. 0x11).
> 
> To support this patch and to prevent duplicated definitions, a limited
> set of ARMv8 perf event types were relocated from perf_event.c to
> asm/perf_event.h.
> 
> Signed-off-by: Wei Huang <wei@redhat.com>
> ---
>  arch/arm64/include/asm/perf_event.h | 10 +++++++++-
>  arch/arm64/kernel/perf_event.c      | 10 +---------
>  virt/kvm/arm/pmu.c                  |  8 +++++---
>  3 files changed, 15 insertions(+), 13 deletions(-)

Acked-by: Will Deacon <will.deacon@arm.com>

I'm assuming this will go via kvm-arm.

Will

WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/1] KVM: ARM64: Fix the issues when guest PMCCFILTR is configured
Date: Thu, 17 Nov 2016 13:30:39 +0000	[thread overview]
Message-ID: <20161117133039.GH22855@arm.com> (raw)
In-Reply-To: <1479316160-8567-1-git-send-email-wei@redhat.com>

On Wed, Nov 16, 2016 at 11:09:20AM -0600, Wei Huang wrote:
> KVM calls kvm_pmu_set_counter_event_type() when PMCCFILTR is configured.
> But this function can't deals with PMCCFILTR correctly because the evtCount
> bits of PMCCFILTR, which is reserved 0, conflits with the SW_INCR event
> type of other PMXEVTYPER<n> registers. To fix it, when eventsel == 0, this
> function shouldn't return immediately; instead it needs to check further
> if select_idx is ARMV8_PMU_CYCLE_IDX.
> 
> Another issue is that KVM shouldn't copy the eventsel bits of PMCCFILTER
> blindly to attr.config. Instead it ought to convert the request to the
> "cpu cycle" event type (i.e. 0x11).
> 
> To support this patch and to prevent duplicated definitions, a limited
> set of ARMv8 perf event types were relocated from perf_event.c to
> asm/perf_event.h.
> 
> Signed-off-by: Wei Huang <wei@redhat.com>
> ---
>  arch/arm64/include/asm/perf_event.h | 10 +++++++++-
>  arch/arm64/kernel/perf_event.c      | 10 +---------
>  virt/kvm/arm/pmu.c                  |  8 +++++---
>  3 files changed, 15 insertions(+), 13 deletions(-)

Acked-by: Will Deacon <will.deacon@arm.com>

I'm assuming this will go via kvm-arm.

Will

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Wei Huang <wei@redhat.com>
Cc: kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org, shannon.zhao@linaro.org,
	kvm@vger.kernel.org, marc.zyngier@arm.com,
	christoffer.dall@linaro.org, drjones@redhat.com,
	cov@codeaurora.org, mark.rutland@arm.com,
	catalin.marinas@arm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/1] KVM: ARM64: Fix the issues when guest PMCCFILTR is configured
Date: Thu, 17 Nov 2016 13:30:39 +0000	[thread overview]
Message-ID: <20161117133039.GH22855@arm.com> (raw)
In-Reply-To: <1479316160-8567-1-git-send-email-wei@redhat.com>

On Wed, Nov 16, 2016 at 11:09:20AM -0600, Wei Huang wrote:
> KVM calls kvm_pmu_set_counter_event_type() when PMCCFILTR is configured.
> But this function can't deals with PMCCFILTR correctly because the evtCount
> bits of PMCCFILTR, which is reserved 0, conflits with the SW_INCR event
> type of other PMXEVTYPER<n> registers. To fix it, when eventsel == 0, this
> function shouldn't return immediately; instead it needs to check further
> if select_idx is ARMV8_PMU_CYCLE_IDX.
> 
> Another issue is that KVM shouldn't copy the eventsel bits of PMCCFILTER
> blindly to attr.config. Instead it ought to convert the request to the
> "cpu cycle" event type (i.e. 0x11).
> 
> To support this patch and to prevent duplicated definitions, a limited
> set of ARMv8 perf event types were relocated from perf_event.c to
> asm/perf_event.h.
> 
> Signed-off-by: Wei Huang <wei@redhat.com>
> ---
>  arch/arm64/include/asm/perf_event.h | 10 +++++++++-
>  arch/arm64/kernel/perf_event.c      | 10 +---------
>  virt/kvm/arm/pmu.c                  |  8 +++++---
>  3 files changed, 15 insertions(+), 13 deletions(-)

Acked-by: Will Deacon <will.deacon@arm.com>

I'm assuming this will go via kvm-arm.

Will

  reply	other threads:[~2016-11-17 13:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 17:09 [PATCH v3 1/1] KVM: ARM64: Fix the issues when guest PMCCFILTR is configured Wei Huang
2016-11-16 17:09 ` Wei Huang
2016-11-17 13:30 ` Will Deacon [this message]
2016-11-17 13:30   ` Will Deacon
2016-11-17 13:30   ` Will Deacon
2016-11-17 13:38   ` Marc Zyngier
2016-11-17 13:38     ` Marc Zyngier
2016-11-17 13:38     ` Marc Zyngier

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=20161117133039.GH22855@arm.com \
    --to=will.deacon@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=shannon.zhao@linaro.org \
    --cc=wei@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.