]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Fix hypercall bitmap writeback when vcpus have already run
authorMarc Zyngier <maz@kernel.org>
Mon, 16 May 2022 16:32:54 +0000 (17:32 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 16 May 2022 16:40:48 +0000 (17:40 +0100)
commitebf1ea3d586427aae15520df3724e65794c81b2b
treec45ebf28cffb4c8fc3ec045a08f0b919e9d2fb2a
parent871ce245fb12ae465918d981d00c6112f2414c79
KVM: arm64: Fix hypercall bitmap writeback when vcpus have already run

We generally want to disallow hypercall bitmaps being changed
once vcpus have already run. But we must allow the write if
the written value is unchanged so that userspace can rewrite
the register file on reboot, for example.

Without this, a QEMU-based VM will fail to reboot correctly.

The original code was correct, and it is me that introduced
the regression.

Fixes: f13f08138fad ("KVM: arm64: Setup a framework for hypercall bitmap firmware registers")
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hypercalls.c