]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Fully zero the vcpu state on reset
authorMarc Zyngier <maz@kernel.org>
Wed, 7 Apr 2021 17:54:16 +0000 (18:54 +0100)
committerMarc Zyngier <maz@kernel.org>
Fri, 9 Apr 2021 17:26:25 +0000 (18:26 +0100)
commitf85d8facdc1b7f181ff2fe5673e1039f3c2249a7
tree9c0ead3a383924403deedb0d0acc75b7afb9a55c
parent997e9656ffae14d8735c8d0c1ad7a7165019365a
KVM: arm64: Fully zero the vcpu state on reset

On vcpu reset, we expect all the registers to be brought back
to their initial state, which happens to be a bunch of zeroes.

However, some recent commit broke this, and is now leaving a bunch
of registers (such as the FP state) with whatever was left by the
guest. My bad.

Zero the reset of the state (32bit SPSRs and FPSIMD state).

Cc: stable@vger.kernel.org
Fixes: c039cfe8c2bd ("KVM: arm64: Make struct kvm_regs userspace-only")
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/reset.c