On 10.01.23 17:48, Ralf Ramsauer wrote:
> This has two advantages:
> - Automatic architecture detection in python tooling
> - Sledgehammer sanity check when enabling jailhouse / creating cells
>
> This commit just adds the field in the cell/sysconfig, adds the fields
> to the configs and aligns the config checker that it will not break for
> the moment.
>
> Logic is added later, config revision got increased.
>
> Signed-off-by: Ralf Ramsauer <[email protected]>
...
> diff --git a/include/jailhouse/cell-config.h b/include/jailhouse/cell-config.h
> index 6b54e34b..9fd03ff8 100644
> --- a/include/jailhouse/cell-config.h
> +++ b/include/jailhouse/cell-config.h
> @@ -46,11 +46,20 @@
> #define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
> #endif
>
> +/*
> + * Supported architectures of Jailhouse. Used in the header of system and
> cell
> + * configurations, as well as in python tooling for automatic architecture
> + * detection.
> + */
> +#define JAILHOUSE_X86 0
> +#define JAILHOUSE_ARM 1
> +#define JAILHOUSE_ARM64 2
> +
> /*
> * Incremented on any layout or semantic change of system or cell config.
> * Also update formats and HEADER_REVISION in pyjailhouse/config_parser.py.
> */
> -#define JAILHOUSE_CONFIG_REVISION 13
> +#define JAILHOUSE_CONFIG_REVISION 14
>
> #define JAILHOUSE_CELL_NAME_MAXLEN 31
>
> @@ -84,6 +93,8 @@
> struct jailhouse_cell_desc {
> char signature[6];
> __u16 revision;
> + __u8 architecture;
> + __u8 __res[3];
>
It's not really that we have to save space on this file, but still: Why
not reducing the signature to 5 bytes ("JHCLL", "JHSYS") and putting the
architecture byte right behind it? The architecture conceptually belongs
closer to the signature. ;)
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/b6c9508d-a6a3-7cf5-1cc6-a194cb181451%40siemens.com.