Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmbus_client: take over synic handling from the relay #899

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jstarks
Copy link
Member

@jstarks jstarks commented Feb 24, 2025

Don't leak the synic details into vmbus_relay or vmbus_relay_intercept_device. This will make it easier to use vmbus_client without vmbus_relay in future changes.

@jstarks jstarks requested a review from Copilot February 24, 2025 23:22
@jstarks jstarks requested review from a team as code owners February 24, 2025 23:22

Choose a reason for hiding this comment

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

Copilot reviewed 7 out of 16 changed files in this pull request and generated no comments.

Files not reviewed (9)
  • openhcl/underhill_core/src/worker.rs: Evaluated as low risk
  • vm/devices/vmbus/vmbus_core/src/protocol.rs: Evaluated as low risk
  • vm/devices/vmbus/vmbus_client/Cargo.toml: Evaluated as low risk
  • vm/devices/vmbus/vmbus_server/src/channels/saved_state.rs: Evaluated as low risk
  • vm/devices/vmbus/vmbus_relay_intercept_device/src/lib.rs: Evaluated as low risk
  • vm/devices/vmbus/vmbus_relay/Cargo.toml: Evaluated as low risk
  • vm/devices/vmbus/vmbus_server/src/channels.rs: Evaluated as low risk
  • support/inspect/src/lib.rs: Evaluated as low risk
  • support/mesh/mesh_channel/src/rpc.rs: Evaluated as low risk
Comments suppressed due to low confidence (2)

vm/devices/vmbus/vmbus_relay/src/lib.rs:269

  • Ensure that the new behavior for handling interrupts using PolledNotify is covered by tests, especially the scenarios where interrupts are relayed and the guest-to-host interrupt handling.
async fn handle_open_channel(&mut self, open_request: &OpenRequest) -> Result<OpenResult> {

vm/devices/vmbus/vmbus_client/src/saved_state.rs:142

  • The new handle_post_restore function introduces behavior that should be covered by tests to ensure unclaimed channels are correctly closed and their GPADLs are torn down.
pub fn handle_post_restore(&mut self) {
Copy link
Member

@chris-oo chris-oo left a comment

Choose a reason for hiding this comment

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

other than the 1 comment, seems reasonable to me

open_data.connection_id
};

// No failure paths after this point, since otherwise we would need to
Copy link
Member

Choose a reason for hiding this comment

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

Err... what does this comment mean, when i see a failed rpc below? Do you mean after event flag allocation?

chris-oo
chris-oo previously approved these changes Feb 25, 2025
Don't leak the synic details into `vmbus_relay` or
`vmbus_relay_intercept_device`. This will make it easier to use
`vmbus_client` without `vmbus_relay` in future changes.
@jstarks jstarks force-pushed the more_vmbus_client_cleanup branch from c36522e to 05257e0 Compare February 26, 2025 22:55
@@ -4266,9 +4252,10 @@ mod tests {
open_channel,
event_flag: 2,
connection_id: 0x2002,
flags: u16::from(
flags: (u16::from(
Copy link
Member

Choose a reason for hiding this comment

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

Minor: I've started preferring flags.into_bits() instead of u16::from(flags) (or whatever type) as I feel it's more readable.

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.

3 participants