From: Fuad Tabba <fuad.tabba@linux.dev>
To: Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@kernel.org>
Cc: Joey Gouly <joey.gouly@arm.com>,
Steffen Eiden <seiden@linux.ibm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>, Will Deacon <will@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
Jack Thomson <jackabt@amazon.com>,
Congkai Tan <congkai@amazon.com>,
kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Fuad Tabba <tabba@google.com>
Subject: [PATCH v4 0/2] KVM: arm64: Clear VM-wide state when kvm_setup_vcpu() fails
Date: Mon, 2 Nov 2026 07:58:41 +0000 [thread overview]
Message-ID: <20261102075843.2556018-1-fuad.tabba@linux.dev> (raw)
Hi folks,
Changes since v3 [1]:
- New patch 2, clearing the default PMU left set by a failed INIT.
- Reworded patch 1's commit message.
- Rebased on 7.4-rc1.
A KVM_ARM_VCPU_INIT whose kvm_setup_vcpu() fails doesn't undo its
changes to VM-wide state. Patch 1 clears the feature bitmap, which the
PMU attributes read before the vCPU is initialized. Patch 2 clears the
default PMU, which a retry with KVM_ARM_VCPU_PMU_V3_STRICT would
otherwise inherit.
Tested under QEMU on a host without FEAT_NV1 (an Apple M2 MIDR,
for which has_nv1() returns false), with a reproducer that fails an
INIT and then initializes the PMU, directly for patch 1 and after a
STRICT retry for patch 2.
Based on Linux 7.4-rc1.
Cheers,
/fuad
[1] https://lore.kernel.org/all/20260921190843.107881-1-fuad.tabba@linux.dev/
Fuad Tabba (2):
KVM: arm64: Clear the VM's feature bitmap when kvm_setup_vcpu() fails
KVM: arm64: Clear the default PMU when kvm_setup_vcpu() fails
arch/arm64/kvm/arm.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
--
2.47.3
next reply other threads:[~2026-11-02 7:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 7:58 Fuad Tabba [this message]
2026-11-02 7:58 ` [PATCH v4 1/2] KVM: arm64: Clear the VM's feature bitmap when kvm_setup_vcpu() fails Fuad Tabba
2026-11-02 9:24 ` Suzuki K Poulose
2026-11-02 9:42 ` Fuad Tabba
2026-11-02 9:48 ` Suzuki K Poulose
2026-11-02 7:58 ` [PATCH v4 2/2] KVM: arm64: Clear the default PMU " Fuad Tabba
2026-11-02 9:56 ` Suzuki K Poulose
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=20261102075843.2556018-1-fuad.tabba@linux.dev \
--to=fuad.tabba@linux.dev \
--cc=congkai@amazon.com \
--cc=jackabt@amazon.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=ljs@kernel.org \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=seiden@linux.ibm.com \
--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