]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm/arm64: KVM: Reset the HCR on each vcpu when resetting the vcpu
authorChristoffer Dall <christoffer.dall@linaro.org>
Mon, 4 May 2015 01:25:10 +0000 (09:25 +0800)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 11 May 2015 11:07:32 +0000 (07:07 -0400)
commite8234528bd6cd836672358d6aeaa3ba2b0eae5cf
treede568b78bef36fed0f63cbd891128365ad861cbb
parent2421dbc19ac5dd98cb7c1e8b853339b14440d6cf
arm/arm64: KVM: Reset the HCR on each vcpu when resetting the vcpu

commit b856a59141b1066d3c896a0d0231f84dabd040af upstream.

When userspace resets the vcpu using KVM_ARM_VCPU_INIT, we should also
reset the HCR, because we now modify the HCR dynamically to
enable/disable trapping of guest accesses to the VM registers.

This is crucial for reboot of VMs working since otherwise we will not be
doing the necessary cache maintenance operations when faulting in pages
with the guest MMU off.

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