x86/hyperv: Set Virtual Trust Level in VMBus init message
authorTianyu Lan <tiala@microsoft.com>
Fri, 18 Aug 2023 10:29:12 +0000 (06:29 -0400)
committerWei Liu <wei.liu@kernel.org>
Tue, 22 Aug 2023 00:38:20 +0000 (00:38 +0000)
commit8387ce06d70bbbb97a0c168a52b68268ae0da075
treea4e0c65267595b475f3b9c9bb833775081acf1a6
parentd6e2d652443751e290b2edb70173ec3c22f78fbe
x86/hyperv: Set Virtual Trust Level in VMBus init message

SEV-SNP guests on Hyper-V can run at multiple Virtual Trust
Levels (VTL).  During boot, get the VTL at which we're running
using the GET_VP_REGISTERs hypercall, and save the value
for future use.  Then during VMBus initialization, set the VTL
with the saved value as required in the VMBus init message.

Reviewed-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Tianyu Lan <tiala@microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Link: https://lore.kernel.org/r/20230818102919.1318039-3-ltykernel@gmail.com
arch/x86/hyperv/hv_init.c
arch/x86/include/asm/hyperv-tlfs.h
drivers/hv/connection.c
include/asm-generic/mshyperv.h
include/linux/hyperv.h