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] [qemu] Fix qemu memory access beyond 3G @

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [qemu] Fix qemu memory access beyond 3G @VTi side.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 04 Aug 2006 12:10:15 +0000
Delivery-date: Fri, 04 Aug 2006 05:12:56 -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 chris@xxxxxxxxxxxxxxxxxxxxxxxx
# Node ID a0b3cf802d99df9fccf7612caea735ddad9a0e54
# Parent  7e914d9cd7e661c2abe47fb957f52f47ff570ad6
[qemu] Fix qemu memory access beyond 3G @VTi side.

Signed-off-by: Zhang xiantao <xiantao.zhang@xxxxxxxxx>
---
 tools/ioemu/vl.c |   38 +++++++++++++++++++++++++-------------
 1 files changed, 25 insertions(+), 13 deletions(-)

diff -r 7e914d9cd7e6 -r a0b3cf802d99 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Fri Aug 04 10:43:02 2006 +0100
+++ b/tools/ioemu/vl.c  Fri Aug 04 10:52:25 2006 +0100
@@ -5783,6 +5783,11 @@ int main(int argc, char **argv)
     /* init the memory */
     phys_ram_size = ram_size + vga_ram_size + bios_size;
 
+#if defined (__ia64__)
+    if (ram_size > MMIO_START)
+       ram_size += 1 * MEM_G; /* skip 3G-4G MMIO, LEGACY_IO_SPACE etc. */
+#endif
+
 #ifdef CONFIG_DM
 
     nr_pages = ram_size/PAGE_SIZE;
@@ -5816,10 +5821,30 @@ int main(int argc, char **argv)
             (uint64_t)(page_array[nr_pages - 1]));
 
 #elif defined(__ia64__)
+  
+    if (xc_ia64_get_pfn_list(xc_handle, domid, page_array,
+                             IO_PAGE_START >> PAGE_SHIFT, 1) != 1) {
+        fprintf(logfile, "xc_ia64_get_pfn_list returned error %d\n", errno);
+        exit(-1);
+    }
+
+    shared_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
+                                       PROT_READ|PROT_WRITE,
+                                       page_array[0]);
+
+    fprintf(logfile, "shared page at pfn:%lx, mfn: %016lx\n",
+            IO_PAGE_START >> PAGE_SHIFT, page_array[0]);
+
     if (xc_ia64_get_pfn_list(xc_handle, domid,
                              page_array, 0, nr_pages) != nr_pages) {
         fprintf(logfile, "xc_ia64_get_pfn_list returned error %d\n", errno);
         exit(-1);
+    }
+
+    if (ram_size > MMIO_START) {       
+       for (i = 0 ; i < MEM_G >> PAGE_SHIFT; i++)
+           page_array[MMIO_START >> PAGE_SHIFT + i] =
+               page_array[IO_PAGE_START >> PAGE_SHIFT + 1];
     }
 
     phys_ram_base = xc_map_foreign_batch(xc_handle, domid,
@@ -5829,19 +5854,6 @@ int main(int argc, char **argv)
         fprintf(logfile, "xc_map_foreign_batch returned error %d\n", errno);
         exit(-1);
     }
-
-    if (xc_ia64_get_pfn_list(xc_handle, domid, page_array,
-                             IO_PAGE_START >> PAGE_SHIFT, 1) != 1){
-        fprintf(logfile, "xc_ia64_get_pfn_list returned error %d\n", errno);
-        exit(-1);
-    }
-
-    shared_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
-                                       PROT_READ|PROT_WRITE,
-                                       page_array[0]);
-
-    fprintf(logfile, "shared page at pfn:%lx, mfn: %016lx\n",
-            IO_PAGE_START >> PAGE_SHIFT, page_array[0]);
 #endif
 #else  /* !CONFIG_DM */
 

_______________________________________________
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] [qemu] Fix qemu memory access beyond 3G @VTi side., Xen patchbot-unstable <=