]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
libxl: set the default grant/maptrack frames at structure init
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 9 Oct 2017 13:30:06 +0000 (14:30 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 9 Oct 2017 14:19:30 +0000 (15:19 +0100)
libxl_domain_build_info had both the maptrack and grant frames set to
0 by default, forcing the client of libxl to set a sane default.

This is not backwards compatible, so instead initialize both
max_grant_frames and max_maptrack_frames to a sane default (ie: like
previous behavior).

This fixes the libvirt tests in osstest.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.h
tools/libxl/libxl_types.idl

index e5ef92074333adfb5a5431c7ec22123b65d0cf34..f82b91e0c1384ef5e366cea77351659cadfba635 100644 (file)
  */
 #define LIBXL_HAVE_BUILDINFO_GRANT_LIMITS 1
 
+#define LIBXL_MAX_GRANT_FRAMES_DEFAULT 32
+#define LIBXL_MAX_MAPTRACK_FRAMES_DEFAULT 1024
+
 /*
  * LIBXL_HAVE_BUILDINFO_* indicates that libxl_domain_build_info has
  * the field represented by the '*'. The original position of those
index ade359e38714419124ea1285de707d7ef02d68f8..2d0bb8a2224734c33e71a6feee1bbc3303a9ff03 100644 (file)
@@ -480,8 +480,8 @@ libxl_domain_build_info = Struct("domain_build_info",[
 
     ("vnuma_nodes", Array(libxl_vnode_info, "num_vnuma_nodes")),
 
-    ("max_grant_frames",    uint32),
-    ("max_maptrack_frames", uint32),
+    ("max_grant_frames",    uint32, {'init_val': 'LIBXL_MAX_GRANT_FRAMES_DEFAULT'}),
+    ("max_maptrack_frames", uint32, {'init_val': 'LIBXL_MAX_MAPTRACK_FRAMES_DEFAULT'}),
     
     ("device_model_version", libxl_device_model_version),
     ("device_model_stubdomain", libxl_defbool),