Skip to content

arm64/hyperv: Add Device Tree Support#139

Merged
hargar19 merged 1 commit into
product/hcl-main/6.18from
user/hargar/dt-fix
Jun 3, 2026
Merged

arm64/hyperv: Add Device Tree Support#139
hargar19 merged 1 commit into
product/hcl-main/6.18from
user/hargar/dt-fix

Conversation

@hargar19
Copy link
Copy Markdown
Collaborator

@hargar19 hargar19 commented Jun 2, 2026

Add support for Device Tree (DT) configurations within the
arm64 Hyper-V environment, enabling boot with DeviceTree, too,
rather than with ACPI or SMCCC only.

Signed-off-by: Hardik Garg hargar@microsoft.com

Add support for Device Tree (DT) configurations within the
arm64 Hyper-V environment, enabling boot with DeviceTree, too,
rather than with ACPI or SMCCC only.

Signed-off-by: Roman Kisel <romank@microsoft.com>
Signed-off-by: Hardik Garg <hargar@microsoft.com>
@hargar19 hargar19 force-pushed the user/hargar/dt-fix branch from d5a412e to 377a1f3 Compare June 2, 2026 23:35
@hargar19 hargar19 marked this pull request as ready for review June 2, 2026 23:35
Copilot AI review requested due to automatic review settings June 2, 2026 23:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Device Tree (DT) based detection path for running under Hyper-V on arm64, so the Hyper-V guest initialization can proceed when booted via DT in addition to existing ACPI and SMCCC-based detection.

Changes:

  • Add DT/FDT-related includes and a new hyperv_detect_via_fdt() helper.
  • Extend hyperv_init() detection logic to initialize Hyper-V when DT indicates microsoft,hyperv.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +76 to +87
static bool __init hyperv_detect_via_fdt(void)
{
#if IS_ENABLED(CONFIG_OF)
const unsigned long hyp_node = of_get_flat_dt_subnode_by_name(
of_get_flat_dt_root(), "hypervisor");

return (hyp_node != -FDT_ERR_NOTFOUND) &&
of_flat_dt_is_compatible(hyp_node, "microsoft,hyperv");
#else
return false;
#endif
}
Comment on lines +18 to +20
#include <linux/libfdt.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
Copy link
Copy Markdown
Contributor

@namancse namancse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.

@hargar19 hargar19 merged commit 46ee03c into product/hcl-main/6.18 Jun 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants