xen: kill hvm_timer only when is initialized
PATCH 1/1 xen: kill hvm_timer only when is initialized
Don't try to kill the per-irq hvm_timer if it wasn't initialized before (doing so causes an ASSERT to fail).
Signed-off-by Stefano Stabellini <[email protected]>
xen/drivers/passthrough/io.c +1 -1
@@ -28,7 +28,7 @@static void hvm_dirq_assist (unsigned long _d); -static int pt_irq_need_timer (uint32_t flags) +int pt_irq_need_timer (uint32_t flags) {return !(flags & (HVM_IRQ_DPCI_GUEST_MSI |HVM_IRQ_DPCI_TRANSLATE )); }
xen/drivers/passthrough/pci.c +2 -1
@@ -260,7 +260,8 @@ i = find_next_bit(hvm_irq_dpci->mapping, d->nr_pirqs, i + 1) ) {pirq_guest_unbind (d, i); -kill_timer (&hvm_irq_dpci->hvm_timer[domain_pirq_to_irq (d, i)]); +if (pt_irq_need_timer (hvm_irq_dpci->mirq[i].flags) ) +kill_timer (&hvm_irq_dpci->hvm_timer[domain_pirq_to_irq (d, i)]);list_for_each_safe ( digl_list, tmp, &hvm_irq_dpci->mirq[i].digl_list )
xen/include/xen/iommu.h +1 -0
@@ -81,6 +81,7 @@void iommu_domain_teardown (struct domain *d);int hvm_do_IRQ_dpci (struct domain *d,unsigned int irq);int dpci_ioport_intercept (ioreq_t *p); +int pt_irq_need_timer (uint32_t flags);int pt_irq_create_bind_vtd (struct domain *d,xen_domctl_bind_pt_irq_t *pt_irq_bind); int pt_irq_destroy_bind_vtd(struct domain *d,
Quoted 2 lines · Stefano Stabellini
Don't try to kill the per-irq
hvm_timerif it wasn't initialized before (doing so causes an ASSERT to fail).
I fixed this on Monday. Keep up!
K.
Quoted 44 lines
Signed-off-by Stefano Stabellini <[email protected]>diff -r
2f8d5503d614xen/drivers/passthrough/io.cxen/drivers/passthrough/io.c Thu Jul 01 17:00:38 2010 +0100 renamed from xen/drivers/passthrough/io.c Thu Jul 01 16:59:37 2010 +0100 +1
-1@@ -28,7 +28,7 @@ static void hvm_dirq_assist(unsigned long _d); -static int pt_irq_need_timer(uint32_t flags) +int pt_irq_need_timer(uint32_t flags) { return !(flags & (HVM_IRQ_DPCI_GUEST_MSI | HVM_IRQ_DPCI_TRANSLATE)); }diff -r
2f8d5503d614xen/drivers/passthrough/pci.cxen/drivers/passthrough/pci.c Thu Jul 01 17:00:38 2010 +0100 renamed from xen/drivers/passthrough/pci.c Thu Jul 01 16:59:37 2010 +0100 +2
-1@@ -260,7 +260,8 @@ i = find_next_bit(hvm_irq_dpci->mapping, d->nr_pirqs, i + 1) ) { pirq_guest_unbind(d, i); - kill_timer(&hvm_irq_dpci->hvm_timer[domain_pirq_to_irq(d, i)]); + if ( pt_irq_need_timer(hvm_irq_dpci->mirq[i].flags) ) + kill_timer(&hvm_irq_dpci->hvm_timer[domain_pirq_to_irq(d, i)]); list_for_each_safe ( digl_list, tmp,&hvm_irq_dpci->mirq[i].digl_list )diff -r
2f8d5503d614xen/include/xen/iommu.hxen/include/xen/iommu.h Thu Jul 01 17:00:38 2010 +0100 renamed from xen/include/xen/iommu.h Thu Jul 01 16:59:37 2010 +0100 +1
-0@@ -81,6 +81,7 @@ void iommu_domain_teardown(struct domain *d); int hvm_do_IRQ_dpci(struct domain *d, unsigned int irq); int dpci_ioport_intercept(ioreq_t *p); +int pt_irq_need_timer(uint32_t flags); int pt_irq_create_bind_vtd(struct domain *d, xen_domctl_bind_pt_irq_t *pt_irq_bind); int pt_irq_destroy_bind_vtd(struct domain *d,_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 8 lines · Keir Fraser
Quoted 2 lines · Stefano Stabellini
Don't try to kill the per-irq
hvm_timerif it wasn't initialized before (doing so causes an ASSERT to fail).I fixed this on Monday. Keep up!
argh!