[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen
On Wed, 2012-07-25 at 17:45 +0100, Ian Campbell wrote: > On Tue, 2012-07-24 at 11:30 +0100, Ian Jackson wrote: > > Ian Campbell writes ("Re: [Xen-devel] [PATCH] Rlibxl: refuse to try and > > migrate an HVM guest using qemu-xen"): > > > Actually I think -1 == INVALID would be wrong, the -1 here really means > > > something went wrong internally to libxl. Anyway, I remember now that > > > the reason I did it this was was to avoid the need to rewrite the other > > > callsites for 4.2. In 4.3 we should make > > > libxl__device_model_version_running return ERROR_foo or something valid, > > > and perhaps add 0 == UNKNOWN as a member of the enum. > > > > Yes. > > > > > For now I think this will do: > > .. > > > libxl: refuse to try and migrate an HVM guest using qemu-xen > > > > > > libxl/qemu-upstream currently do not collude together to enable log-dirty > > > mode > > > and therefore migrations are unsafe. Refuse to even try for now. > > > > Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > > Applied, thanks. Right after I pushed I noticed that gcc 4.6.2 (which is not the one I typically use for commit testing) fails with: libxl.c: In function âlibxl_domain_suspendâ: libxl.c:778:9: error: case value â4294967295â not in enumerated type âlibxl_device_model_versionâ [-Werror=switch] Whereas 4.4.5 (which is my typical commit test and day to day gcc) does not. I have pushed the following additional patch to fix this up, tested with 4.4.5 and 4.6.2. 8<--------------- From 365636cac708d4af0907503c07bec530b2dd3a03 Mon Sep 17 00:00:00 2001 From: Ian Campbell <ian.campbell@xxxxxxxxxx> Date: Wed, 25 Jul 2012 17:52:12 +0100 Subject: [PATCH] libxl: libxl__device_model_version_running should return an int MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On error it returns -1 and therefore it needs to return int and not libxl_device_model_enum. Otherwise gcc 4.6.2 complains: libxl.c: In function âlibxl_domain_suspendâ: libxl.c:778:9: error: case value â4294967295â not in enumerated type âlibxl_device_model_versionâ [-Werror=switch] Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxl/libxl_internal.c | 3 +-- tools/libxl/libxl_internal.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c index fbff7d0..24099f5 100644 --- a/tools/libxl/libxl_internal.c +++ b/tools/libxl/libxl_internal.c @@ -330,8 +330,7 @@ out: return rc; } -libxl_device_model_version libxl__device_model_version_running(libxl__gc *gc, - uint32_t domid) +int libxl__device_model_version_running(libxl__gc *gc, uint32_t domid) { char *path = NULL; char *dm_version = NULL; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 9ffb9d4..1b9b417 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1515,8 +1515,7 @@ _hidden libxl__json_object *libxl__json_parse(libxl__gc *gc, const char *s); /* Based on /local/domain/$domid/dm-version xenstore key * default is qemu xen traditional */ -_hidden libxl_device_model_version -libxl__device_model_version_running(libxl__gc *gc, uint32_t domid); +_hidden int libxl__device_model_version_running(libxl__gc *gc, uint32_t domid); /* -- 1.7.2.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |