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] [IA64] allow __assign_domain_page() to as

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] allow __assign_domain_page() to assign real MMIO page over _PAGE_IO.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 01 Dec 2008 03:50:25 -0800
Delivery-date: Mon, 01 Dec 2008 03:51:43 -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 Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1224815889 -32400
# Node ID 7ad8c47f5c4b5ef43ec71cb946c39b08eeac3d18
# Parent  02c8733e2d91557a98b6964bfb7e136f0e3924d4
[IA64] allow __assign_domain_page() to assign real MMIO page over _PAGE_IO.

When VTD is enabled on HVM domain,
P2M entry may change from _PAGE_IO to real MMIO page.

Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
---
 xen/arch/ia64/xen/mm.c |    8 ++++++++
 1 files changed, 8 insertions(+)

diff -r 02c8733e2d91 -r 7ad8c47f5c4b xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Wed Oct 22 17:20:15 2008 +0900
+++ b/xen/arch/ia64/xen/mm.c    Fri Oct 24 11:38:09 2008 +0900
@@ -917,10 +917,18 @@ __assign_domain_page(struct domain *d,
 
     old_pte = __pte(0);
     new_pte = pfn_pte(physaddr >> PAGE_SHIFT, __pgprot(prot));
+ again_hvm_page_io:
     ret_pte = ptep_cmpxchg_rel(&d->arch.mm, mpaddr, pte, old_pte, new_pte);
     if (pte_val(ret_pte) == pte_val(old_pte)) {
         smp_mb();
         return 0;
+    }
+    /* in HVM guest, when VTD is enabled,
+     * P2M entry may change from _PAGE_IO type to real MMIO page 
+     */
+    if(VMX_DOMAIN(d->vcpu[0]) && (pte_val(ret_pte) & _PAGE_IO)) {
+        old_pte = ret_pte;
+        goto again_hvm_page_io;
     }
 
     // dom0 tries to map real machine's I/O region, but failed.

_______________________________________________
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] [IA64] allow __assign_domain_page() to assign real MMIO page over _PAGE_IO., Xen patchbot-unstable <=