|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] "xl vcpu-set" not persistent across reboot?
On Fri, Jun 03, 2016 at 08:42:11AM -0600, Jan Beulich wrote:
> >>> On 03.06.16 at 15:41, <wei.liu2@xxxxxxxxxx> wrote:
> > On Fri, Jun 03, 2016 at 02:29:12AM -0600, Jan Beulich wrote:
> >> Ian, Wei,
> >>
> >> is it intentional that rebooting a (HVM) guest after having altered its
> >> vCPU count will reset it back to the vCPU count it was originally
> >> started with? That doesn't seem very natural - if one hotplugs a CPU
> >> into a physical system and then reboots, that CPU will remain there.
> >>
> >
> > This is probably an oversight.
> >
> > I've added this to my list of things to look at after the release.
>
> Thanks!
>
I got a patch ready. But QEMU upstream refuses to start on the receiving end
with following error message:
qemu-system-i386: Unknown savevm section or instance 'cpu_common' 1
qemu-system-i386: load of migration failed: Invalid argument
With QEMU traditional HVM guest and PV guest, the guest works fine -- up
and running with all hot plugged cpus available.
So I think the relevant libxl information is transmitted but we also
need to fix QEMU upstream. But that's a separate issue.
Wei.
---8<---
From 790ff77c6307b341dec0b4cc5e2d394e42f82e7c Mon Sep 17 00:00:00 2001
From: Wei Liu <wei.liu2@xxxxxxxxxx>
Date: Fri, 3 Jun 2016 16:38:32 +0100
Subject: [PATCH] libxl: update vcpus bitmap in retrieved geust config
... because the available vcpu bitmap can change during domain life time
due to cpu hotplug and unplug.
Reported-by: Jan Beulich <jbeulich@xxxxxxxx>
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
tools/libxl/libxl.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 006b83f..99617f3 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -7270,6 +7270,37 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx,
uint32_t domid,
libxl_dominfo_dispose(&info);
}
+ /* VCPUs */
+ {
+ libxl_vcpuinfo *vcpus;
+ libxl_bitmap *map;
+ int nr_vcpus, nr_cpus;
+ unsigned int i;
+
+ vcpus = libxl_list_vcpu(ctx, domid, &nr_vcpus, &nr_cpus);
+ if (!vcpus) {
+ LOG(ERROR, "fail to get vcpu list for domain %d", domid);
+ rc = ERROR_FAIL;
+ goto out;
+ }
+
+ /* Update the avail_vcpus bitmap accordingly */
+ map = &d_config->b_info.avail_vcpus;
+
+ libxl_bitmap_dispose(map);
+
+ libxl_bitmap_alloc(ctx, map, nr_vcpus);
+
+ libxl_bitmap_init(map);
+
+ for (i = 0; i < nr_vcpus; i++) {
+ if (vcpus[i].online)
+ libxl_bitmap_set(map, i);
+ }
+
+ libxl_vcpuinfo_list_free(vcpus, nr_vcpus);
+ }
+
/* Memory limits:
*
* Currently there are three memory limits:
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |