Implement a function to destroy the per-vcpu phys and virt timers, call
it from vcpu_destroy.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
void vcpu_destroy(struct vcpu *v)
{
+ vcpu_timer_destroy(v);
free_xenheap_pages(v->arch.stack, STACK_ORDER);
}
return 0;
}
+void vcpu_timer_destroy(struct vcpu *v)
+{
+ kill_timer(&v->arch.virt_timer.timer);
+ kill_timer(&v->arch.phys_timer.timer);
+}
+
int virt_timer_save(struct vcpu *v)
{
v->arch.virt_timer.ctl = READ_CP32(CNTV_CTL);
extern int vtimer_emulate(struct cpu_user_regs *regs, union hsr hsr);
extern int virt_timer_save(struct vcpu *v);
extern int virt_timer_restore(struct vcpu *v);
+extern void vcpu_timer_destroy(struct vcpu *v);
#endif