Skip to content

vhost-user: add GpuFrontend API for GPU socket communication - #369

Open
dorindabassey wants to merge 2 commits into
rust-vmm:mainfrom
dorindabassey:gpu_frontend
Open

vhost-user: add GpuFrontend API for GPU socket communication#369
dorindabassey wants to merge 2 commits into
rust-vmm:mainfrom
dorindabassey:gpu_frontend

Conversation

@dorindabassey

@dorindabassey dorindabassey commented Jul 13, 2026

Copy link
Copy Markdown

Summary of the PR

Add frontend-side API for the vhost-user-gpu protocol socket:

  • VhostUserFrontend::set_gpu_socket() sends GPU_SET_SOCKET message
  • GpuFrontend reads requests and sends typed responses
  • Mirrors existing GpuBackend pattern

Eliminates need for frontends to manually construct GPU protocol headers.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

Comment thread vhost/src/vhost_user/gpu_frontend_req.rs Outdated
Comment thread vhost/src/vhost_user/frontend.rs
Comment thread vhost/src/vhost_user/gpu_frontend_req.rs
Comment thread vhost/src/vhost_user/gpu_frontend_req.rs Outdated
Comment thread vhost/src/vhost_user/mod.rs Outdated
@dorindabassey
dorindabassey force-pushed the gpu_frontend branch 2 times, most recently from 9866098 to eae693b Compare July 30, 2026 11:12
Dorinda Bassey added 2 commits August 17, 2026 11:16
checks buf_size against MAX_MSG_SIZE in recv_into_buf()

Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
Add frontend-side API for the vhost-user-gpu protocol socket:
- VhostUserFrontend::set_gpu_socket() sends GPU_SET_SOCKET message
- GpuFrontend reads requests and sends typed responses
- Mirrors existing GpuBackend pattern

Eliminates need for frontends to manually construct GPU protocol
headers.

Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
@dorindabassey

Copy link
Copy Markdown
Author

Hi @germag I have addressed the comments and rebased the PR. ready for review whenever you have the chance Thanks!

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.

2 participants