Repository navigation
Drivers: hv: vmbus: add VTL2 redirect connection ID - #162
Merged
Hardik Garg (hargar19) merged 3 commits intoOct 14, 2026
Merged
Conversation
This reverts commit 995392d.
[ 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>
Hardik Garg (hargar19)
requested review from
Naman Jain (namancse) and
Saurabh Sengar (saurabh-sengar)
October 12, 2026 21:51
There was a problem hiding this comment.
🟢 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.
Saurabh Sengar (saurabh-sengar)
approved these changes
Oct 14, 2026
Naman Jain (namancse)
approved these changes
Oct 14, 2026
Hardik Garg (hargar19)
merged commit Oct 14, 2026
fd07ec3
into
product/hcl-main/6.18
22 checks passed
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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>