diff options
author | Tianyu Lan <Tianyu.Lan@microsoft.com> | 2021-10-25 08:21:12 -0400 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2021-10-28 11:22:49 +0000 |
commit | 20c89a559e00dfe352b73e867211a669113ae881 (patch) | |
tree | 502dc12927915b48b4d5321afe4272104c68735b /drivers/hv/connection.c | |
parent | faff44069ff538ccdfef187c4d7ec83d22dfb3a4 (diff) |
x86/hyperv: Add ghcb hvcall support for SNP VM
hyperv provides ghcb hvcall to handle VMBus
HVCALL_SIGNAL_EVENT and HVCALL_POST_MESSAGE
msg in SNP Isolation VM. Add such support.
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
Link: https://lore.kernel.org/r/20211025122116.264793-8-ltykernel@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r-- | drivers/hv/connection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 5e479d54918c..8820ae68f20f 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c @@ -447,6 +447,10 @@ void vmbus_set_event(struct vmbus_channel *channel) ++channel->sig_events; - hv_do_fast_hypercall8(HVCALL_SIGNAL_EVENT, channel->sig_event); + if (hv_isolation_type_snp()) + hv_ghcb_hypercall(HVCALL_SIGNAL_EVENT, &channel->sig_event, + NULL, sizeof(channel->sig_event)); + else + hv_do_fast_hypercall8(HVCALL_SIGNAL_EVENT, channel->sig_event); } EXPORT_SYMBOL_GPL(vmbus_set_event); |