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

Re: [PATCH 20/37] xen: introduce CONFIG_EFI to stub API for non-EFI architecture


  • To: Wei Chen <wei.chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 25 Jan 2022 11:34:55 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wJOo/wvk8DV0bT1rSv69PJBqcT92jXeyKhTKtwAZHmw=; b=RLHjN+RNDoGA9UgJ7U0IkBaqS1gek5EWCPBozyVDueagNIm7Dk3dG9+9QC6m1IDmYFA+l3dAIUrSic5UURlcFAckVosVjcrOWxCPHJVtMsBL+lVHUdshhl7H7s9u2IIjSGBPLtugyb0SCYsh1XxrUwhTX00OtA8hROWIWOBKVPQ3KqaCBMMdyxy2hsTY36gRscKzKX55wWEYEa2A5r4DTMMS6IqxESxMJ4ewezY0sBXmsp0NNLDbpbzYFpkUmltGYgQs6B/d8TfM8sxu9TaTwd/ouNDRzfELgwMw2cUatufv1Yhqc+9QQXqLnMr1kn2AblOmgtV3MI8M/vAHlorqiQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MWzDvEZjkILFMQiJ+e3n9sw/K8CIsBBbbJcff+GmaUyb9WjE4Qx92WIXryKxHfFuaEqVuGUb1vFPo3USqc60AL0OKUgoGGy20fKy4QgSmQxz2cebkUQrFe8wIYnp/TIy+1x7LmicMmnS30ng8BMsR/fA2/cATJVGbJGHDvBbtdObQj5zD99rAHElpg7jNZsfQUdFXLgK/i86UWmKOhyZepmhtYvr3xCc3BxXQdp4CiNQ8nuKqxhEhc9zB2qYJgxlfWdzpgwvChFRN6Bu/g3Q2g7yjMBlyr3RaC7mdNDwGE+xZEdbrQ3A8HGEoA+ghATCnpDkl47lH1RbOHL51WLhZQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Bertrand.Marquis@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, sstabellini@xxxxxxxxxx, julien@xxxxxxx
  • Delivery-date: Tue, 25 Jan 2022 10:35:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.09.2021 14:02, Wei Chen wrote:
> --- a/xen/common/Kconfig
> +++ b/xen/common/Kconfig
> @@ -11,6 +11,16 @@ config COMPAT
>  config CORE_PARKING
>       bool
>  
> +config EFI
> +     bool
> +     ---help---
> +      This option provides support for runtime services provided
> +      by UEFI firmware (such as non-volatile variables, realtime
> +      clock, and platform reset). A UEFI stub is also provided to
> +      allow the kernel to be booted as an EFI application. This
> +      is only useful for kernels that may run on systems that have
> +      UEFI firmware.

The way enabling of (full) EFI support works on x86, I consider it
wrong / misleading to put the option in common code. At the very least
the help text would need to call out the extra dependencies. Plus the
help text of course then needs to be generic (i.e. applicable to both
Arm and x86). That's notwithstanding the fact that without a prompt
the help text won't ever be seen while configuring Xen.

Also (nit): Indentation. And please don't use ---help--- anymore in
new code.

> --- a/xen/include/xen/efi.h
> +++ b/xen/include/xen/efi.h
> @@ -25,6 +25,8 @@ extern struct efi efi;
>  
>  #ifndef __ASSEMBLY__
>  
> +#ifdef CONFIG_EFI
> +
>  union xenpf_efi_info;
>  union compat_pf_efi_info;
>  
> @@ -45,6 +47,8 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *);
>  int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *);
>  int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *);
>  
> +#endif /* CONFIG_EFI*/

I can see that in the later patch, when introducing inline stubs,
you would need conditionals here, but I don't think you need them
right here (or you may want to introduce the stubs right away).

Also (nit): Missing blank in the comment.

Jan




 


Rackspace

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