[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 3/3] 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@xxxxxxxxxxxxx>
---
 xen/arch/arm/domain.c |    1 +
 xen/arch/arm/vtimer.c |    6 ++++++
 xen/arch/arm/vtimer.h |    1 +
 3 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 3e9a690..e37ec54 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -402,6 +402,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);
 }
 
diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c
index 3616879..85201b5 100644
--- a/xen/arch/arm/vtimer.c
+++ b/xen/arch/arm/vtimer.c
@@ -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);
diff --git a/xen/arch/arm/vtimer.h b/xen/arch/arm/vtimer.h
index faebd68..43eef69 100644
--- a/xen/arch/arm/vtimer.h
+++ b/xen/arch/arm/vtimer.h
@@ -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
 
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.