Linux KVM/arm64 development list
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Alok Tiwari <alok.a.tiwari@oracle.com>
Cc: jintack@cs.columbia.edu, christoffer.dall@arm.com,
	oliver.upton@linux.dev, joey.gouly@arm.com,
	suzuki.poulose@arm.com, yuzenghui@huawei.com,
	catalin.marinas@arm.com, will@kernel.org,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: arm64: vgic: fix incorrect spinlock API usage
Date: Mon, 08 Sep 2025 09:16:10 +0100	[thread overview]
Message-ID: <86v7ltcqb9.wl-maz@kernel.org> (raw)
In-Reply-To: <20250907201421.3612784-1-alok.a.tiwari@oracle.com>

[removing @arm.com addresses that haven't been in use for a very long
time]

On Sun, 07 Sep 2025 21:14:13 +0100,
Alok Tiwari <alok.a.tiwari@oracle.com> wrote:
> 
> The function vgic_flush_lr_state() was calling _raw_spin_unlock()

s/was/is/

> instead of the proper raw_spin_unlock().
>
> _raw_spin_unlock() is an internal low-level API and should not
> be used directly; using raw_spin_unlock() ensures proper locking
> semantics in the vgic code.
> 
> This change replaces low-level API usage with the general kernel
> spinlock API, avoiding misuse of internal functions and aligning
> with kernel locking conventions.

This paragraph doesn't add much, please drop it.

> 
> Fixes: 8fa3adb8c6be ("KVM: arm/arm64: vgic: Make vgic_irq->irq_lock a raw_spinlock")
> Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
> ---
>  arch/arm64/kvm/vgic/vgic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kvm/vgic/vgic.c b/arch/arm64/kvm/vgic/vgic.c
> index f5148b38120a..c74d6120a12c 100644
> --- a/arch/arm64/kvm/vgic/vgic.c
> +++ b/arch/arm64/kvm/vgic/vgic.c
> @@ -818,7 +818,7 @@ static void vgic_flush_lr_state(struct kvm_vcpu *vcpu)
>  		 * the AP list has been sorted already.
>  		 */
>  		if (multi_sgi && irq->priority > prio) {
> -			_raw_spin_unlock(&irq->irq_lock);
> +			raw_spin_unlock(&irq->irq_lock);
>  			break;
>  		}
>  

With the above fixed:

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2025-09-08  8:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-07 20:14 [PATCH] KVM: arm64: vgic: fix incorrect spinlock API usage Alok Tiwari
2025-09-08  8:16 ` Marc Zyngier [this message]
2025-09-08 13:06   ` [External] : " ALOK TIWARI

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=86v7ltcqb9.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=alok.a.tiwari@oracle.com \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@arm.com \
    --cc=jintack@cs.columbia.edu \
    --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=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