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] Handle IOMMU pagetable allocations when s

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Handle IOMMU pagetable allocations when set_p2m_entry is called with
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 May 2008 08:20:13 -0700
Delivery-date: Wed, 21 May 2008 08:20:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 1211364443 -3600
# Node ID 70ca37d228951e98fdf2b5f9bd5883a04321c2c8
# Parent  ff23c9a11085dce8c5b2e3b692cde86cd87698a7
Handle IOMMU pagetable allocations when set_p2m_entry is called with
non-zero page order.
Signed-off-by: Xin Xiaohui <xiaohui.xin@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/mm/p2m.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff -r ff23c9a11085 -r 70ca37d22895 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Wed May 21 11:02:51 2008 +0100
+++ b/xen/arch/x86/mm/p2m.c     Wed May 21 11:07:23 2008 +0100
@@ -250,7 +250,7 @@ p2m_set_entry(struct domain *d, unsigned
     // XXX -- this might be able to be faster iff current->domain == d
     mfn_t table_mfn = pagetable_get_mfn(d->arch.phys_table);
     void *table =map_domain_page(mfn_x(table_mfn));
-    unsigned long gfn_remainder = gfn;
+    unsigned long i, gfn_remainder = gfn;
     l1_pgentry_t *p2m_entry;
     l1_pgentry_t entry_content;
     l2_pgentry_t l2e_content;
@@ -328,9 +328,11 @@ p2m_set_entry(struct domain *d, unsigned
     if ( iommu_enabled && is_hvm_domain(d) )
     {
         if ( p2mt == p2m_ram_rw )
-            iommu_map_page(d, gfn, mfn_x(mfn));
+            for ( i = 0; i < (1UL << page_order); i++ )
+                iommu_map_page(d, gfn+i, mfn_x(mfn)+i );
         else
-            iommu_unmap_page(d, gfn);
+            for ( int i = 0; i < (1UL << page_order); i++ )
+                iommu_unmap_page(d, gfn+i);
     }
 
     /* Success */

_______________________________________________
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] Handle IOMMU pagetable allocations when set_p2m_entry is called with, Xen patchbot-unstable <=