Message ID | 1481930319-4796-10-git-send-email-boris.ostrovsky@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Dec 16, 2016 at 06:18:35PM -0500, Boris Ostrovsky wrote: > Currently HVM guests that use upstream qemu do not update xenstore's > availability entry for VCPUs. While it is not strictly necessary for > hotplug to work, xenstore end up reflecting actual status of VCPUs. > > Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Acked-by: Wei Liu <wei.liu2@citrix.com> This patch is self-contained, so I will just commit it at some point. I will wait a bit to see if there is objection. > --- > New in v5 > > tools/libxl/libxl.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c > index 6fd4fe1..bbbb3de 100644 > --- a/tools/libxl/libxl.c > +++ b/tools/libxl/libxl.c > @@ -5148,7 +5148,6 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap) > switch (libxl__device_model_version_running(gc, domid)) { > case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: > case LIBXL_DEVICE_MODEL_VERSION_NONE: > - rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap, &info); > break; > case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: > rc = libxl__set_vcpuonline_qmp(gc, domid, cpumap, &info); > @@ -5158,11 +5157,14 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap) > } > break; > case LIBXL_DOMAIN_TYPE_PV: > - rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap, &info); > break; > default: > rc = ERROR_INVAL; > } > + > + if (!rc) > + rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap, &info); > + > out: > libxl_dominfo_dispose(&info); > GC_FREE; > -- > 2.7.4 >
On 01/04/2017 05:34 AM, Wei Liu wrote: > On Fri, Dec 16, 2016 at 06:18:35PM -0500, Boris Ostrovsky wrote: >> Currently HVM guests that use upstream qemu do not update xenstore's >> availability entry for VCPUs. While it is not strictly necessary for >> hotplug to work, xenstore end up reflecting actual status of VCPUs. >> >> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> > Acked-by: Wei Liu <wei.liu2@citrix.com> > > This patch is self-contained, so I will just commit it at some point. I > will wait a bit to see if there is objection. > >> --- >> New in v5 Yes, this patch (but v6, which you also acked) can go in independent of the rest of the series, which is on hold for now. -boris >> >> tools/libxl/libxl.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c >> index 6fd4fe1..bbbb3de 100644 >> --- a/tools/libxl/libxl.c >> +++ b/tools/libxl/libxl.c >> @@ -5148,7 +5148,6 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap) >> switch (libxl__device_model_version_running(gc, domid)) { >> case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: >> case LIBXL_DEVICE_MODEL_VERSION_NONE: >> - rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap, &info); >> break; >> case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: >> rc = libxl__set_vcpuonline_qmp(gc, domid, cpumap, &info); >> @@ -5158,11 +5157,14 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap) >> } >> break; >> case LIBXL_DOMAIN_TYPE_PV: >> - rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap, &info); >> break; >> default: >> rc = ERROR_INVAL; >> } >> + >> + if (!rc) >> + rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap, &info); >> + >> out: >> libxl_dominfo_dispose(&info); >> GC_FREE; >> -- >> 2.7.4 >>
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 6fd4fe1..bbbb3de 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -5148,7 +5148,6 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap) switch (libxl__device_model_version_running(gc, domid)) { case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: case LIBXL_DEVICE_MODEL_VERSION_NONE: - rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap, &info); break; case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: rc = libxl__set_vcpuonline_qmp(gc, domid, cpumap, &info); @@ -5158,11 +5157,14 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap) } break; case LIBXL_DOMAIN_TYPE_PV: - rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap, &info); break; default: rc = ERROR_INVAL; } + + if (!rc) + rc = libxl__set_vcpuonline_xenstore(gc, domid, cpumap, &info); + out: libxl_dominfo_dispose(&info); GC_FREE;
Currently HVM guests that use upstream qemu do not update xenstore's availability entry for VCPUs. While it is not strictly necessary for hotplug to work, xenstore end up reflecting actual status of VCPUs. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> --- New in v5 tools/libxl/libxl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)