tools/libxl: Modify libxl__arch_domain_init_hw_description...
authorMichal Orzel <michal.orzel@arm.com>
Fri, 15 Oct 2021 16:51:43 +0000 (17:51 +0100)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Fri, 15 Oct 2021 19:40:21 +0000 (12:40 -0700)
... to take a second argument of type libxl_domain_config*
rather than libxl_domain_build_info*.

We need to pass the whole libxl_domain_config
structure as this will be needed later on to modify
the libxl__prepare_dtb function to also take
libxl_domain_config.

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Suggested-by: Ian Jackson <iwj@xenproject.org>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
tools/libs/light/libxl_arch.h
tools/libs/light/libxl_arm.c
tools/libs/light/libxl_dom.c
tools/libs/light/libxl_x86.c

index 8527fc5c6c236337485935442160a78463c27ee9..1522ecb97f725f304c6f4951f371f229dfc23b38 100644 (file)
@@ -38,7 +38,7 @@ int libxl__arch_domain_create(libxl__gc *gc,
 /* setup arch specific hardware description, i.e. DTB on ARM */
 _hidden
 int libxl__arch_domain_init_hw_description(libxl__gc *gc,
-                                           libxl_domain_build_info *info,
+                                           libxl_domain_config *d_config,
                                            libxl__domain_build_state *state,
                                            struct xc_dom_image *dom);
 /* finalize arch specific hardware description. */
index a7801558cf7a461fd03ca4f77f45dfa849752b09..d5771f98dd0df12f7eddf9ca050afd436bc34b12 100644 (file)
@@ -1016,12 +1016,13 @@ out:
 }
 
 int libxl__arch_domain_init_hw_description(libxl__gc *gc,
-                                           libxl_domain_build_info *info,
+                                           libxl_domain_config *d_config,
                                            libxl__domain_build_state *state,
                                            struct xc_dom_image *dom)
 {
     int rc;
     uint64_t val;
+    libxl_domain_build_info *const info = &d_config->b_info;
 
     if (info->type != LIBXL_DOMAIN_TYPE_PVH) {
         LOG(ERROR, "Unsupported Arm guest type %s",
index e9f58ee4b2b6f9f952601076a5a3094125c6bf21..fe9f760f714a9d0cf1a7e60e24f1e564cf8f0a0b 100644 (file)
@@ -571,7 +571,7 @@ static int libxl__build_dom(libxl__gc *gc, uint32_t domid,
         LOG(ERROR, "xc_dom_parse_image failed");
         goto out;
     }
-    if ( (ret = libxl__arch_domain_init_hw_description(gc, info, state, dom)) != 0 ) {
+    if ( (ret = libxl__arch_domain_init_hw_description(gc, d_config, state, dom)) != 0 ) {
         LOGE(ERROR, "libxl__arch_domain_init_hw_description failed");
         goto out;
     }
index 60838783151ca7d1c274999d82009d4ed76e9b1b..1feadebb1852f762083d762f4b4cdd53ab959eb5 100644 (file)
@@ -568,7 +568,7 @@ int libxl__arch_extra_memory(libxl__gc *gc,
 }
 
 int libxl__arch_domain_init_hw_description(libxl__gc *gc,
-                                           libxl_domain_build_info *info,
+                                           libxl_domain_config *d_config,
                                            libxl__domain_build_state *state,
                                            struct xc_dom_image *dom)
 {