arm64: kvm: allows kvm cpu hotplug
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>
Showing
- arch/arm/include/asm/kvm_host.h 9 additions, 1 deletionarch/arm/include/asm/kvm_host.h
- arch/arm/include/asm/kvm_mmu.h 1 addition, 0 deletionsarch/arm/include/asm/kvm_mmu.h
- arch/arm/kvm/arm.c 71 additions, 48 deletionsarch/arm/kvm/arm.c
- arch/arm/kvm/mmu.c 5 additions, 0 deletionsarch/arm/kvm/mmu.c
- arch/arm64/include/asm/kvm_asm.h 1 addition, 0 deletionsarch/arm64/include/asm/kvm_asm.h
- arch/arm64/include/asm/kvm_host.h 12 additions, 1 deletionarch/arm64/include/asm/kvm_host.h
- arch/arm64/include/asm/kvm_mmu.h 1 addition, 0 deletionsarch/arm64/include/asm/kvm_mmu.h
- arch/arm64/kvm/hyp-init.S 38 additions, 0 deletionsarch/arm64/kvm/hyp-init.S
- arch/arm64/kvm/reset.c 14 additions, 0 deletionsarch/arm64/kvm/reset.c
Loading
Please register or sign in to comment