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] vt-d: Fix double spin_lock_irqsave().

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] vt-d: Fix double spin_lock_irqsave().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 10 Jul 2008 08:10:09 -0700
Delivery-date: Thu, 10 Jul 2008 08:10:23 -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 1215680852 -3600
# Node ID a891e0f6ff189647a96e810c47602ff419c7bf22
# Parent  463e410fb0fdab3d79c1f3139028acd90b9498af
vt-d: Fix double spin_lock_irqsave().

The duplicate spin_lock_irqsave() flushes the original EFLAGS saved,
and thus disables local irqs permanently.

Signed-off-by: Xin, Xiaohui <Xiaohui.xin@xxxxxxxxx>
Signed-off-by: Tian, Kevin <Kevin.Tian@xxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmx.c           |    3 +++
 xen/drivers/passthrough/vtd/qinval.c |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff -r 463e410fb0fd -r a891e0f6ff18 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Thu Jul 10 10:02:15 2008 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Thu Jul 10 10:07:32 2008 +0100
@@ -1086,7 +1086,10 @@ void ept_sync_domain(struct domain *d)
 {
     /* Only if using EPT and this domain has some VCPUs to dirty. */
     if ( d->arch.hvm_domain.hap_enabled && d->vcpu[0] )
+    {
+        ASSERT(local_irq_is_enabled());
         on_each_cpu(__ept_sync_domain, d, 1, 1);
+    }
 }
 
 static void __vmx_inject_exception(
diff -r 463e410fb0fd -r a891e0f6ff18 xen/drivers/passthrough/vtd/qinval.c
--- a/xen/drivers/passthrough/vtd/qinval.c      Thu Jul 10 10:02:15 2008 +0100
+++ b/xen/drivers/passthrough/vtd/qinval.c      Thu Jul 10 10:07:32 2008 +0100
@@ -190,13 +190,13 @@ static int queue_invalidate_wait(struct 
     struct qi_ctrl *qi_ctrl = iommu_qi_ctrl(iommu);
 
     spin_lock_irqsave(&qi_ctrl->qinval_poll_lock, flags);
-    spin_lock_irqsave(&iommu->register_lock, flags);
+    spin_lock(&iommu->register_lock);
     index = qinval_next_index(iommu);
     if ( *saddr == 1 )
         *saddr = 0;
     ret = gen_wait_dsc(iommu, index, iflag, sw, fn, sdata, saddr);
     ret |= qinval_update_qtail(iommu, index);
-    spin_unlock_irqrestore(&iommu->register_lock, flags);
+    spin_unlock(&iommu->register_lock);
 
     /* Now we don't support interrupt method */
     if ( sw )

_______________________________________________
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] vt-d: Fix double spin_lock_irqsave()., Xen patchbot-unstable <=