File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ static int __init hyperv_init(void)
118
118
if (ms_hyperv .priv_high & HV_ACCESS_PARTITION_ID )
119
119
hv_get_partition_id ();
120
120
ms_hyperv .vtl = get_vtl ();
121
+ if (ms_hyperv .vtl > 0 ) /* non default VTL */
122
+ pr_info ("Linux runs in Hyper-V Virtual Trust Level %d\n" , ms_hyperv .vtl );
121
123
122
124
ms_hyperv_late_init ();
123
125
Original file line number Diff line number Diff line change @@ -55,7 +55,12 @@ static void __noreturn hv_vtl_restart(char __maybe_unused *cmd)
55
55
56
56
void __init hv_vtl_init_platform (void )
57
57
{
58
- pr_info ("Linux runs in Hyper-V Virtual Trust Level\n" );
58
+ /*
59
+ * This function is a no-op if the VTL mode is not enabled.
60
+ * If it is, this function runs if and only the kernel boots in
61
+ * VTL2 which the x86 hv initialization path makes sure of.
62
+ */
63
+ pr_info ("Linux runs in Hyper-V Virtual Trust Level %d\n" , ms_hyperv .vtl );
59
64
60
65
x86_platform .realmode_reserve = x86_init_noop ;
61
66
x86_platform .realmode_init = x86_init_noop ;
You can’t perform that action at this time.
0 commit comments