]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: KVM: Fix HCR setting for 32bit guests
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 4 May 2015 01:25:20 +0000 (09:25 +0800)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 11 May 2015 11:07:35 +0000 (07:07 -0400)
commitcc0c5f43df62402d1c283f047634e4672f7cb1d8
treed7f2297de3cfcf15a730e0f7239c0f9c7b22af57
parent9a73540524944d8e1deed976caa5437c7ff81bf0
arm64: KVM: Fix HCR setting for 32bit guests

commit 801f6772cecea6cfc7da61aa197716ab64db5f9e upstream.

Commit b856a59141b1 (arm/arm64: KVM: Reset the HCR on each vcpu
when resetting the vcpu) moved the init of the HCR register to
happen later in the init of a vcpu, but left out the fixup
done in kvm_reset_vcpu when preparing for a 32bit guest.

As a result, the 32bit guest is run as a 64bit guest, but the
rest of the kernel still manages it as a 32bit. Fun follows.

Moving the fixup to vcpu_reset_hcr solves the problem for good.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
arch/arm64/include/asm/kvm_emulate.h
arch/arm64/kvm/reset.c