[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC v1 67/74] libxl: libxl__build_hvm: Introduce separate b_info parameter



From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

When running pv-in-pvh, we are going to want to pass this function an
exciting config which is a mixture of the user's main domain
configuration, and some PVH configuration which we make up.

To this end, have libxl__build_hvm take, and honour, a separate
parameter for config->b_info.  Because it already has a convenience
alias, the change is trivial.

We add the obvious extra parameter at every call site.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl_create.c   | 4 ++--
 tools/libxl/libxl_dom.c      | 2 +-
 tools/libxl/libxl_internal.h | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index f15fb215c2..a837a7f5be 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -438,7 +438,7 @@ int libxl__domain_build(libxl__gc *gc,
 
     switch (info->type) {
     case LIBXL_DOMAIN_TYPE_HVM:
-        ret = libxl__build_hvm(gc, domid, d_config, state);
+        ret = libxl__build_hvm(gc, domid, d_config, &d_config->b_info, state);
         if (ret)
             goto out;
 
@@ -499,7 +499,7 @@ int libxl__domain_build(libxl__gc *gc,
 
         break;
     case LIBXL_DOMAIN_TYPE_PVH:
-        ret = libxl__build_hvm(gc, domid, d_config, state);
+        ret = libxl__build_hvm(gc, domid, d_config, &d_config->b_info, state);
         if (ret)
             goto out;
 
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index f04eec7c79..14a9a09958 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -1172,12 +1172,12 @@ out:
 
 int libxl__build_hvm(libxl__gc *gc, uint32_t domid,
               libxl_domain_config *d_config,
+              libxl_domain_build_info *info,
               libxl__domain_build_state *state)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);
     int rc;
     uint64_t mmio_start, lowmem_end, highmem_end, mem_size;
-    libxl_domain_build_info *const info = &d_config->b_info;
     struct xc_dom_image *dom = NULL;
     bool device_model = info->type == LIBXL_DOMAIN_TYPE_HVM ? true : false;
 
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index ef1b2e2ca1..15a3c33697 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -1160,6 +1160,7 @@ _hidden int libxl__build_pv(libxl__gc *gc, uint32_t domid,
              libxl_domain_build_info *info, libxl__domain_build_state *state);
 _hidden int libxl__build_hvm(libxl__gc *gc, uint32_t domid,
               libxl_domain_config *d_config,
+              libxl_domain_build_info *info,
               libxl__domain_build_state *state);
 
 _hidden int libxl__qemu_traditional_cmd(libxl__gc *gc, uint32_t domid,
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.