ia64/xen-unstable

changeset 14162:e450a3b90aba

Accelerate IDE PIO on HVM/IA64 [2/3]

Add one more page to the guest for IDE PIO.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Tue Feb 27 15:34:24 2007 +0000 (2007-02-27)
parents b0f663e668d9
children a9d246105752
files tools/libxc/ia64/xc_ia64_hvm_build.c tools/python/xen/xend/image.py
line diff
     1.1 --- a/tools/libxc/ia64/xc_ia64_hvm_build.c	Tue Feb 27 15:33:25 2007 +0000
     1.2 +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c	Tue Feb 27 15:34:24 2007 +0000
     1.3 @@ -569,6 +569,7 @@ setup_guest(int xc_handle, uint32_t dom,
     1.4      xen_pfn_t *pfn_list;
     1.5      shared_iopage_t *sp;
     1.6      void *ioreq_buffer_page;
     1.7 +    void *pio_buffer_page;
     1.8      unsigned long dom_memsize = memsize << 20;
     1.9      unsigned long nr_pages = memsize << (20 - PAGE_SHIFT);
    1.10      unsigned long vcpus;
    1.11 @@ -628,9 +629,10 @@ setup_guest(int xc_handle, uint32_t dom,
    1.12  
    1.13      pfn_list[0] = IO_PAGE_START >> PAGE_SHIFT;
    1.14      pfn_list[1] = STORE_PAGE_START >> PAGE_SHIFT;
    1.15 -    pfn_list[2] = BUFFER_IO_PAGE_START >> PAGE_SHIFT; 
    1.16 +    pfn_list[2] = BUFFER_IO_PAGE_START >> PAGE_SHIFT;
    1.17 +    pfn_list[3] = BUFFER_PIO_PAGE_START >> PAGE_SHIFT;
    1.18  
    1.19 -    rc = xc_domain_memory_populate_physmap(xc_handle, dom, 3,
    1.20 +    rc = xc_domain_memory_populate_physmap(xc_handle, dom, 4,
    1.21                                             0, 0, &pfn_list[0]);
    1.22      if (rc != 0) {
    1.23          PERROR("Could not allocate IO page or store page or buffer io page.\n");
    1.24 @@ -684,6 +686,12 @@ setup_guest(int xc_handle, uint32_t dom,
    1.25                                               pfn_list[2]); 
    1.26      memset(ioreq_buffer_page,0,PAGE_SIZE);
    1.27      munmap(ioreq_buffer_page, PAGE_SIZE);
    1.28 +
    1.29 +    pio_buffer_page = xc_map_foreign_range(xc_handle, dom, PAGE_SIZE,
    1.30 +                                           PROT_READ | PROT_WRITE,
    1.31 +                                           pfn_list[3]);
    1.32 +    memset(pio_buffer_page,0,PAGE_SIZE);
    1.33 +    munmap(pio_buffer_page, PAGE_SIZE);
    1.34      free(pfn_list);
    1.35      return 0;
    1.36  
     2.1 --- a/tools/python/xen/xend/image.py	Tue Feb 27 15:33:25 2007 +0000
     2.2 +++ b/tools/python/xen/xend/image.py	Tue Feb 27 15:34:24 2007 +0000
     2.3 @@ -572,8 +572,8 @@ class IA64_HVM_ImageHandler(HVMImageHand
     2.4  
     2.5      def getRequiredAvailableMemory(self, mem_kb):
     2.6          page_kb = 16
     2.7 -        # ROM size for guest firmware, ioreq page and xenstore page
     2.8 -        extra_pages = 1024 + 3
     2.9 +        # ROM size for guest firmware, ioreq page, pio page and xenstore page
    2.10 +        extra_pages = 1024 + 4
    2.11          return mem_kb + extra_pages * page_kb
    2.12  
    2.13      def getRequiredInitialReservation(self):