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-ia64-devel

[Xen-ia64-devel] [PATCH]Fix the logic when deassign the mmio ranges for

To: "xen-ia64-devel@xxxxxxxxxxxxxxxxxxx" <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] [PATCH]Fix the logic when deassign the mmio ranges for vti-domain.
From: "Zhang, Xiantao" <xiantao.zhang@xxxxxxxxx>
Date: Tue, 3 Mar 2009 15:14:02 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Mon, 02 Mar 2009 23:14:51 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acmbz6FgR4qsitjjSLuvYXMhmjk9lQ==
Thread-topic: [PATCH]Fix the logic when deassign the mmio ranges for vti-domain.
PATCH: Fix the logic when deassign the mmio ranges for vti-domain.

When de-assign the mmio range, it should resume its original value
for p2m value, otherwise, it may fail to determin mmio range's type.

Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>

diff -r 67f2e14613ef xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Tue Feb 10 13:47:02 2009 +0800
+++ b/xen/arch/ia64/xen/mm.c    Tue Mar 03 15:04:54 2009 +0800
@@ -1508,8 +1508,14 @@ deassign_domain_mmio_page(struct domain 
         return -EINVAL;
     }
 
-    for (; addr < end; addr += PAGE_SIZE )
-        zap_domain_page_one(d, addr, 0, INVALID_MFN);
+    for (; addr < end; addr += PAGE_SIZE ) {
+       if (is_hvm_domain(d))
+            __assign_domain_page(d, addr, GPFN_LOW_MMIO << PAGE_SHIFT,
+                                                  ASSIGN_writable | ASSIGN_io);
+       else
+            zap_domain_page_one(d, addr, 0, INVALID_MFN);
+    }
+
     return 0;
 }
 

Attachment: fix_deassign_mmio.patch
Description: fix_deassign_mmio.patch

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