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

Re: [Xen-devel] [PATCH 1/3] RFC: libxl: API changes re domain type (and

To: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1/3] RFC: libxl: API changes re domain type (and keyed union semantics)
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Wed, 13 Jul 2011 10:19:53 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 13 Jul 2011 02:20:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1310495823-27077-2-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>
Organization: Citrix Systems, Inc.
References: <1310495823-27077-1-git-send-email-ian.jackson@xxxxxxxxxxxxx> <1310495823-27077-2-git-send-email-ian.jackson@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2011-07-12 at 19:37 +0100, Ian Jackson wrote:
> 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.

I think this is a good idea.

There is a similar "bool hvm" in libxl_domain_create_info, which I think
should also be changed (it's copied from create_info to build_info in
libxl_init_build_info).

The one in libxl_device_model_info is already correctly typed.

Not directly related to this patch but I've been wondering if the split
between create_info, build_info etc makes sense now that the builder
stuff has been pushed down into libxl itself.

> 
> These are are incompatible changes to the API/ABI.
> 
> THIS PATCH IS AN RFC AND SHOULD NOT BE APPLIED

In case you suffer from a split brain and apply it ;-)

Ian.

> ---
>  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),



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

<Prev in Thread] Current Thread [Next in Thread>