]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm: introduce kvm_arm_init/setup/clear_debug
authorAlex Bennée <alex.bennee@linaro.org>
Tue, 7 Jul 2015 16:29:56 +0000 (17:29 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 21 Jul 2015 11:47:08 +0000 (12:47 +0100)
commitc4c8a3fd46ff8943492320a7505eb41764974339
treef3e156fff0a95985c234ab004ebd1b21c2b9c637
parentde05a50f36be1fef085e63205dbfd12ca4c97f9a
KVM: arm: introduce kvm_arm_init/setup/clear_debug

This is a precursor for later patches which will need to do more to
setup debug state before entering the hyp.S switch code. The existing
functionality for setting mdcr_el2 has been moved out of hyp.S and now
uses the value kept in vcpu->arch.mdcr_el2.

As the assembler used to previously mask and preserve MDCR_EL2.HPMN I've
had to add a mechanism to save the value of mdcr_el2 as a per-cpu
variable during the initialisation code. The kernel never sets this
number so we are assuming the bootcode has set up the correct value
here.

This also moves the conditional setting of the TDA bit from the hyp code
into the C code which is currently used for the lazy debug register
context switch code.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/include/asm/kvm_host.h
arch/arm/kvm/arm.c
arch/arm64/include/asm/kvm_asm.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/kernel/asm-offsets.c
arch/arm64/kvm/Makefile
arch/arm64/kvm/debug.c [new file with mode: 0644]
arch/arm64/kvm/hyp.S