[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] vt-d: fix wrong addr in IOTLB invalidation descriptor


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Zhang, Yang Z" <yang.z.zhang@xxxxxxxxx>
  • Date: Wed, 11 Jul 2012 00:58:37 +0000
  • Accept-language: en-US
  • Delivery-date: Wed, 11 Jul 2012 00:59:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac1fAE4TKAE9L2o8S7KWhsV9VzdLKA==
  • Thread-topic: [PATCH] vt-d: fix wrong addr in IOTLB invalidation descriptor

According to vt-d specs, the addr in IOTLB invalidation descriptor should be 4K 
page aligned.

Signed-off-by: Yang Zhang <yang.z.zhang@xxxxxxxxx>

diff -r 0455d8317631 xen/drivers/passthrough/vtd/qinval.c
--- a/xen/drivers/passthrough/vtd/qinval.c      Thu Jun 28 18:43:28 2012 +0100
+++ b/xen/drivers/passthrough/vtd/qinval.c      Wed Jul 11 08:43:24 2012 +0800
@@ -140,7 +140,7 @@ static int gen_iotlb_inv_dsc(struct iomm
     qinval_entry->q.iotlb_inv_dsc.hi.am = am;
     qinval_entry->q.iotlb_inv_dsc.hi.ih = ih;
     qinval_entry->q.iotlb_inv_dsc.hi.res_1 = 0;
-    qinval_entry->q.iotlb_inv_dsc.hi.addr = addr;
+    qinval_entry->q.iotlb_inv_dsc.hi.addr = addr >> PAGE_SHIFT_4K;

     unmap_vtd_domain_page(qinval_entries);
     spin_unlock_irqrestore(&qi_ctrl->qinval_lock, flags);


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.