From: Marc Zyngier <maz@kernel.org>
To: Maxim Levitsky <mlevitsk@redhat.com>
Cc: kvm@vger.kernel.org, Suzuki K Poulose <suzuki.poulose@arm.com>,
Jing Zhang <jingzhangos@google.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Sebastian Ott <sebott@redhat.com>,
Shusen Li <lishusen2@huawei.com>,
Waiman Long <longman@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org,
Bjorn Helgaas <bhelgaas@google.com>,
Borislav Petkov <bp@alien8.de>, Anup Patel <anup@brainfault.org>,
Will Deacon <will@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Alexander Potapenko <glider@google.com>,
kvmarm@lists.linux.dev,
Keisuke Nishimura <keisuke.nishimura@inria.fr>,
Zenghui Yu <yuzenghui@huawei.com>,
Peter Zijlstra <peterz@infradead.org>,
Atish Patra <atishp@atishpatra.org>,
Joey Gouly <joey.gouly@arm.com>,
x86@kernel.org, Sean Christopherson <seanjc@google.com>,
Andre Przywara <andre.przywara@arm.com>,
Kunkun Jiang <jiangkunkun@huawei.com>,
linux-riscv@lists.infradead.org,
Randy Dunlap <rdunlap@infradead.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Boqun Feng <boqun.feng@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Alexandre Ghiti <alex@ghiti.fr>,
linux-kernel@vger.kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Oliver Upton <oliver.upton@linux.dev>,
kvm-riscv@lists.infradead.org, Ingo Molnar <mingo@redhat.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Albert Ou <aou@eecs.berkeley.edu>
Subject: Re: [PATCH v5 5/6] KVM: arm64: use kvm_trylock_all_vcpus when locking all vCPUs
Date: Wed, 14 May 2025 10:35:36 +0100 [thread overview]
Message-ID: <86msbffsbb.wl-maz@kernel.org> (raw)
In-Reply-To: <20250512180407.659015-6-mlevitsk@redhat.com>
On Mon, 12 May 2025 19:04:06 +0100,
Maxim Levitsky <mlevitsk@redhat.com> wrote:
>
> Use kvm_trylock_all_vcpus instead of a custom implementation when locking
> all vCPUs of a VM, to avoid triggering a lockdep warning, in the case in
> which the VM is configured to have more than MAX_LOCK_DEPTH vCPUs.
>
> This fixes the following false lockdep warning:
>
> [ 328.171264] BUG: MAX_LOCK_DEPTH too low!
> [ 328.175227] turning off the locking correctness validator.
> [ 328.180726] Please attach the output of /proc/lock_stat to the bug report
> [ 328.187531] depth: 48 max: 48!
> [ 328.190678] 48 locks held by qemu-kvm/11664:
> [ 328.194957] #0: ffff800086de5ba0 (&kvm->lock){+.+.}-{3:3}, at: kvm_ioctl_create_device+0x174/0x5b0
> [ 328.204048] #1: ffff0800e78800b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
> [ 328.212521] #2: ffff07ffeee51e98 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
> [ 328.220991] #3: ffff0800dc7d80b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
> [ 328.229463] #4: ffff07ffe0c980b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
> [ 328.237934] #5: ffff0800a3883c78 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
> [ 328.246405] #6: ffff07fffbe480b8 (&vcpu->mutex){+.+.}-{3:3}, at: lock_all_vcpus+0x16c/0x2a0
>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Paolo: if you are queuing this for 6.16, please put it on a stable
branch so that I can merge it back in case of conflicts.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-05-14 12:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 18:04 [PATCH v5 0/6] KVM: lockdep improvements Maxim Levitsky
2025-05-12 18:04 ` [PATCH v5 1/6] locking/mutex: implement mutex_trylock_nested Maxim Levitsky
2025-05-12 18:04 ` [PATCH v5 2/6] locking/mutex: implement mutex_lock_killable_nest_lock Maxim Levitsky
2025-05-12 18:04 ` [PATCH v5 3/6] KVM: add kvm_lock_all_vcpus and kvm_trylock_all_vcpus Maxim Levitsky
2025-05-14 9:33 ` Marc Zyngier
2025-05-12 18:04 ` [PATCH v5 4/6] x86: KVM: SVM: use kvm_lock_all_vcpus instead of a custom implementation Maxim Levitsky
2025-05-12 18:04 ` [PATCH v5 5/6] KVM: arm64: use kvm_trylock_all_vcpus when locking all vCPUs Maxim Levitsky
2025-05-14 9:35 ` Marc Zyngier [this message]
2025-05-12 18:04 ` [PATCH v5 6/6] RISC-V: KVM: " Maxim Levitsky
2025-05-13 11:18 ` Anup Patel
2025-05-13 11:45 ` [PATCH v5 0/6] KVM: lockdep improvements Peter Zijlstra
2025-06-10 16:28 ` patchwork-bot+linux-riscv
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=86msbffsbb.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=alex@ghiti.fr \
--cc=andre.przywara@arm.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atishp@atishpatra.org \
--cc=bhelgaas@google.com \
--cc=boqun.feng@gmail.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@linux.intel.com \
--cc=glider@google.com \
--cc=hpa@zytor.com \
--cc=jiangkunkun@huawei.com \
--cc=jingzhangos@google.com \
--cc=joey.gouly@arm.com \
--cc=keisuke.nishimura@inria.fr \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lishusen2@huawei.com \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=mlevitsk@redhat.com \
--cc=oliver.upton@linux.dev \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=seanjc@google.com \
--cc=sebott@redhat.com \
--cc=suzuki.poulose@arm.com \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).