Commit a7e33ad9 authored by Andre Przywara's avatar Andre Przywara Committed by Christoffer Dall

KVM: arm/arm64: arch_timer: Remove irq_phys_map

Now that the interface between the arch timer and the VGIC does not
require passing the irq_phys_map entry pointer anymore, let's remove
it from the virtual arch timer and use the virtual IRQ number instead
directly.
The remaining pointer returned by kvm_vgic_map_phys_irq() will be
removed in the following patch.
Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
Reviewed-by: default avatarEric Auger <eric.auger@linaro.org>
Reviewed-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent b452cb52
...@@ -53,9 +53,6 @@ struct arch_timer_cpu { ...@@ -53,9 +53,6 @@ struct arch_timer_cpu {
/* Timer IRQ */ /* Timer IRQ */
struct kvm_irq_level irq; struct kvm_irq_level irq;
/* VGIC mapping */
struct irq_phys_map *map;
/* Active IRQ state caching */ /* Active IRQ state caching */
bool active_cleared_last; bool active_cleared_last;
}; };
......
...@@ -175,10 +175,10 @@ static void kvm_timer_update_irq(struct kvm_vcpu *vcpu, bool new_level) ...@@ -175,10 +175,10 @@ static void kvm_timer_update_irq(struct kvm_vcpu *vcpu, bool new_level)
timer->active_cleared_last = false; timer->active_cleared_last = false;
timer->irq.level = new_level; timer->irq.level = new_level;
trace_kvm_timer_update_irq(vcpu->vcpu_id, timer->map->virt_irq, trace_kvm_timer_update_irq(vcpu->vcpu_id, timer->irq.irq,
timer->irq.level); timer->irq.level);
ret = kvm_vgic_inject_mapped_irq(vcpu->kvm, vcpu->vcpu_id, ret = kvm_vgic_inject_mapped_irq(vcpu->kvm, vcpu->vcpu_id,
timer->map->virt_irq, timer->irq.irq,
timer->irq.level); timer->irq.level);
WARN_ON(ret); WARN_ON(ret);
} }
...@@ -276,7 +276,7 @@ void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu) ...@@ -276,7 +276,7 @@ void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu)
* exit. * exit.
*/ */
phys_active = timer->irq.level || phys_active = timer->irq.level ||
kvm_vgic_map_is_active(vcpu, timer->map->virt_irq); kvm_vgic_map_is_active(vcpu, timer->irq.irq);
/* /*
* We want to avoid hitting the (re)distributor as much as * We want to avoid hitting the (re)distributor as much as
...@@ -378,7 +378,6 @@ int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu, ...@@ -378,7 +378,6 @@ int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu,
if (WARN_ON(IS_ERR(map))) if (WARN_ON(IS_ERR(map)))
return PTR_ERR(map); return PTR_ERR(map);
timer->map = map;
return 0; return 0;
} }
...@@ -504,8 +503,7 @@ void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu) ...@@ -504,8 +503,7 @@ void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu)
struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu; struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
timer_disarm(timer); timer_disarm(timer);
if (timer->map) kvm_vgic_unmap_phys_irq(vcpu, timer->irq.irq);
kvm_vgic_unmap_phys_irq(vcpu, timer->map->virt_irq);
} }
void kvm_timer_enable(struct kvm *kvm) void kvm_timer_enable(struct kvm *kvm)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment