direct-io.hg

changeset 12429:6f3b4d6b04f5

[IA64] fix VTI boot

workaroud patch for memory initial interface

Signed-off-by: zhang xiantao <xiantao.zhang@intel.com>
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
author awilliam@xenbuild.aw
date Fri Nov 10 11:14:51 2006 -0700 (2006-11-10)
parents 0361efd32d4d
children 51be39239c47
files tools/libxc/ia64/xc_ia64_hvm_build.c
line diff
     1.1 --- a/tools/libxc/ia64/xc_ia64_hvm_build.c	Fri Nov 10 11:14:47 2006 -0700
     1.2 +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c	Fri Nov 10 11:14:51 2006 -0700
     1.3 @@ -554,14 +554,28 @@ setup_guest(int xc_handle, uint32_t dom,
     1.4      unsigned long page_array[3];
     1.5      shared_iopage_t *sp;
     1.6      void *ioreq_buffer_page;
     1.7 -    unsigned long dom_memsize = (memsize << 20);
     1.8 +    // memsize = required memsize(in configure file) + 16M
     1.9 +    // dom_memsize will pass to xc_ia64_build_hob(), so must be subbed 16M 
    1.10 +    unsigned long dom_memsize = ((memsize - 16) << 20);
    1.11 +    unsigned long nr_pages = (unsigned long)memsize << (20 - PAGE_SHIFT);
    1.12 +    int rc;
    1.13      DECLARE_DOMCTL;
    1.14  
    1.15 +    // ROM size for guest firmware, ioreq page and xenstore page
    1.16 +    nr_pages += 3; 
    1.17 +
    1.18      if ((image_size > 12 * MEM_M) || (image_size & (PAGE_SIZE - 1))) {
    1.19          PERROR("Guest firmware size is incorrect [%ld]?", image_size);
    1.20          return -1;
    1.21      }
    1.22  
    1.23 +    rc = xc_domain_memory_increase_reservation(xc_handle, dom, nr_pages,
    1.24 +                                               0, 0, NULL); 
    1.25 +    if (rc != 0) {
    1.26 +        PERROR("Could not allocate memory for HVM guest.\n");
    1.27 +        goto error_out;
    1.28 +    }
    1.29 +
    1.30      /* This will creates the physmap.  */
    1.31      domctl.u.arch_setup.flags = XEN_DOMAINSETUP_hvm_guest;
    1.32      domctl.u.arch_setup.bp = 0;