aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2016-04-27 17:47:05 +0100
committerAlex Shi <alex.shi@linaro.org>2016-05-25 11:54:19 +0800
commita7611cee16d8955a4bb99a7ae4cf79f8adec7dc8 (patch)
tree9e1f658689e839a646652cf4f39242840636a293 /arch/arm/include/asm/kvm_host.h
parent5e0afcbbc11bc9adeddcdccf7be32b8dfbdd1ad8 (diff)
arm64: kvm: allows kvm cpu hotpluglinux-linaro-v4.1-test
The current kvm implementation on arm64 does cpu-specific initialization at system boot, and has no way to gracefully shutdown a core in terms of kvm. This prevents kexec from rebooting the system at EL2. This patch adds a cpu tear-down function and also puts an existing cpu-init code into a separate function, kvm_arch_hardware_disable() and kvm_arch_hardware_enable() respectively. We don't need the arm64 specific cpu hotplug hook any more. Since this patch modifies common code between arm and arm64, one stub definition, __cpu_reset_hyp_mode(), is added on arm side to avoid compilation errors. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> [Rebase, added separate VHE init/exit path, changed resets use of kvm_call_hyp() to the __version, en/disabled hardware in init_subsystems(), added icache maintenance to __kvm_hyp_reset() and removed lr restore, removed guest-enter after teardown handling] Signed-off-by: James Morse <james.morse@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit 67f6919766620e7ea7aab11a6a3470dc7b451359) Signed-off-by: Alex Shi <alex.shi@linaro.org> Conflicts: skip vmid etc. in arch/arm/kvm/arm.c use s/__kvm_call_hyp/kvm_call_hyp/ in arch/arm64/kvm/hyp.S
Diffstat (limited to 'arch/arm/include/asm/kvm_host.h')
-rw-r--r--arch/arm/include/asm/kvm_host.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
index c0134db55a0b..ce15847ce33a 100644
--- a/arch/arm/include/asm/kvm_host.h
+++ b/arch/arm/include/asm/kvm_host.h
@@ -217,6 +217,15 @@ static inline void __cpu_init_stage2(void)
{
}
+static inline void __cpu_reset_hyp_mode(phys_addr_t boot_pgd_ptr,
+ phys_addr_t phys_idmap_start)
+{
+ /*
+ * TODO
+ * kvm_call_reset(boot_pgd_ptr, phys_idmap_start);
+ */
+}
+
static inline int kvm_arch_dev_ioctl_check_extension(long ext)
{
return 0;
@@ -229,7 +238,6 @@ void kvm_mmu_wp_memory_region(struct kvm *kvm, int slot);
struct kvm_vcpu *kvm_mpidr_to_vcpu(struct kvm *kvm, unsigned long mpidr);
-static inline void kvm_arch_hardware_disable(void) {}
static inline void kvm_arch_hardware_unsetup(void) {}
static inline void kvm_arch_sync_events(struct kvm *kvm) {}
static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {}