]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:32 +0000 (10:49 +0200)
commit918e08d0b67653cb3a4e15d9697aa28d7d5fbbce
treeae1ce33f251ca4feb2dd14f911b8ca9c77f8a175
parent168e82f640ed1891a700bdb43e37da354b2ab63c
KVM: arm64: Fully zero the vcpu state on reset

commit 85d703746154cdc6794b6654b587b0b0354c97e9 upstream.

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: e47c2055c68e ("KVM: arm64: Make struct kvm_regs userspace-only")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kvm/reset.c