WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xen: kill hvm_timer only when is initialized

To: Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xen: kill hvm_timer only when is initialized
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 1 Jul 2010 17:14:18 +0100
Cc:
Delivery-date: Thu, 01 Jul 2010 09:15:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1007011700410.29110@kaball-desktop>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcsZNvWc+2I7OkDASDmgZeN8v3ZPMQAAX9E4
Thread-topic: [Xen-devel] [PATCH] xen: kill hvm_timer only when is initialized
User-agent: Microsoft-Entourage/12.24.0.100205
On 01/07/2010 17:02, "Stefano Stabellini" <Stefano.Stabellini@xxxxxxxxxxxxx>
wrote:

> Don't try to kill the per-irq hvm_timer if it wasn't initialized
> before (doing so causes an ASSERT to fail).

I fixed this on Monday. Keep up!

 K.

> 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



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>