diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2013-01-23 13:21:59 -0500 |
---|---|---|
committer | Christoffer Dall <c.dall@virtualopensystems.com> | 2013-01-23 13:21:59 -0500 |
commit | 4dcab3d7274d8ff5ee6822c68e49589109d865dc (patch) | |
tree | 72ea4e77807e46ab4128825c08e8be8d21a9b2b8 /arch/arm/kvm/arm.c | |
parent | 38e32673a55e9f7685f163c96f2168123e5e9b9a (diff) |
ARM: KVM: arch_timers: Wire the init code and config optiontracking-kvm-arm-v17-llct-20130308.0tracking-kvm-arm-v17-llct-20130220.0tracking-kvm-arm-v17-llct-20130219.0tracking-kvm-arm-v17-llct-20130217.0tracking-kvm-arm-v17-llct-20130211.0
It is now possible to select CONFIG_KVM_ARM_TIMER to enable the
KVM architected timer support.
Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
Diffstat (limited to 'arch/arm/kvm/arm.c')
-rw-r--r-- | arch/arm/kvm/arm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 800b2cd804d3..9ada5549216d 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -289,6 +289,7 @@ int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu) void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) { kvm_mmu_free_memory_caches(vcpu); + kvm_timer_vcpu_terminate(vcpu); kmem_cache_free(kvm_vcpu_cache, vcpu); } @@ -330,6 +331,9 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) if (ret) return ret; + /* Set up the timer */ + kvm_timer_vcpu_init(vcpu); + return 0; } @@ -1103,6 +1107,13 @@ static int init_hyp_mode(void) vgic_present = true; #endif + /* + * Init HYP architected timer support + */ + err = kvm_timer_hyp_init(); + if (err) + goto out_free_mappings; + kvm_info("Hyp mode initialized successfully\n"); return 0; out_free_vfp: |