vmbus_server: don't use monitor info if interrupts are disabled#3579
Open
SvenGroot wants to merge 2 commits into
Open
vmbus_server: don't use monitor info if interrupts are disabled#3579SvenGroot wants to merge 2 commits into
SvenGroot wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a bug where MNF-enabled channels opened with interrupts disabled (target VP = VP_INDEX_DISABLE_INTERRUPT) still carried monitor info in their OpenParams, causing later ModifyConnection handling to incorrectly reject monitor page changes. This breaks synthetic kdnet scenarios through the OpenHCL VMBus relay, where reserved-on-guest channels are forwarded as non-reserved opens with disabled interrupts.
Changes:
- In
OpenParams::from_request, suppressmonitor_infowheneverrequest.target_vpisNone(interrupts disabled). - Add
test_mnf_channel_open_with_interrupts_disabledcovering the new behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| vm/devices/vmbus/vmbus_server/src/channels.rs | Gate OpenParams.monitor_info on request.target_vp.is_some() |
| vm/devices/vmbus/vmbus_server/src/channels/tests.rs | New test verifying MNF channel opened with interrupts disabled has no monitor info |
will-j-wright
approved these changes
May 27, 2026
| event_flag, | ||
| monitor_info, | ||
| // Only include monitor info if the request has interrupts enabled. | ||
| monitor_info: request.target_vp.and(monitor_info), |
Contributor
There was a problem hiding this comment.
Nice, this is a much simpler change
benhillis
approved these changes
May 27, 2026
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.
This change fixes an issue where channels with MNF enabled were supplied with information about the MNF usage when opened, even when the channel has interrupts disabled. This was unnecessary, as the MNF support set up for the channel would not be used anyway, but it would also cause the check in
ServerTaskInner::set_monitor_pageto fail during the handling of aModifyConnectionmessage because it believes a channel is using MNF when it really isn't.This affects situations when the server is used to host a VM using OpenHCL with the VMBus relay, and a guest which is using synthetic kdnet. KD opens the networking channel (which is often configured to use MNF) as a reserved channel, but the OpenHCL relay forwards these to the host as a regular, non-reserved open. Reserved channels are explicitly excluded from using MNF, but because the channel is not reserved on the host, that didn't apply here. When the relay uses
ModifyChannelto change connection parameters as the VTL0 guest reconnects, this would fail causing guest boot failure.Because reserved channels don't use interrupts, the relay still forwards them with their interrupt target VP set to
VP_INDEX_DISABLE_INTERRUPT. This change therefore removes the monitor info from the channel'sOpenParamsif interrupts are disabled, which fixes this problem.