WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxl: pass device model info down into H

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: pass device model info down into HVM domain build functions.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 16 Jun 2011 11:11:46 +0100
Delivery-date: Thu, 16 Jun 2011 03:16:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1306257956 -3600
# Node ID fab5ae42dd439a1ed6d7294a0b13dc0729544c1b
# Parent  3cca0eb037664fccafc0fb289632d54ea10918fc
libxl: pass device model info down into HVM domain build functions.

The builder will soon need to know the device model version in order to select
the correct firmware.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 3cca0eb03766 -r fab5ae42dd43 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Tue May 24 18:24:58 2011 +0100
+++ b/tools/libxl/libxl_create.c        Tue May 24 18:25:56 2011 +0100
@@ -144,8 +144,11 @@
     return 0;
 }
 
-int libxl__domain_build(libxl__gc *gc, libxl_domain_build_info *info,
-                        uint32_t domid, libxl__domain_build_state *state)
+int libxl__domain_build(libxl__gc *gc,
+                        libxl_domain_build_info *info,
+                        libxl_device_model_info *dm_info,
+                        uint32_t domid,
+                        libxl__domain_build_state *state)
 {
     char **vments = NULL, **localents = NULL;
     struct timeval start_time;
@@ -158,7 +161,7 @@
     gettimeofday(&start_time, NULL);
 
     if (info->hvm) {
-        ret = libxl__build_hvm(gc, domid, info, state);
+        ret = libxl__build_hvm(gc, domid, info, dm_info, state);
         if (ret)
             goto out;
 
@@ -437,7 +440,7 @@
             free(dm_info->saved_state);
             dm_info->saved_state = NULL;
         }
-        ret = libxl__domain_build(gc, &d_config->b_info, domid, &state);
+        ret = libxl__domain_build(gc, &d_config->b_info, dm_info, domid, 
&state);
     }
 
     if (ret) {
diff -r 3cca0eb03766 -r fab5ae42dd43 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Tue May 24 18:24:58 2011 +0100
+++ b/tools/libxl/libxl_dm.c    Tue May 24 18:25:56 2011 +0100
@@ -611,7 +611,7 @@
     ret = libxl__domain_make(gc, &c_info, &domid);
     if (ret)
         goto out_free;
-    ret = libxl__domain_build(gc, &b_info, domid, &state);
+    ret = libxl__domain_build(gc, &b_info, info, domid, &state);
     if (ret)
         goto out_free;
 
diff -r 3cca0eb03766 -r fab5ae42dd43 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c   Tue May 24 18:24:58 2011 +0100
+++ b/tools/libxl/libxl_dom.c   Tue May 24 18:25:56 2011 +0100
@@ -270,7 +270,8 @@
 }
 
 static const char *libxl__domain_firmware(libxl__gc *gc,
-                                           libxl_domain_build_info *info)
+                                          libxl_domain_build_info *info,
+                                          libxl_device_model_info *dm_info)
 {
     return libxl__abs_path(gc,
                            info->u.hvm.firmware ? : "hvmloader",
@@ -278,7 +279,9 @@
 }
 
 int libxl__build_hvm(libxl__gc *gc, uint32_t domid,
-              libxl_domain_build_info *info, libxl__domain_build_state *state)
+              libxl_domain_build_info *info,
+              libxl_device_model_info *dm_info,
+              libxl__domain_build_state *state)
 {
     libxl_ctx *ctx = libxl__gc_owner(gc);
     int ret, rc = ERROR_INVAL;
@@ -289,7 +292,7 @@
         domid,
         (info->max_memkb - info->video_memkb) / 1024,
         (info->target_memkb - info->video_memkb) / 1024,
-        libxl__domain_firmware(gc, info));
+        libxl__domain_firmware(gc, info, dm_info));
     if (ret) {
         LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, ret, "hvm building failed");
         goto out;
diff -r 3cca0eb03766 -r fab5ae42dd43 tools/libxl/libxl_internal.h
--- a/tools/libxl/libxl_internal.h      Tue May 24 18:24:58 2011 +0100
+++ b/tools/libxl/libxl_internal.h      Tue May 24 18:25:56 2011 +0100
@@ -186,7 +186,9 @@
 _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_build_info *info, libxl__domain_build_state *state);
+              libxl_domain_build_info *info,
+              libxl_device_model_info *dm_info,
+              libxl__domain_build_state *state);
 
 _hidden int libxl__domain_rename(libxl__gc *gc, uint32_t domid,
                                  const char *old_name, const char *new_name,
@@ -245,7 +247,9 @@
 
 /* from xl_create */
 _hidden int libxl__domain_make(libxl__gc *gc, libxl_domain_create_info *info, 
uint32_t *domid);
-_hidden int libxl__domain_build(libxl__gc *gc, libxl_domain_build_info *info,
+_hidden int libxl__domain_build(libxl__gc *gc,
+                                libxl_domain_build_info *info,
+                                libxl_device_model_info *dm_info,
                                 uint32_t domid,
                                 libxl__domain_build_state *state);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: pass device model info down into HVM domain build functions., Xen patchbot-unstable <=