[PATCH hyperv-next v3 07/15] Drivers: hv: Post messages via the confidential VMBus if available
From: Roman Kisel
Date: Tue Jun 03 2025 - 20:45:50 EST
When the confidential VMBus is available, the guest should post
messages via the paravisor.
Update hv_post_message() to request posting messages from the paravisor
rather than through GHCB or TD calls.
Signed-off-by: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx>
---
drivers/hv/hv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index e25c91eb6af5..1f7cf1244509 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -74,7 +74,7 @@ int hv_post_message(union hv_connection_id connection_id,
aligned_msg->payload_size = payload_size;
memcpy((void *)aligned_msg->payload, payload, payload_size);
- if (ms_hyperv.paravisor_present) {
+ if (ms_hyperv.paravisor_present && !vmbus_is_confidential()) {
if (hv_isolation_type_tdx())
status = hv_tdx_hypercall(HVCALL_POST_MESSAGE,
virt_to_phys(aligned_msg), 0);
--
2.43.0