|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] libxl: avoid bringing up vcpus already online
Avoid sending duplicated qmp commands and eliminate the confusing error
messages like "Unable to add CPU: 0, it already exists".
Signed-off-by: Chao Peng <chao.p.peng@xxxxxxxxxxxxxxx>
---
tools/libxl/libxl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index f7961f6..d040e5c 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -5450,7 +5450,7 @@ static int libxl__set_vcpuonline_qmp(libxl__gc *gc,
uint32_t domid,
LOGE(ERROR, "getting domain info list");
return ERROR_FAIL;
}
- for (i = 0; i <= info.vcpu_max_id; i++) {
+ for (i = info.vcpu_online; i <= info.vcpu_max_id; i++) {
if (libxl_bitmap_test(cpumap, i)) {
/* Return value is ignore because it does not tell anything useful
* on the completion of the command.
--
1.7.9.5
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |