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

[Xen-changelog] [xen-unstable] libxl: fix bug the number of running vcpu inconsistent with config file


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 24 Jul 2012 17:22:09 +0000
  • Delivery-date: Tue, 24 Jul 2012 17:22:19 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Zhang, Yang Z <yang.z.zhang@xxxxxxxxx>
# Date 1343122158 -3600
# Node ID 2fb65af3e859ac8d07c1dae4dc033948b0776f24
# Parent  8fb6a645b80eaf9d692bdc6653d5aa0eb4a8e28c
libxl: fix bug the number of running vcpu inconsistent with config file

The following patch will fix the bug 1825. 
http://bugzilla.xen.org/bugzilla/show_bug.cgi?id=1825

When using memcpy to update vcpu_online, the high bits of vcpu_online
may unmodified if the size of avail_vcpus less than vcpu_online. So we
need to clear it before the memory copying.

Signed-off-by: Yang Zhang <yang.z.zhang@xxxxxxxxx>
Acked-by: Ian Campbell <ian.campbelL@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r 8fb6a645b80e -r 2fb65af3e859 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c   Tue Jul 24 10:29:17 2012 +0100
+++ b/tools/libxl/libxl_dom.c   Tue Jul 24 10:29:18 2012 +0100
@@ -357,6 +357,7 @@ static int hvm_build_set_params(xc_inter
     va_hvm = (struct hvm_info_table *)(va_map + HVM_INFO_OFFSET);
     va_hvm->apic_mode = libxl_defbool_val(info->u.hvm.apic);
     va_hvm->nr_vcpus = info->max_vcpus;
+    memset(va_hvm->vcpu_online, 0, sizeof(va_hvm->vcpu_online));
     memcpy(va_hvm->vcpu_online, info->avail_vcpus.map, info->avail_vcpus.size);
     for (i = 0, sum = 0; i < va_hvm->length; i++)
         sum += ((uint8_t *) va_hvm)[i];

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.