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: fix/cleanup minor issues with multi-

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] vtd: fix/cleanup minor issues with multi-page qinval support
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Feb 2009 07:15:14 -0800
Delivery-date: Wed, 18 Feb 2009 07:14:59 -0800
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 1234947476 0
# Node ID c3a307f5a14b2b10e8e34afcc1cf42fe3f2f2737
# Parent  08da408254c6440f01ebc7ee962c16c1d8d3f079
vtd: fix/cleanup minor issues with multi-page qinval support

Remove MAX_QINVAL_PAGES.  Rely on whoever changes NUM_QINVAL_PAGES to
change corresponding IQA_REG_QS value also.

Signed-off-by: Allen Kay <allen.m.kay@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/iommu.h  |    2 +-
 xen/drivers/passthrough/vtd/qinval.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff -r 08da408254c6 -r c3a307f5a14b xen/drivers/passthrough/vtd/iommu.h
--- a/xen/drivers/passthrough/vtd/iommu.h       Wed Feb 18 08:56:31 2009 +0000
+++ b/xen/drivers/passthrough/vtd/iommu.h       Wed Feb 18 08:57:56 2009 +0000
@@ -397,8 +397,8 @@ struct poll_info {
     u32 udata;
 };
 
-#define MAX_QINVAL_PAGES 8
 #define NUM_QINVAL_PAGES 1
+#define IQA_REG_QS       0    // derived from NUM_QINVAL_PAGES per VT-d spec.
 #define QINVAL_ENTRY_NR (PAGE_SIZE_4K*NUM_QINVAL_PAGES/sizeof(struct 
qinval_entry))
 #define qinval_present(v) ((v).lo & 1)
 #define qinval_fault_disable(v) (((v).lo >> 1) & 1)
diff -r 08da408254c6 -r c3a307f5a14b xen/drivers/passthrough/vtd/qinval.c
--- a/xen/drivers/passthrough/vtd/qinval.c      Wed Feb 18 08:56:31 2009 +0000
+++ b/xen/drivers/passthrough/vtd/qinval.c      Wed Feb 18 08:57:56 2009 +0000
@@ -445,8 +445,7 @@ int qinval_setup(struct iommu *iommu)
      * registers are automatically reset to 0 with write
      * to IQA register.
      */
-    if ( NUM_QINVAL_PAGES <= MAX_QINVAL_PAGES )
-        qi_ctrl->qinval_maddr |= NUM_QINVAL_PAGES - 1;
+    qi_ctrl->qinval_maddr |= IQA_REG_QS;
     dmar_writeq(iommu->reg, DMAR_IQA_REG, qi_ctrl->qinval_maddr);
 
     /* enable queued invalidation hardware */

_______________________________________________
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: fix/cleanup minor issues with multi-page qinval support, Xen patchbot-unstable <=