arm/arm64: KVM: Reset the HCR on each vcpu when resetting the vcpu
authorChristoffer Dall <christoffer.dall@linaro.org>
Thu, 16 Oct 2014 15:21:16 +0000 (17:21 +0200)
committerJiri Slaby <jslaby@suse.cz>
Thu, 30 Apr 2015 09:15:12 +0000 (11:15 +0200)
commitf5a186c1839430cccc30bea14817e669ceb8d81c
treea151eab6eb74e47797fd3fc2ca5948135aa7cdd6
parent96c7d3a6b93b12868acd5432e408f42e36afe8d5
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: Jiri Slaby <jslaby@suse.cz>
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