mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xen/arm: implement vcpu_timer_destroy
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>
This commit is contained in:
1 parent
be2d883023
commit
f0cc428cbe
3 files changed
+8
No files matched your search
@@ -399,6 +399,7 @@ int vcpu_initialise(struct vcpu *v)
|
||||
|
||||
void vcpu_destroy(struct vcpu *v)
|
||||
{
|
||||
vcpu_timer_destroy(v);
|
||||
free_xenheap_pages(v->arch.stack, STACK_ORDER);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,12 @@ int vcpu_vtimer_init(struct vcpu *v)
|
||||
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);
|
||||
|
||||
@@ -24,6 +24,7 @@ extern int vcpu_vtimer_init(struct vcpu *v);
|
||||
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
|
||||
|
||||
|
||||