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

Re: [Xen-devel] Reading GIC version from domU cfg file



On Tue, 2014-09-23 at 19:08 +0530, Vijay Kilari wrote:
> Hi,
> 
> I made below changes to xl tools to read gic_version from domU cfg file.
> But I I always get read 0 when I print d_config->num_gic_version.
> 
> I have set gic version as below in cfg file
> 
> gic_version= [ "2" ]
> 
> Can you please let me know If I got this correct or not?

Does it need to be an array rather than just a bare int? Or possibly
even an Enumeration?

> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index 7da2280..7e4fc0c 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -965,6 +965,11 @@ typedef struct {
>      const libxl_device_dtdev *conf;
>  } libxl__dtdev_info;
> 
> +/* GIC information */
> +typedef struct {
> +    uint8_t version;
> +} libxl__gic_info;
> +
> /* from xl_dom */
>  _hidden libxl_domain_type libxl__domain_type(libxl__gc *gc, uint32_t domid);
>  _hidden int libxl__domain_shutdown_reason(libxl__gc *gc, uint32_t domid);
> @@ -993,6 +998,8 @@ typedef struct {
> 
>      int num_dtdevs;
>      libxl__dtdev_info *dtdevs_info;
> +    int num_gic_version;
> +    libxl__gic_info *gic_info;
>  } libxl__domain_build_state;

I think everywhere which needs it should already have a
libxl_domain_config pointer in its hand and therefore be able to access
the field directly without laundering through libxl__domain_build_state.

Of course everything which does anything with this needs to be
abstracted into somewhere arm specific, either in libxl_arm.c or using
ifdefs, depending (generally we would have hooks in the arch files).

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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