[PATCH v3 1/7] arm64: hyperv: Use SMC to detect hypervisor presence
Roman Kisel
romank at linux.microsoft.com
Mon Aug 5 07:53:47 PDT 2024
On 8/2/2024 6:21 PM, Wei Liu wrote:
> 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 at linux.microsoft.com>
>
> The change looks sensible.
>
> Within one minor comment fixed below:
>
> Acked-by: Wei Liu <wei.liu at kernel.org>
>
> 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.
>
Michael posted a suggestion to change that altogether; will elaborate on
the topic in the thread with Michael.
>> +#define ARM_SMCCC_VENDOR_HYP_UID_HYPERV_REG_2 0
>> +#define ARM_SMCCC_VENDOR_HYP_UID_HYPERV_REG_3 0
>> +
>> #endif
>> --
>> 2.34.1
>>
--
Thank you,
Roman
More information about the linux-arm-kernel
mailing list