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

[Xen-ia64-devel] [PATCH 7/7] vti save-restore: make ia64 qemu-dm use of hvm param



# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1192602584 -32400
# Node ID 208908de6975954de268fdbc42db8067f5b64eeb
# Parent  11666b14a1102ad8e8558cf79b4206c0a9a7682a
make ia64 qemu-dm use of hvm param.
use xc_get_hvm_param()
PATCHNAME: ia64_qemu_dm_boot_use_xc_get_hvm_param

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 11666b14a110 -r 208908de6975 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Mon Oct 22 11:51:17 2007 +0900
+++ b/tools/ioemu/vl.c  Wed Oct 17 15:29:44 2007 +0900
@@ -7807,25 +7807,40 @@ int main(int argc, char **argv)
 
 #elif defined(__ia64__)
 
-    nr_pages = ram_size/PAGE_SIZE;
+    xc_get_hvm_param(xc_handle, domid, HVM_PARAM_IOREQ_PFN, &ioreq_pfn);
+    fprintf(logfile, "shared page at pfn %lx\n", ioreq_pfn);
+    shared_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
+                                       PROT_READ|PROT_WRITE, ioreq_pfn);
+    if (shared_page == NULL) {
+        fprintf(logfile, "map shared IO page returned error %d\n", errno);
+        exit(-1);
+    }
+    
+    xc_get_hvm_param(xc_handle, domid, HVM_PARAM_BUFIOREQ_PFN, &ioreq_pfn);
+    fprintf(logfile, "buffered io page at pfn %lx\n", ioreq_pfn);
+    buffered_io_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
+                                            PROT_READ|PROT_WRITE, ioreq_pfn);
+    if (buffered_io_page == NULL) {
+        fprintf(logfile, "map buffered IO page returned error %d\n", errno);
+        exit(-1);
+    }
+
+    xc_get_hvm_param(xc_handle, domid, HVM_PARAM_BUFPIOREQ_PFN, &ioreq_pfn);
+    fprintf(logfile, "buffered pio page at pfn %lx\n", ioreq_pfn);
+    buffered_pio_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
+                                            PROT_READ|PROT_WRITE, ioreq_pfn);
+    if (buffered_pio_page == NULL) {
+        fprintf(logfile, "map buffered PIO page returned error %d\n", errno);
+        exit(-1);
+    }
+
+    nr_pages = ram_size / PAGE_SIZE;
 
     page_array = (xen_pfn_t *)malloc(nr_pages * sizeof(xen_pfn_t));
     if (page_array == NULL) {
         fprintf(logfile, "malloc returned error %d\n", errno);
         exit(-1);
     }
-
-    shared_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
-                                       PROT_READ|PROT_WRITE,
-                                       IO_PAGE_START >> PAGE_SHIFT);
-
-    buffered_io_page =xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
-                                       PROT_READ|PROT_WRITE,
-                                       BUFFER_IO_PAGE_START >> PAGE_SHIFT);
-
-    buffered_pio_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
-                                       PROT_READ|PROT_WRITE,
-                                       BUFFER_PIO_PAGE_START >> PAGE_SHIFT);
 
     for (i = 0; i < nr_pages; i++)
         page_array[i] = i;

Attachment: 16185_208908de6975_ia64_qemu_dm_boot_use_xc_get_hvm_param.patch
Description: Text Data

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

 


Rackspace

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