[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] 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 <stefano.stabellini@xxxxxxxxxxxxx> diff -r 2f8d5503d614 xen/drivers/passthrough/io.c --- a/xen/drivers/passthrough/io.c Thu Jul 01 16:59:37 2010 +0100 +++ b/xen/drivers/passthrough/io.c Thu Jul 01 17:00:38 2010 +0100 @@ -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 2f8d5503d614 xen/drivers/passthrough/pci.c --- a/xen/drivers/passthrough/pci.c Thu Jul 01 16:59:37 2010 +0100 +++ b/xen/drivers/passthrough/pci.c Thu Jul 01 17:00:38 2010 +0100 @@ -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 2f8d5503d614 xen/include/xen/iommu.h --- a/xen/include/xen/iommu.h Thu Jul 01 16:59:37 2010 +0100 +++ b/xen/include/xen/iommu.h Thu Jul 01 17:00:38 2010 +0100 @@ -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 Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |