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

[Xen-changelog] [xen-unstable] Accelerate IDE PIO on HVM/IA64 [2/3]



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1172590464 0
# Node ID e450a3b90aba125a5e85fc6ec375678618b26538
# Parent  b0f663e668d9e25c9c577f7a2100d9b3286101cd
Accelerate IDE PIO on HVM/IA64 [2/3]

Add one more page to the guest for IDE PIO.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
---
 tools/libxc/ia64/xc_ia64_hvm_build.c |   14 +++++++++++---
 tools/python/xen/xend/image.py       |    4 ++--
 2 files changed, 13 insertions(+), 5 deletions(-)

diff -r b0f663e668d9 -r e450a3b90aba tools/libxc/ia64/xc_ia64_hvm_build.c
--- a/tools/libxc/ia64/xc_ia64_hvm_build.c      Tue Feb 27 15:33:25 2007 +0000
+++ b/tools/libxc/ia64/xc_ia64_hvm_build.c      Tue Feb 27 15:34:24 2007 +0000
@@ -569,6 +569,7 @@ setup_guest(int xc_handle, uint32_t dom,
     xen_pfn_t *pfn_list;
     shared_iopage_t *sp;
     void *ioreq_buffer_page;
+    void *pio_buffer_page;
     unsigned long dom_memsize = memsize << 20;
     unsigned long nr_pages = memsize << (20 - PAGE_SHIFT);
     unsigned long vcpus;
@@ -628,9 +629,10 @@ setup_guest(int xc_handle, uint32_t dom,
 
     pfn_list[0] = IO_PAGE_START >> PAGE_SHIFT;
     pfn_list[1] = STORE_PAGE_START >> PAGE_SHIFT;
-    pfn_list[2] = BUFFER_IO_PAGE_START >> PAGE_SHIFT; 
-
-    rc = xc_domain_memory_populate_physmap(xc_handle, dom, 3,
+    pfn_list[2] = BUFFER_IO_PAGE_START >> PAGE_SHIFT;
+    pfn_list[3] = BUFFER_PIO_PAGE_START >> PAGE_SHIFT;
+
+    rc = xc_domain_memory_populate_physmap(xc_handle, dom, 4,
                                            0, 0, &pfn_list[0]);
     if (rc != 0) {
         PERROR("Could not allocate IO page or store page or buffer io 
page.\n");
@@ -684,6 +686,12 @@ setup_guest(int xc_handle, uint32_t dom,
                                              pfn_list[2]); 
     memset(ioreq_buffer_page,0,PAGE_SIZE);
     munmap(ioreq_buffer_page, PAGE_SIZE);
+
+    pio_buffer_page = xc_map_foreign_range(xc_handle, dom, PAGE_SIZE,
+                                           PROT_READ | PROT_WRITE,
+                                           pfn_list[3]);
+    memset(pio_buffer_page,0,PAGE_SIZE);
+    munmap(pio_buffer_page, PAGE_SIZE);
     free(pfn_list);
     return 0;
 
diff -r b0f663e668d9 -r e450a3b90aba tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Tue Feb 27 15:33:25 2007 +0000
+++ b/tools/python/xen/xend/image.py    Tue Feb 27 15:34:24 2007 +0000
@@ -572,8 +572,8 @@ class IA64_HVM_ImageHandler(HVMImageHand
 
     def getRequiredAvailableMemory(self, mem_kb):
         page_kb = 16
-        # ROM size for guest firmware, ioreq page and xenstore page
-        extra_pages = 1024 + 3
+        # ROM size for guest firmware, ioreq page, pio page and xenstore page
+        extra_pages = 1024 + 4
         return mem_kb + extra_pages * page_kb
 
     def getRequiredInitialReservation(self):

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


 


Rackspace

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