From: Marc Zyngier <maz@kernel.org>
To: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: kernel-team@android.com, kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org
Subject: Re: [PATCH 6/8] KVM: arm64: Remove dead PMU sysreg decoding code
Date: Thu, 26 Nov 2020 15:34:14 +0000 [thread overview]
Message-ID: <3ae09ecc95b732129f71076b4b59c873@kernel.org> (raw)
In-Reply-To: <1ed6dfd6-4ace-a562-bc2f-054a5c853fa6@arm.com>
Hi Alex,
On 2020-11-26 15:18, Alexandru Elisei wrote:
> Hi Marc,
>
> I checked and indeed the remaining cases cover all registers that use
> this accessor.
>
> However, I'm a bit torn here. The warning that I got when trying to run
> a guest
> with the PMU feature flag set, but not initialized (reported at [1])
> was also not
> supposed to ever be reached:
>
> static u32 kvm_pmu_event_mask(struct kvm *kvm)
> {
> switch (kvm->arch.pmuver) {
> case 1: /* ARMv8.0 */
> return GENMASK(9, 0);
> case 4: /* ARMv8.1 */
> case 5: /* ARMv8.4 */
> case 6: /* ARMv8.5 */
> return GENMASK(15, 0);
> default: /* Shouldn't be here, just for sanity */
> WARN_ONCE(1, "Unknown PMU version %d\n", kvm->arch.pmuver);
> return 0;
> }
> }
>
> I realize it's not exactly the same thing and I'll leave it up to you
> if you want
> to add a warning for the cases that should never happen. I'm fine
> either way:
I already have queued such a warning[1]. It turns out that LLVM warns
idx can be left uninitialized, and shouts. Let me know if that works
for you.
Thanks,
M.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=kvm-arm64/pmu-undef&id=af7eff70eaf8f28179334f5aeabb70a306242c83
--
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: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: kernel-team@android.com, kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org
Subject: Re: [PATCH 6/8] KVM: arm64: Remove dead PMU sysreg decoding code
Date: Thu, 26 Nov 2020 15:34:14 +0000 [thread overview]
Message-ID: <3ae09ecc95b732129f71076b4b59c873@kernel.org> (raw)
In-Reply-To: <1ed6dfd6-4ace-a562-bc2f-054a5c853fa6@arm.com>
Hi Alex,
On 2020-11-26 15:18, Alexandru Elisei wrote:
> Hi Marc,
>
> I checked and indeed the remaining cases cover all registers that use
> this accessor.
>
> However, I'm a bit torn here. The warning that I got when trying to run
> a guest
> with the PMU feature flag set, but not initialized (reported at [1])
> was also not
> supposed to ever be reached:
>
> static u32 kvm_pmu_event_mask(struct kvm *kvm)
> {
> switch (kvm->arch.pmuver) {
> case 1: /* ARMv8.0 */
> return GENMASK(9, 0);
> case 4: /* ARMv8.1 */
> case 5: /* ARMv8.4 */
> case 6: /* ARMv8.5 */
> return GENMASK(15, 0);
> default: /* Shouldn't be here, just for sanity */
> WARN_ONCE(1, "Unknown PMU version %d\n", kvm->arch.pmuver);
> return 0;
> }
> }
>
> I realize it's not exactly the same thing and I'll leave it up to you
> if you want
> to add a warning for the cases that should never happen. I'm fine
> either way:
I already have queued such a warning[1]. It turns out that LLVM warns
idx can be left uninitialized, and shouts. Let me know if that works
for you.
Thanks,
M.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=kvm-arm64/pmu-undef&id=af7eff70eaf8f28179334f5aeabb70a306242c83
--
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
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
kernel-team@android.com
Subject: Re: [PATCH 6/8] KVM: arm64: Remove dead PMU sysreg decoding code
Date: Thu, 26 Nov 2020 15:34:14 +0000 [thread overview]
Message-ID: <3ae09ecc95b732129f71076b4b59c873@kernel.org> (raw)
In-Reply-To: <1ed6dfd6-4ace-a562-bc2f-054a5c853fa6@arm.com>
Hi Alex,
On 2020-11-26 15:18, Alexandru Elisei wrote:
> Hi Marc,
>
> I checked and indeed the remaining cases cover all registers that use
> this accessor.
>
> However, I'm a bit torn here. The warning that I got when trying to run
> a guest
> with the PMU feature flag set, but not initialized (reported at [1])
> was also not
> supposed to ever be reached:
>
> static u32 kvm_pmu_event_mask(struct kvm *kvm)
> {
> switch (kvm->arch.pmuver) {
> case 1: /* ARMv8.0 */
> return GENMASK(9, 0);
> case 4: /* ARMv8.1 */
> case 5: /* ARMv8.4 */
> case 6: /* ARMv8.5 */
> return GENMASK(15, 0);
> default: /* Shouldn't be here, just for sanity */
> WARN_ONCE(1, "Unknown PMU version %d\n", kvm->arch.pmuver);
> return 0;
> }
> }
>
> I realize it's not exactly the same thing and I'll leave it up to you
> if you want
> to add a warning for the cases that should never happen. I'm fine
> either way:
I already have queued such a warning[1]. It turns out that LLVM warns
idx can be left uninitialized, and shouts. Let me know if that works
for you.
Thanks,
M.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=kvm-arm64/pmu-undef&id=af7eff70eaf8f28179334f5aeabb70a306242c83
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2020-11-26 15:34 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 18:25 [PATCH 0/8] KVM: arm64: Disabled PMU handling Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-13 18:25 ` [PATCH 1/8] KVM: arm64: Add kvm_vcpu_has_pmu() helper Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-13 18:25 ` [PATCH 2/8] KVM: arm64: Set ID_AA64DFR0_EL1.PMUVer to 0 when no PMU support Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-13 18:25 ` [PATCH 3/8] KVM: arm64: Refuse illegal KVM_ARM_VCPU_PMU_V3 at reset time Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-26 14:59 ` Alexandru Elisei
2020-11-26 14:59 ` Alexandru Elisei
2020-11-26 14:59 ` Alexandru Elisei
2020-11-26 15:25 ` Marc Zyngier
2020-11-26 15:25 ` Marc Zyngier
2020-11-26 15:25 ` Marc Zyngier
2020-11-26 15:49 ` Alexandru Elisei
2020-11-26 15:49 ` Alexandru Elisei
2020-11-26 15:49 ` Alexandru Elisei
2020-11-13 18:25 ` [PATCH 4/8] KVM: arm64: Inject UNDEF on PMU access when no PMU configured Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-13 18:25 ` [PATCH 5/8] KVM: arm64: Remove PMU RAZ/WI handling Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-13 18:25 ` Marc Zyngier
2020-11-26 15:06 ` Alexandru Elisei
2020-11-26 15:06 ` Alexandru Elisei
2020-11-26 15:06 ` Alexandru Elisei
2020-11-27 8:50 ` Marc Zyngier
2020-11-27 8:50 ` Marc Zyngier
2020-11-27 8:50 ` Marc Zyngier
2020-11-13 18:26 ` [PATCH 6/8] KVM: arm64: Remove dead PMU sysreg decoding code Marc Zyngier
2020-11-13 18:26 ` Marc Zyngier
2020-11-13 18:26 ` Marc Zyngier
2020-11-26 15:18 ` Alexandru Elisei
2020-11-26 15:18 ` Alexandru Elisei
2020-11-26 15:18 ` Alexandru Elisei
2020-11-26 15:34 ` Marc Zyngier [this message]
2020-11-26 15:34 ` Marc Zyngier
2020-11-26 15:34 ` Marc Zyngier
2020-11-26 15:54 ` Alexandru Elisei
2020-11-26 15:54 ` Alexandru Elisei
2020-11-26 15:54 ` Alexandru Elisei
2020-11-26 15:57 ` Marc Zyngier
2020-11-26 15:57 ` Marc Zyngier
2020-11-26 15:57 ` Marc Zyngier
2020-11-13 18:26 ` [PATCH 7/8] KVM: arm64: Gate kvm_pmu_update_state() on the PMU feature Marc Zyngier
2020-11-13 18:26 ` Marc Zyngier
2020-11-13 18:26 ` Marc Zyngier
2020-11-13 18:26 ` [PATCH 8/8] KVM: arm64: Get rid of the PMU ready state Marc Zyngier
2020-11-13 18:26 ` Marc Zyngier
2020-11-13 18:26 ` Marc Zyngier
2020-11-24 17:28 ` [PATCH 0/8] KVM: arm64: Disabled PMU handling Alexandru Elisei
2020-11-24 17:28 ` Alexandru Elisei
2020-11-24 17:28 ` Alexandru Elisei
2020-11-25 8:39 ` Marc Zyngier
2020-11-25 8:39 ` Marc Zyngier
2020-11-25 8:39 ` Marc Zyngier
2020-11-26 16:34 ` Alexandru Elisei
2020-11-26 16:34 ` Alexandru Elisei
2020-11-26 16:34 ` Alexandru Elisei
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=3ae09ecc95b732129f71076b4b59c873@kernel.org \
--to=maz@kernel.org \
--cc=alexandru.elisei@arm.com \
--cc=kernel-team@android.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.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 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.