mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hardik Garg <hargar@linux.microsoft.com>
To: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
	decui@microsoft.com, krzk+dt@kernel.org, robh@kernel.org,
	conor+dt@kernel.org, mhklinux@outlook.com
Cc: devicetree@vger.kernel.org, linux-hyperv@vger.kernel.org,
	linux-kernel@vger.kernel.org, ssengar@linux.microsoft.com,
	longli@microsoft.com, Naman Jain <namjain@linux.microsoft.com>,
	hargar@microsoft.com
Subject: [PATCH v5 1/2] dt-bindings: microsoft: Add vmbus message-connection-id property
Date: Tue, 23 Dec 2025 15:07:22 -0800	[thread overview]
Message-ID: <3fe6a9a3-b6e2-4550-b2a9-924b1fca21b5@linux.microsoft.com> (raw)
In-Reply-To: <58cb22cb-b0c8-4694-b9e4-971aa7f0f972@linux.microsoft.com>

Document the microsoft,message-connection-id property for VMBus
DeviceTree node. The connection-id is a hardware-level identifier
that specifies which Hyper-V message port (or mailbox slot) the
guest should use to communicate with the VMBus control plane.
Historically, VMBus always used a single, fixed connection ID.
However, with the introduction of Virtual Trust Level 2 (VTL2)
support, the control plane can now reside in a different trust
level, requiring the guest to communicate through a different
message port. This connection-id is determined by the hypervisor
based on the status of VMBus relay. From the guests perspective,
it is completely static for the lifetime of that VM instance, it
never changes at runtime. Once the kernel boots, it must read this
value to establish communication with the correct VMBus control
plane. There is currently no system API, or discoverable interface
that allows the guest to determine this value dynamically.

Each guest has a private hypervisor mailbox and cannot access any other
guests communication path. Using an incorrect connection ID does not
allow eavesdropping or cause interference, it only results in failed
VMBus initialization because the host drops messages sent to an
unexpected port. Thus, exposing the correct connection ID to the guest
is safe and necessary for correct initialization.

Signed-off-by: Hardik Garg <hargar@linux.microsoft.com>
---
v4:
https://lore.kernel.org/all/1750374395-14615-2-git-send-email-hargar@linux.microsoft.com
v3:
https://lore.kernel.org/all/6a92ca86-ad6b-4d49-af6e-1ed7651b8ab8@linux.microsoft.com
v2:
https://lore.kernel.org/all/096edaf7-cc90-42b6-aff4-c5f088574e1e@linux.microsoft.com
v1:
https://lore.kernel.org/all/6acee4bf-cb04-43b9-9476-e8d811d26dfd@linux.microsoft.com
---
 .../devicetree/bindings/bus/microsoft,vmbus.yaml     | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml
b/Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml
index 0bea4f5287ce..4745c2b89ac5 100644
--- a/Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml
+++ b/Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml
@@ -17,6 +17,17 @@ properties:
   compatible:
     const: microsoft,vmbus
 
+  microsoft,message-connection-id:
+    description:
+      connection-id is a hardware-level identifier that specifies
+      which Hyper-V message port (or mailbox slot) the guest should
+      use to communicate with the VMBus control plane. When this
+      property is not present, the driver selects the connection ID
+      based on the protocol version (4 for VERSION_WIN10_V5 and
+      newer, or 1 for older versions).
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+
   ranges: true
 
   '#address-cells':
@@ -55,6 +66,7 @@ examples:
 
             vmbus@ff0000000 {
                 compatible = "microsoft,vmbus";
+                microsoft,message-connection-id = <4>;
                 #address-cells = <2>;
                 #size-cells = <1>;
                 ranges = <0x0f 0xf0000000 0x0f 0xf0000000 0x10000000>;
-- 
2.34.1



  reply	other threads:[~2025-12-23 23:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-23 23:05 [PATCH v5 0/2] Add VMBus message connection ID support via DeviceTree Hardik Garg
2025-12-23 23:07 ` Hardik Garg [this message]
2025-12-23 23:09 ` [PATCH v5 2/2] Drivers: hv: vmbus: retrieve connection-id from DeviceTree Hardik Garg
2026-01-27  0:12 ` [PATCH v5 0/2] Add VMBus message connection ID support via DeviceTree Hardik Garg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3fe6a9a3-b6e2-4550-b2a9-924b1fca21b5@linux.microsoft.com \
    --to=hargar@linux.microsoft.com \
    --cc=conor+dt@kernel.org \
    --cc=decui@microsoft.com \
    --cc=devicetree@vger.kernel.org \
    --cc=haiyangz@microsoft.com \
    --cc=hargar@microsoft.com \
    --cc=krzk+dt@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=mhklinux@outlook.com \
    --cc=namjain@linux.microsoft.com \
    --cc=robh@kernel.org \
    --cc=ssengar@linux.microsoft.com \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®