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-devel

[Xen-devel] [PATCH 03 of 32] tools: libxl: write selected BIOS to xensto

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 03 of 32] tools: libxl: write selected BIOS to xenstore
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Wed, 20 Apr 2011 17:15:22 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Wed, 20 Apr 2011 09:18:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1303316119@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1303316119@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1303315986 -3600
# Node ID 8eb5c6ebc5c95791e8c129e75030a7979c1e7f5d
# Parent  e8073053ef283658dd096f0846b0c438a29b6778
tools: libxl: write selected BIOS to xenstore.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r e8073053ef28 -r 8eb5c6ebc5c9 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Wed Apr 20 17:13:00 2011 +0100
+++ b/tools/libxl/libxl_dm.c    Wed Apr 20 17:13:06 2011 +0100
@@ -69,6 +69,16 @@ const char *libxl__domain_device_model(l
     return dm;
 }
 
+static char *libxl__domain_bios(libxl__gc *gc,
+                                libxl_device_model_info *info)
+{
+    switch (info->device_model_version) {
+    case 1: return libxl__strdup(gc, "rombios");
+    case 2: return libxl__strdup(gc, "rombios");
+    default:return NULL;
+    }
+}
+
 static char ** libxl__build_device_model_args_old(libxl__gc *gc,
                                                   const char *dm,
                                                   libxl_device_model_info 
*info,
@@ -753,6 +763,11 @@ int libxl__create_device_model(libxl__gc
         goto out;
     }
 
+    path = libxl__sprintf(gc, "/local/domain/%d/hvmloader", info->domid);
+    xs_mkdir(ctx->xsh, XBT_NULL, path);
+    libxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "%s/bios", path),
+                    libxl__domain_bios(gc, info));
+
     path = libxl__sprintf(gc, "/local/domain/0/device-model/%d", info->domid);
     xs_mkdir(ctx->xsh, XBT_NULL, path);
     libxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "%s/disable_pf", path), 
"%d", !info->xen_platform_pci);
@@ -875,6 +890,7 @@ int libxl__destroy_device_model(libxl__g
         }
     }
     xs_rm(ctx->xsh, XBT_NULL, libxl__sprintf(gc, 
"/local/domain/0/device-model/%d", domid));
+    xs_rm(ctx->xsh, XBT_NULL, libxl__sprintf(gc, "/local/domain/%d/hvmloader", 
domid));
 
 out:
     return ret;

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