[PATCH v10 5/7] arm64: hyperv: Initialize hypervisor on boot

Wei Liu wei.liu at kernel.org
Thu May 13 08:16:25 PDT 2021


On Wed, May 12, 2021 at 10:37:45AM -0700, Michael Kelley wrote:
> Add ARM64-specific code to initialize the Hyper-V
> hypervisor when booting as a guest VM. Provide functions
> and data structures indicating hypervisor status that
> are needed by VMbus driver.
> 
> This code is built only when CONFIG_HYPERV is enabled.
> 
> Signed-off-by: Michael Kelley <mikelley at microsoft.com>
[...]
>  /*
>   * Declare calls to get and set Hyper-V VP register values on ARM64, which
>   * requires a hypercall.
> diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
> index 61845c0..7b17d6a 100644
> --- a/arch/arm64/kernel/setup.c
> +++ b/arch/arm64/kernel/setup.c
> @@ -49,6 +49,7 @@
>  #include <asm/traps.h>
>  #include <asm/efi.h>
>  #include <asm/xen/hypervisor.h>
> +#include <asm/mshyperv.h>
>  #include <asm/mmu_context.h>
>  
>  static int num_standard_resources;
> @@ -355,6 +356,9 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p)
>  	if (acpi_disabled)
>  		unflatten_device_tree();
>  
> +	/* Do after acpi_boot_table_init() so local FADT is available */
> +	hyperv_early_init();
> +

Arm maintainers, this requires your attention. Thanks.

The rest is Hyper-V specific, feel free to skip that portion.

Wei.

>  	bootmem_init();
>  
>  	kasan_init();
> -- 
> 1.8.3.1
> 



More information about the linux-arm-kernel mailing list