All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Qian Cai <qcai@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	kernel-team@android.com, kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] KVM: arm64: Don't access PMCR_EL0 when no PMU is available
Date: Mon, 04 Jan 2021 19:32:41 +0000	[thread overview]
Message-ID: <81607700b5de4860a6f281c68ee17669@kernel.org> (raw)
In-Reply-To: <22cd2b3e8b8b278f110a3540755583efee7189fd.camel@redhat.com>

On 2021-01-04 18:42, Qian Cai wrote:
> On Mon, 2021-01-04 at 18:26 +0000, Marc Zyngier wrote:
>> What I'm suggesting is this [1], which is to get rid of KVM_ARM_PMU
>> completely. At least, the kernel configuration will be consistent.
>> 
> 
> Do you have a patch for CONFIG_KVM to select HW_PERF_EVENTS then? I 
> could cook
> one if not.

I don't think there should be such a patch. People do disable
HW_PERF_EVENTS in production in some cases, and we should
honor that. All I am trying to guarantee at the moment is
that the KVM configuration is consistent, as I believe that's
what broke in your particular case.

What needs doing is to hide the PMU registers from userspace
when no PMU is configured, or even available. I'll try and post
something to that effect tomorrow (hey, I'm still officially
on holiday...).

         M.
-- 
Jazz is not dead. It just smells funny...
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Qian Cai <qcai@redhat.com>
Cc: linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, kernel-team@android.com,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Alexandru Elisei <alexandru.elisei@arm.com>
Subject: Re: [PATCH] KVM: arm64: Don't access PMCR_EL0 when no PMU is available
Date: Mon, 04 Jan 2021 19:32:41 +0000	[thread overview]
Message-ID: <81607700b5de4860a6f281c68ee17669@kernel.org> (raw)
In-Reply-To: <22cd2b3e8b8b278f110a3540755583efee7189fd.camel@redhat.com>

On 2021-01-04 18:42, Qian Cai wrote:
> On Mon, 2021-01-04 at 18:26 +0000, Marc Zyngier wrote:
>> What I'm suggesting is this [1], which is to get rid of KVM_ARM_PMU
>> completely. At least, the kernel configuration will be consistent.
>> 
> 
> Do you have a patch for CONFIG_KVM to select HW_PERF_EVENTS then? I 
> could cook
> one if not.

I don't think there should be such a patch. People do disable
HW_PERF_EVENTS in production in some cases, and we should
honor that. All I am trying to guarantee at the moment is
that the KVM configuration is consistent, as I believe that's
what broke in your particular case.

What needs doing is to hide the PMU registers from userspace
when no PMU is configured, or even available. I'll try and post
something to that effect tomorrow (hey, I'm still officially
on holiday...).

         M.
-- 
Jazz is not dead. It just smells funny...

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Qian Cai <qcai@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	kernel-team@android.com, kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] KVM: arm64: Don't access PMCR_EL0 when no PMU is available
Date: Mon, 04 Jan 2021 19:32:41 +0000	[thread overview]
Message-ID: <81607700b5de4860a6f281c68ee17669@kernel.org> (raw)
In-Reply-To: <22cd2b3e8b8b278f110a3540755583efee7189fd.camel@redhat.com>

On 2021-01-04 18:42, Qian Cai wrote:
> On Mon, 2021-01-04 at 18:26 +0000, Marc Zyngier wrote:
>> What I'm suggesting is this [1], which is to get rid of KVM_ARM_PMU
>> completely. At least, the kernel configuration will be consistent.
>> 
> 
> Do you have a patch for CONFIG_KVM to select HW_PERF_EVENTS then? I 
> could cook
> one if not.

I don't think there should be such a patch. People do disable
HW_PERF_EVENTS in production in some cases, and we should
honor that. All I am trying to guarantee at the moment is
that the KVM configuration is consistent, as I believe that's
what broke in your particular case.

What needs doing is to hide the PMU registers from userspace
when no PMU is configured, or even available. I'll try and post
something to that effect tomorrow (hey, I'm still officially
on holiday...).

         M.
-- 
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-01-04 19:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10  8:30 [PATCH] KVM: arm64: Don't access PMCR_EL0 when no PMU is available Marc Zyngier
2020-12-10  8:30 ` Marc Zyngier
2020-12-10 10:12 ` Alexandru Elisei
2020-12-10 10:12   ` Alexandru Elisei
2020-12-10 11:16   ` Marc Zyngier
2020-12-10 11:16     ` Marc Zyngier
2020-12-10 12:22     ` Alexandru Elisei
2020-12-10 12:22       ` Alexandru Elisei
2021-01-04 15:47 ` Qian Cai
2021-01-04 15:47   ` Qian Cai
2021-01-04 15:47   ` Qian Cai
2021-01-04 16:08   ` Marc Zyngier
2021-01-04 16:08     ` Marc Zyngier
2021-01-04 16:08     ` Marc Zyngier
2021-01-04 16:22     ` Qian Cai
2021-01-04 16:22       ` Qian Cai
2021-01-04 16:22       ` Qian Cai
2021-01-04 16:27       ` Marc Zyngier
2021-01-04 16:27         ` Marc Zyngier
2021-01-04 16:27         ` Marc Zyngier
2021-01-04 18:20         ` Qian Cai
2021-01-04 18:20           ` Qian Cai
2021-01-04 18:20           ` Qian Cai
2021-01-04 18:26           ` Marc Zyngier
2021-01-04 18:26             ` Marc Zyngier
2021-01-04 18:26             ` Marc Zyngier
2021-01-04 18:42             ` Qian Cai
2021-01-04 18:42               ` Qian Cai
2021-01-04 18:42               ` Qian Cai
2021-01-04 19:32               ` Marc Zyngier [this message]
2021-01-04 19:32                 ` Marc Zyngier
2021-01-04 19:32                 ` 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=81607700b5de4860a6f281c68ee17669@kernel.org \
    --to=maz@kernel.org \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-next@vger.kernel.org \
    --cc=qcai@redhat.com \
    --cc=sfr@canb.auug.org.au \
    /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.