[XEN,for-4.13,1/6] libxl: Offer API versions 0x040700 and 0x040800
diff mbox series

Message ID 20191004151707.24844-2-ian.jackson@eu.citrix.com
State New
Headers show
Series
  • Drop/deprecate libxl_get_required_*_memory
Related show

Commit Message

Ian Jackson Oct. 4, 2019, 3:17 p.m. UTC
According to git log -G:

0x040700 was introduced in 304400459ef0 (aka 4.7.0-rc1~481)
  "tools/libxl: rename remus device to checkpoint device"

0x040800 was introduced in 57f8b13c7240 (aka 4.8.0-rc1~437)
  "libxl: memory size in kb requires 64 bit variable"

It is surprising that no-one noticed this.  I wonder if anyone is
using our LIBXL_API_VERSION facility.  If not maybe we should take a
different approach.

Anyway, in the meantime, we should fix this.  Backporting this is
probably a good idea: it won't change the behaviour for existing
callers but it will avoid errors for some older correct uses.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 tools/libxl/libxl.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Anthony PERARD Oct. 4, 2019, 3:33 p.m. UTC | #1
On Fri, Oct 04, 2019 at 04:17:02PM +0100, Ian Jackson wrote:
> According to git log -G:
> 
> 0x040700 was introduced in 304400459ef0 (aka 4.7.0-rc1~481)
>   "tools/libxl: rename remus device to checkpoint device"
> 
> 0x040800 was introduced in 57f8b13c7240 (aka 4.8.0-rc1~437)
>   "libxl: memory size in kb requires 64 bit variable"
> 
> It is surprising that no-one noticed this.  I wonder if anyone is
> using our LIBXL_API_VERSION facility.  If not maybe we should take a
> different approach.

Libvirt does use it. I think it's currently set to 4.5.

> Anyway, in the meantime, we should fix this.  Backporting this is
> probably a good idea: it won't change the behaviour for existing
> callers but it will avoid errors for some older correct uses.
> 
> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

> ---
>  tools/libxl/libxl.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
> index 2555e9cd3b..518fc9e47f 100644
> --- a/tools/libxl/libxl.h
> +++ b/tools/libxl/libxl.h
> @@ -655,6 +655,7 @@ typedef struct libxl__ctx libxl_ctx;
>  #ifdef LIBXL_API_VERSION
>  #if LIBXL_API_VERSION != 0x040200 && LIBXL_API_VERSION != 0x040300 && \
>      LIBXL_API_VERSION != 0x040400 && LIBXL_API_VERSION != 0x040500 && \
> +    LIBXL_API_VERSION != 0x040700 && LIBXL_API_VERSION != 0x040800 && \
>      LIBXL_API_VERSION != 0x041300
>  #error Unknown LIBXL_API_VERSION
>  #endif
Ian Jackson Oct. 4, 2019, 4:08 p.m. UTC | #2
Anthony PERARD writes ("Re: [XEN PATCH for-4.13 1/6] libxl: Offer API versions 0x040700 and 0x040800"):
> On Fri, Oct 04, 2019 at 04:17:02PM +0100, Ian Jackson wrote:
> > It is surprising that no-one noticed this.  I wonder if anyone is
> > using our LIBXL_API_VERSION facility.  If not maybe we should take a
> > different approach.
> 
> Libvirt does use it. I think it's currently set to 4.5.

Ah.  I have adjusted the commit message somewhat.

> > Anyway, in the meantime, we should fix this.  Backporting this is
> > probably a good idea: it won't change the behaviour for existing
> > callers but it will avoid errors for some older correct uses.
> > 
> > Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,
Ian.

Patch
diff mbox series

diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index 2555e9cd3b..518fc9e47f 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -655,6 +655,7 @@  typedef struct libxl__ctx libxl_ctx;
 #ifdef LIBXL_API_VERSION
 #if LIBXL_API_VERSION != 0x040200 && LIBXL_API_VERSION != 0x040300 && \
     LIBXL_API_VERSION != 0x040400 && LIBXL_API_VERSION != 0x040500 && \
+    LIBXL_API_VERSION != 0x040700 && LIBXL_API_VERSION != 0x040800 && \
     LIBXL_API_VERSION != 0x041300
 #error Unknown LIBXL_API_VERSION
 #endif