diff options
author | Tianyu Lan <tiala@microsoft.com> | 2023-08-18 12:29:12 +0200 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2023-08-22 02:38:20 +0200 |
commit | 8387ce06d70bbbb97a0c168a52b68268ae0da075 (patch) | |
tree | a4e0c65267595b475f3b9c9bb833775081acf1a6 /drivers/hv/connection.c | |
parent | x86/hyperv: Add sev-snp enlightened guest static key (diff) | |
download | linux-8387ce06d70bbbb97a0c168a52b68268ae0da075.tar.xz linux-8387ce06d70bbbb97a0c168a52b68268ae0da075.zip |
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
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r-- | drivers/hv/connection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 5978e9dbc286..02b54f85dc60 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -98,6 +98,7 @@ int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, u32 version) */ if (version >= VERSION_WIN10_V5) { msg->msg_sint = VMBUS_MESSAGE_SINT; + msg->msg_vtl = ms_hyperv.vtl; vmbus_connection.msg_conn_id = VMBUS_MESSAGE_CONNECTION_ID_4; } else { msg->interrupt_page = virt_to_phys(vmbus_connection.int_page); |