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-changelog

[Xen-changelog] [xen-unstable] vtd: Only kill_timer() an init_timer()'ed

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] vtd: Only kill_timer() an init_timer()'ed timer.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Jun 2010 08:50:30 -0700
Delivery-date: Mon, 28 Jun 2010 08:52:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1277739919 -3600
# Node ID 059a12afce52a213db56bd8e9442d9eeadfdd34c
# Parent  7e46fdbe8a1187cee2ab609256300d7967f37f06
vtd: Only kill_timer() an init_timer()'ed timer.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/drivers/passthrough/io.c  |    2 +-
 xen/drivers/passthrough/pci.c |    4 +++-
 xen/include/xen/iommu.h       |    1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff -r 7e46fdbe8a11 -r 059a12afce52 xen/drivers/passthrough/io.c
--- a/xen/drivers/passthrough/io.c      Mon Jun 28 16:27:56 2010 +0100
+++ b/xen/drivers/passthrough/io.c      Mon Jun 28 16:45:19 2010 +0100
@@ -28,7 +28,7 @@
 
 static void hvm_dirq_assist(unsigned long _d);
 
-static int pt_irq_need_timer(uint32_t flags)
+bool_t pt_irq_need_timer(uint32_t flags)
 {
     return !(flags & (HVM_IRQ_DPCI_GUEST_MSI | HVM_IRQ_DPCI_TRANSLATE));
 }
diff -r 7e46fdbe8a11 -r 059a12afce52 xen/drivers/passthrough/pci.c
--- a/xen/drivers/passthrough/pci.c     Mon Jun 28 16:27:56 2010 +0100
+++ b/xen/drivers/passthrough/pci.c     Mon Jun 28 16:45:19 2010 +0100
@@ -260,7 +260,9 @@ static void pci_clean_dpci_irqs(struct d
               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 7e46fdbe8a11 -r 059a12afce52 xen/include/xen/iommu.h
--- a/xen/include/xen/iommu.h   Mon Jun 28 16:27:56 2010 +0100
+++ b/xen/include/xen/iommu.h   Mon Jun 28 16:45:19 2010 +0100
@@ -100,6 +100,7 @@ struct hvm_irq_dpci *domain_get_irq_dpci
 struct hvm_irq_dpci *domain_get_irq_dpci(struct domain *domain);
 int domain_set_irq_dpci(struct domain *domain, struct hvm_irq_dpci *dpci);
 void free_hvm_irq_dpci(struct hvm_irq_dpci *dpci);
+bool_t pt_irq_need_timer(uint32_t flags);
 
 #define PT_IRQ_TIME_OUT MILLISECS(8)
 #define VTDPREFIX "[VT-D]"

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] vtd: Only kill_timer() an init_timer()'ed timer., Xen patchbot-unstable <=