Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virt: Support detection for ARM64 Hyper-V guests #20998

Merged
merged 1 commit into from Oct 13, 2021

Conversation

fbq
Copy link
Contributor

@fbq fbq commented Oct 13, 2021

The detection of Microsoft Hyper-V VMs is done by cpuid currently,
however there is no cpuid on ARM64. And since ARM64 is now a supported
architecture for Microsoft Hyper-V guests1, then introduce a more
generic way to detect whether a guest is running as a Hyper-V guest:
detect via the existence of directory "/dev/vmbus".

The detection of Microsoft Hyper-V VMs is done by cpuid currently,
however there is no cpuid on ARM64. And since ARM64 is now a supported
architecture for Microsoft Hyper-V guests[1], then use DMI tables to
detect a Hyper-V guest, which is more generic and works for ARM64.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7aff79e297ee1aa0126924921fd87a4ae59d2467
@fbq
Copy link
Contributor Author

fbq commented Oct 13, 2021

v1 -> v2: Use DMI vendor tables instead of existence of "/dev/vmbus".

Copy link
Member

@yuwata yuwata left a comment

Choose a reason for hiding this comment

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

LGTM.

@yuwata yuwata added the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Oct 13, 2021
@poettering poettering merged commit 506bbc8 into systemd:main Oct 13, 2021
@fbq fbq deleted the dev/hv-detect branch October 13, 2021 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detect-virt good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed
Development

Successfully merging this pull request may close these issues.

None yet

3 participants