debuggers.hg

changeset 20987:0a1b69afe754

Fix a small bug about HVM_MAX_VCPUS related array

Currently it doesn't block running, anyway, it better fix the small
bug considering if in the future HVM_MAX_VCPUS will not necessarily be
8x value.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>=
author Keir Fraser <keir.fraser@citrix.com>
date Mon Feb 15 08:15:08 2010 +0000 (2010-02-15)
parents 8a8392a84280
children 714a3152102c
files tools/python/xen/lowlevel/xc/xc.c xen/include/public/hvm/hvm_info_table.h
line diff
     1.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Mon Feb 15 08:14:21 2010 +0000
     1.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Mon Feb 15 08:15:08 2010 +0000
     1.3 @@ -916,7 +916,7 @@ static PyObject *pyxc_hvm_build(XcObject
     1.4      char *image;
     1.5      int memsize, target=-1, vcpus = 1, acpi = 0, apic = 1;
     1.6      PyObject *vcpu_avail_handle = NULL;
     1.7 -    uint8_t vcpu_avail[HVM_MAX_VCPUS/8];
     1.8 +    uint8_t vcpu_avail[(HVM_MAX_VCPUS + 7)/8];
     1.9  
    1.10      static char *kwd_list[] = { "domid",
    1.11                                  "memsize", "image", "target", "vcpus", 
     2.1 --- a/xen/include/public/hvm/hvm_info_table.h	Mon Feb 15 08:14:21 2010 +0000
     2.2 +++ b/xen/include/public/hvm/hvm_info_table.h	Mon Feb 15 08:15:08 2010 +0000
     2.3 @@ -69,7 +69,7 @@ struct hvm_info_table {
     2.4      uint32_t    high_mem_pgend;
     2.5  
     2.6      /* Bitmap of which CPUs are online at boot time. */
     2.7 -    uint8_t     vcpu_online[HVM_MAX_VCPUS/8];
     2.8 +    uint8_t     vcpu_online[(HVM_MAX_VCPUS + 7)/8];
     2.9  };
    2.10  
    2.11  #endif /* __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ */