ia64/xen-unstable

changeset 18215:a23f0d91e2fc

hvm builder: Cleaner sp_extents allocation

We do not need more than count elements in the sp_extents array.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jul 31 12:38:32 2008 +0100 (2008-07-31)
parents a09df7d4e94e
children 8182a85460f7
files tools/libxc/xc_hvm_build.c
line diff
     1.1 --- a/tools/libxc/xc_hvm_build.c	Thu Jul 31 12:11:00 2008 +0100
     1.2 +++ b/tools/libxc/xc_hvm_build.c	Thu Jul 31 12:38:32 2008 +0100
     1.3 @@ -229,7 +229,7 @@ static int setup_guest(int xc_handle,
     1.4          if ( ((count | cur_pages) & (SUPERPAGE_NR_PFNS - 1)) == 0 )
     1.5          {
     1.6              long done;
     1.7 -            xen_pfn_t sp_extents[2048 >> SUPERPAGE_PFN_SHIFT];
     1.8 +            xen_pfn_t sp_extents[count >> SUPERPAGE_PFN_SHIFT];
     1.9              struct xen_memory_reservation sp_req = {
    1.10                  .nr_extents   = count >> SUPERPAGE_PFN_SHIFT,
    1.11                  .extent_order = SUPERPAGE_PFN_SHIFT,