From: Marc Zyngier <maz@kernel.org>
To: "Arnd Bergmann" <arnd@arndb.de>
Cc: "Arnd Bergmann" <arnd@kernel.org>,
"Oliver Upton" <oliver.upton@linux.dev>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>,
"Joey Gouly" <joey.gouly@arm.com>,
"Suzuki K Poulose" <suzuki.poulose@arm.com>,
"Zenghui Yu" <yuzenghui@huawei.com>,
"Mark Brown" <broonie@kernel.org>,
"James Morse" <james.morse@arm.com>,
"Sebastian Ott" <sebott@redhat.com>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: arm64: fix u64_replace_bits() usage
Date: Fri, 11 Jul 2025 09:53:41 +0100 [thread overview]
Message-ID: <86frf39kh6.wl-maz@kernel.org> (raw)
In-Reply-To: <4befb9eb-96e6-4a7c-9746-286144564f4e@app.fastmail.com>
On Fri, 11 Jul 2025 09:44:23 +0100,
"Arnd Bergmann" <arnd@arndb.de> wrote:
>
> On Fri, Jul 11, 2025, at 10:36, Marc Zyngier wrote:
> > On Fri, 11 Jul 2025 08:27:47 +0100, Arnd Bergmann <arnd@kernel.org> wrote:
> >> if (hpmn > vcpu->kvm->arch.nr_pmu_counters) {
> >> hpmn = vcpu->kvm->arch.nr_pmu_counters;
> >> - u64_replace_bits(val, hpmn, MDCR_EL2_HPMN);
> >> + val = u64_replace_bits(val, hpmn, MDCR_EL2_HPMN);
> >> }
> >>
> >> __vcpu_assign_sys_reg(vcpu, MDCR_EL2, val);
> >
> > This is only in -next, right? Because I have a fix for this already
> > queued for 6.16, as per [1].
>
> Yes, as far as I can tell, the warning only showed up in linux-next
> after f66f9c3d09c1 ("bitfield: Ensure the return values of helper
> functions are checked").
>
> As far as I can tell, Ben added the check in linux/bitfield.h
> when he sent you his version of the fix, they just ended up
> in linux-next in the wrong order, so I ended up recreating his
> original fix slightly differently.
I don't think Ben's fix is in -next, as I queued it in the kvmarm
fixes branch, which isn't pulled by -next.
Hopefully Paolo will send this to Linus shortly (pull request
here[1]), and -next will be clean again.
Thanks,
M.
[1] https://lore.kernel.org/r/20250711084835.2411230-1-maz@kernel.org
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2025-07-11 10:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 7:27 [PATCH] KVM: arm64: fix u64_replace_bits() usage Arnd Bergmann
2025-07-11 8:02 ` Zenghui Yu
2025-07-11 8:36 ` Marc Zyngier
2025-07-11 8:44 ` Arnd Bergmann
2025-07-11 8:53 ` Marc Zyngier [this message]
2025-07-11 9:13 ` Mark Brown
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=86frf39kh6.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.upton@linux.dev \
--cc=sebott@redhat.com \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.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