From: Marc Zyngier <maz@kernel.org>
To: Fuad Tabba <fuad.tabba@linux.dev>
Cc: Oliver Upton <oupton@kernel.org>,
kvmarm@lists.linux.dev, stable@vger.kernel.org,
Sascha Bischoff <Sascha.Bischoff@arm.com>,
Jonathan Cameron <jic23@kernel.org>,
Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Steffen Eiden <seiden@linux.ibm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Fuad Tabba <tabba@google.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] KVM: arm64: vgic: Reset in_kernel on private IRQ allocation failure
Date: Sun, 02 Aug 2026 16:55:20 +0100 [thread overview]
Message-ID: <87jyq8plef.wl-maz@kernel.org> (raw)
In-Reply-To: <20260802150845.3485757-1-fuad.tabba@linux.dev>
On Sun, 02 Aug 2026 16:08:45 +0100,
Fuad Tabba <fuad.tabba@linux.dev> wrote:
>
> kvm_vgic_create() sets vgic.in_kernel before allocating the per-vCPU
> private IRQs, but the allocation-failure path resets only vgic_model and
> leaves in_kernel set. As irqchip_in_kernel() is !!in_kernel, the VM is
> left with an in-kernel irqchip but no model, and the -EEXIST guard at the
> top of kvm_vgic_create() rejects every retry, so userspace cannot recover
> from a transient -ENOMEM.
>
> Reset in_kernel alongside vgic_model on the failure path.
>
> Fixes: 9435c1e1431003 ("KVM: arm64: gic: Set vgic_model before initing private IRQs")
> Cc: stable@vger.kernel.org
> Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
> ---
> arch/arm64/kvm/vgic/vgic-init.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/kvm/vgic/vgic-init.c b/arch/arm64/kvm/vgic/vgic-init.c
> index 907057881b26a..fdac6e24762da 100644
> --- a/arch/arm64/kvm/vgic/vgic-init.c
> +++ b/arch/arm64/kvm/vgic/vgic-init.c
> @@ -176,6 +176,7 @@ int kvm_vgic_create(struct kvm *kvm, u32 type)
> }
>
> kvm->arch.vgic.vgic_model = 0;
> + kvm->arch.vgic.in_kernel = false;
> goto out_unlock;
> }
>
>
Acked-by: Marc Zyngier <maz@kernel.org>
M.
--
Jazz isn't dead. It just smells funny.
prev parent reply other threads:[~2026-08-02 15:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 15:08 [PATCH v1] KVM: arm64: vgic: Reset in_kernel on private IRQ allocation failure Fuad Tabba
2026-08-02 15:55 ` Marc Zyngier [this message]
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=87jyq8plef.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=Sascha.Bischoff@arm.com \
--cc=catalin.marinas@arm.com \
--cc=fuad.tabba@linux.dev \
--cc=jic23@kernel.org \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oupton@kernel.org \
--cc=seiden@linux.ibm.com \
--cc=stable@vger.kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=tabba@google.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