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

Re: [PATCH 08/10] x86, arm, riscv: add per-arch bootinfo headers



On Sat, 1 Jul 2023, Christopher Clark wrote:
> Changes to ensure that inclusion of <xen/bootinfo.h> succeeds in each
> of the main archtecture builds and in the 32-bit early x86 boot build.
> 
> The <xen/bootinfo.h> header contains structures that will be used in efi
> logic prior to the main start of Xen, so it needs to be suitable for
> inclusion in Arm source files.
> 
> The same header will also be included in early x86 boot logic, where
> asm/* headers are not reachable, and so they cannot be transitively
> included, so a ifdef condition is needed to prevent an attempt to
> include <asm/bootinfo.h> from within <xen/bootinfo.h> in that case.
> 
> The early x86 boot logic can then directly include <asm/bootinfo.h> via
> a specified directory path where it can be included successfully.
> 
> Signed-off-by: Christopher Clark <christopher.w.clark@xxxxxxxxx>
> Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>

I think this is fine.


> ---
> New for v2 series.
> 
>  xen/arch/arm/include/asm/bootinfo.h   | 20 ++++++++++++++++++++
>  xen/arch/riscv/include/asm/bootinfo.h | 20 ++++++++++++++++++++
>  xen/include/xen/bootinfo.h            |  7 ++-----
>  3 files changed, 42 insertions(+), 5 deletions(-)
>  create mode 100644 xen/arch/arm/include/asm/bootinfo.h
>  create mode 100644 xen/arch/riscv/include/asm/bootinfo.h
> 
> diff --git a/xen/arch/arm/include/asm/bootinfo.h 
> b/xen/arch/arm/include/asm/bootinfo.h
> new file mode 100644
> index 0000000000..5316c87a3d
> --- /dev/null
> +++ b/xen/arch/arm/include/asm/bootinfo.h
> @@ -0,0 +1,20 @@
> +#ifndef __ARCH_ARM_BOOTINFO_H__
> +#define __ARCH_ARM_BOOTINFO_H__
> +
> +struct __packed arch_bootmodule { };
> +DEFINE_STRUCT_PTR_TYPE(arch_bootmodule);
> +
> +struct __packed arch_boot_info { };
> +DEFINE_STRUCT_PTR_TYPE(arch_boot_info);
> +
> +#endif
> +
> +/*
> + * Local variables:
> + * mode: C
> + * c-file-style: "BSD"
> + * c-basic-offset: 4
> + * tab-width: 4
> + * indent-tabs-mode: nil
> + * End:
> + */
> diff --git a/xen/arch/riscv/include/asm/bootinfo.h 
> b/xen/arch/riscv/include/asm/bootinfo.h
> new file mode 100644
> index 0000000000..5316c87a3d
> --- /dev/null
> +++ b/xen/arch/riscv/include/asm/bootinfo.h
> @@ -0,0 +1,20 @@
> +#ifndef __ARCH_ARM_BOOTINFO_H__
> +#define __ARCH_ARM_BOOTINFO_H__
> +
> +struct __packed arch_bootmodule { };
> +DEFINE_STRUCT_PTR_TYPE(arch_bootmodule);
> +
> +struct __packed arch_boot_info { };
> +DEFINE_STRUCT_PTR_TYPE(arch_boot_info);
> +
> +#endif
> +
> +/*
> + * Local variables:
> + * mode: C
> + * c-file-style: "BSD"
> + * c-basic-offset: 4
> + * tab-width: 4
> + * indent-tabs-mode: nil
> + * End:
> + */
> diff --git a/xen/include/xen/bootinfo.h b/xen/include/xen/bootinfo.h
> index 8389da4f72..bf5586a76b 100644
> --- a/xen/include/xen/bootinfo.h
> +++ b/xen/include/xen/bootinfo.h
> @@ -5,11 +5,8 @@
>  #include <xen/compiler.h>
>  #include <xen/mm-frame.h>
>  
> -#ifdef CONFIG_X86
> -#include <asm/bootinfo.h>
> -#else
> -    struct arch_bootmodule { };
> -    struct arch_boot_info { };
> +#if defined CONFIG_X86 || CONFIG_ARM || CONFIG_RISCV
> +# include <asm/bootinfo.h>
>  #endif
>  
>  /* Boot module binary type / purpose */
> -- 
> 2.25.1
> 
> 



 


Rackspace

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