Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/mshyperv: Add support for extended Hyper-V features

Extend the "ms_hyperv_info" structure to include a new field,
"ext_features", for capturing extended Hyper-V features.
Update the "ms_hyperv_init_platform" function to retrieve these features
using the cpuid instruction and include them in the informational output.

Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Reviewed-by: Roman Kisel <romank@linux.microsoft.com>
Reviewed-by: Tianyu Lan <tiala@microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Link: https://lore.kernel.org/r/1741980536-3865-3-git-send-email-nunodasneves@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <1741980536-3865-3-git-send-email-nunodasneves@linux.microsoft.com>

authored by

Stanislav Kinsburskii and committed by
Wei Liu
8cac5179 3817854b

+5 -2
+4 -2
arch/x86/kernel/cpu/mshyperv.c
··· 434 434 */ 435 435 ms_hyperv.features = cpuid_eax(HYPERV_CPUID_FEATURES); 436 436 ms_hyperv.priv_high = cpuid_ebx(HYPERV_CPUID_FEATURES); 437 + ms_hyperv.ext_features = cpuid_ecx(HYPERV_CPUID_FEATURES); 437 438 ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES); 438 439 ms_hyperv.hints = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO); 439 440 440 441 hv_max_functions_eax = cpuid_eax(HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS); 441 442 442 - pr_info("Hyper-V: privilege flags low 0x%x, high 0x%x, hints 0x%x, misc 0x%x\n", 443 - ms_hyperv.features, ms_hyperv.priv_high, ms_hyperv.hints, 443 + pr_info("Hyper-V: privilege flags low %#x, high %#x, ext %#x, hints %#x, misc %#x\n", 444 + ms_hyperv.features, ms_hyperv.priv_high, 445 + ms_hyperv.ext_features, ms_hyperv.hints, 444 446 ms_hyperv.misc_features); 445 447 446 448 ms_hyperv.max_vp_index = cpuid_eax(HYPERV_CPUID_IMPLEMENT_LIMITS);
+1
include/asm-generic/mshyperv.h
··· 36 36 struct ms_hyperv_info { 37 37 u32 features; 38 38 u32 priv_high; 39 + u32 ext_features; 39 40 u32 misc_features; 40 41 u32 hints; 41 42 u32 nested_features;