Re: [PATCH v3 1/7] arm64: hyperv: Use SMC to detect hypervisor presence
From: Wei Liu
Date: Fri Aug 02 2024 - 21:21:42 EST
On Fri, Jul 26, 2024 at 03:59:04PM -0700, Roman Kisel wrote:
> The arm64 Hyper-V startup path relies on ACPI to detect
> running under a Hyper-V compatible hypervisor. That
> doesn't work on non-ACPI systems.
>
> Hoist the ACPI detection logic into a separate function,
> use the new SMC added recently to Hyper-V to use in the
> non-ACPI case.
>
> Signed-off-by: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx>
The change looks sensible.
Within one minor comment fixed below:
Acked-by: Wei Liu <wei.liu@xxxxxxxxxx>
However I would also like to get an Acked-by or reivewed-by from someone
who works on the ARM64 side of things -- Saurabh, Boqun, Srivatsa, and
Jinank?
> ---
> arch/arm64/hyperv/mshyperv.c | 36 ++++++++++++++++++++++++++-----
> arch/arm64/include/asm/mshyperv.h | 5 +++++
> 2 files changed, 36 insertions(+), 5 deletions(-)
>
[...]
> diff --git a/arch/arm64/include/asm/mshyperv.h b/arch/arm64/include/asm/mshyperv.h
> index a975e1a689dd..a7a3586f7cb1 100644
> --- a/arch/arm64/include/asm/mshyperv.h
> +++ b/arch/arm64/include/asm/mshyperv.h
> @@ -51,4 +51,9 @@ static inline u64 hv_get_msr(unsigned int reg)
>
> #include <asm-generic/mshyperv.h>
>
> +#define ARM_SMCCC_VENDOR_HYP_UID_HYPERV_REG_0 0x7948734d
> +#define ARM_SMCCC_VENDOR_HYP_UID_HYPERV_REG_1 0x56726570
Presumably these are ASCII codes for an identifier string, please
provide comments to explain what they are.
> +#define ARM_SMCCC_VENDOR_HYP_UID_HYPERV_REG_2 0
> +#define ARM_SMCCC_VENDOR_HYP_UID_HYPERV_REG_3 0
> +
> #endif
> --
> 2.34.1
>