]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: Return early from kvm_finalize_sys_regs() if guest has run
authorSascha Bischoff <Sascha.Bischoff@arm.com>
Thu, 19 Mar 2026 15:50:28 +0000 (15:50 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 19 Mar 2026 16:25:55 +0000 (16:25 +0000)
commitcbd8c958be54abdf2c0f9b9c3eac971428b9d4b1
tree6e0d12c3994c22a3c844c8b510c0607fa5b01ac3
parent3a2857da94d4783c076b15035c578892f1817dce
KVM: arm64: Return early from kvm_finalize_sys_regs() if guest has run

If the guest has already run, we have no business finalizing the
system register state - it is too late. Therefore, check early and
bail if the VM has already run.

This change also stops kvm_init_nv_sysregs() from being called once
the RM has run once. Although this looks like a behavioural change,
the function returns early once it has been called the first time.

Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com>
Link: https://patch.msgid.link/20260319154937.3619520-4-sascha.bischoff@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/sys_regs.c