Re: [PATCH v3 1/7] arm64: hyperv: Use SMC to detect hypervisor presence

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

 





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@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.

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





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux