Skip to content

Drivers: hv: vmbus: add VTL2 redirect connection ID - #162

Merged
Hardik Garg (hargar19) merged 3 commits into
product/hcl-main/6.18from
user/hargar/oct-connectionid
Oct 14, 2026
Merged

Hardik Garg (hargar19) merged 3 commits into
product/hcl-main/6.18from
user/hargar/oct-connectionid

Conversation

@hargar19

Copy link
Copy Markdown
Collaborator

Revert the out-of-tree commit "Drivers: hv: Add connection id support" and cherry-pick the latest upstream stable kernel commit, "Drivers: hv: vmbus: add VTL2 redirect connection ID support".
In the previous implementation, OpenVMM reads the connection ID from the device tree and passes it to the OpenHCL kernel through the kernel command line.
With the upstream implementation, the kernel tries both connection IDs and retains the one that successfully establishes a connection.

Update the OOT commit list.

Signed-off-by: Hardik Garg <hargar@linux.microsoft.com>

[ Upstream commit 92d0593 ]

VMBus sends CHANNELMSG_INITIATE_CONTACT through a Hyper-V message
connection ID. Older protocol versions use VMBUS_MESSAGE_CONNECTION_ID,
while protocol version 5.0 and newer normally use
VMBUS_MESSAGE_CONNECTION_ID_4.

For a VTL2 kernel using VMBus protocol 5.0 or newer, the host
may expect INITIATE_CONTACT on either the redirect connection ID or
VMBUS_MESSAGE_CONNECTION_ID_4. There is no capability indication that
identifies which ID is active, so the driver must determine it at runtime.

During VMBus negotiation, the redirect ID is tried first because it is
used by VTL2 configurations with VMBus redirection enabled. If the
redirect ID is unavailable, the host rejects it synchronously with
HV_STATUS_INVALID_CONNECTION_ID, allowing fallback to the standard ID.

Return a distinct error for an invalid Initiate Contact connection ID so
this fallback does not mask other post-message failures or
protocol-version rejections. Preserve the existing connection ID
selection for older protocol versions or when running below VTL2.

Signed-off-by: Hardik Garg <hargar@linux.microsoft.com>
Reviewed-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Reviewed-by: Naman Jain <namjain@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit ceb19f4)
Signed-off-by: Hardik Garg <hargar@linux.microsoft.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused changes match the upstream stable implementation and preserve existing behavior outside VTL2 negotiation.

0 open findings

What changed in this PR

Replaces the out-of-tree VMBus connection-ID override with upstream VTL2 connection-ID negotiation.

Changes:

  • Tries the VTL2 redirect ID before the standard ID.
  • Returns a distinct error to enable fallback.
  • Retires the superseded OOT commit.
File Description
MSFT-Merge/​commit-log Records the retired OOT commit and upstream replacement.
drivers/​hv/​hyperv_vmbus.h Defines the VTL2 redirect connection ID.
drivers/​hv/​connection.c Implements connection-ID retry and removes the old override.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@hargar19
Hardik Garg (hargar19) merged commit fd07ec3 into product/hcl-main/6.18 Oct 14, 2026
22 checks passed
@hargar19
Hardik Garg (hargar19) deleted the user/hargar/oct-connectionid branch October 14, 2026 16:09
Hardik Garg (hargar19) added a commit to hargar19/openvmm that referenced this pull request Oct 19, 2026
The OpenHCL kernel now determines the VTL2 vmbus message connection ID
itself (microsoft/OHCL-Linux-Kernel#162), so the hv_vmbus.message_connection_id
command line hack is no longer needed.

Signed-off-by: Hardik Garg <hargar@linux.microsoft.com>
Hardik Garg (hargar19) added a commit to hargar19/openvmm that referenced this pull request Oct 19, 2026
The OpenHCL kernel now picks the VTL2 vmbus message connection ID at
runtime (microsoft/OHCL-Linux-Kernel#162) and nothing else consumes
microsoft,message-connection-id, so stop parsing it from the host device
tree and stop forwarding it to the VTL2 device tree.

Signed-off-by: Hardik Garg <hargar@linux.microsoft.com>
Ben Hillis (benhillis) pushed a commit to microsoft/openvmm that referenced this pull request Oct 20, 2026
Update the OpenHCL kernel revision to use the upstream device connection
ID support: kernel PR:
microsoft/OHCL-Linux-Kernel#162

The kernel now selects the VTL2 vmbus message connection ID at runtime,
so this change:
- Stops passing `hv_vmbus.message_connection_id` on the kernel command
line.
- Removes parsing of `microsoft,message-connection-id` from the host
device tree.
- Stops forwarding the connection ID to the VTL2 device tree.
- Removes the now-unused host parameter plumbing.

Signed-off-by: Hardik Garg
<[hargar@linux.microsoft.com](mailto:hargar@microsoft.com)>

---------

Signed-off-by: Hardik Garg <hargar@linux.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants