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 1/3] RFC: libxl: API changes re domain type (and keye

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 1/3] RFC: libxl: API changes re domain type (and keyed union semantics)
From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date: Tue, 12 Jul 2011 19:37:01 +0100
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Delivery-date: Tue, 12 Jul 2011 11:39:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1310495823-27077-1-git-send-email-ian.jackson@xxxxxxxxxxxxx>
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: <1310495823-27077-1-git-send-email-ian.jackson@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Give the HVM domain type the name "HVM" as is generally used in the
Xen universe, rather than "FV" which is not used elsewhere.

Keyed unions should be keyed off the individual union value, not off
an arbitrary expression.

Change the "hvm" field in domain_build_info to be called "type" and
have an appropriate enum type.

These are are incompatible changes to the API/ABI.

THIS PATCH IS AN RFC AND SHOULD NOT BE APPLIED.  It contains only the
suggested changes to libxl.idl, and not any of the necessary
implementation in the idl compiler nor consequential changes to libxl
and xl.
---
 tools/libxl/libxl.idl |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/libxl/libxl.idl b/tools/libxl/libxl.idl
index 6e39734..8fb883f 100644
--- a/tools/libxl/libxl.idl
+++ b/tools/libxl/libxl.idl
@@ -21,7 +21,7 @@ libxl_hwcap = Builtin("hwcap")
 #
 
 libxl_domain_type = Enumeration("domain_type", [
-    (1, "FV"),
+    (1, "HVM"),
     (2, "PV"),
     ])
 
@@ -158,9 +158,9 @@ libxl_domain_build_info = Struct("domain_build_info",[
     ("shadow_memkb",    uint32),
     ("disable_migrate", bool),
     ("cpuid",           libxl_cpuid_policy_list),
-    ("hvm",             bool),
-    ("u", KeyedUnion(None, "hvm",
-                [("hvm", "%s", Struct(None,
+    ("type",            libxl_domain_type),
+    ("u", KeyedUnion(None, "type",
+                [("hvm", Struct(None,
                                        [("firmware", string),
                                         ("pae", bool),
                                         ("apic", bool),
@@ -173,7 +173,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
                                         ("timer_mode", integer),
                                         ("nested_hvm", bool),
                                         ])),
-                 ("pv", "!%s", Struct(None,
+                 ("pv", Struct(None,
                                        [("kernel", libxl_file_reference),
                                         ("slack_memkb", uint32),
                                         ("bootloader", string),
-- 
1.5.6.5


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