Skip to content

vhost-device-vsock: Sync base rev and patches with upstream PR #936 and PR #1007 - #3438

Open
rmuthiah wants to merge 1 commit into
google:mainfrom
rmuthiah:vsock-sync-pr1007-pr936
Open

rmuthiah wants to merge 1 commit into
google:mainfrom
rmuthiah:vsock-sync-pr1007-pr936

Conversation

@rmuthiah

Copy link
Copy Markdown
Collaborator

vhost-device-vsock: Sync base rev and patches with upstream PR #936 and PR #1007

Bump vhost_device_vsock_crates in vhost_device_vsock.MODULE.bazel
from 20fa14c4c56e40a12104794a934dd70dc7642ff2 to
c0bfee92d28ffa7199ebe894c16d877a6f216fc3, which includes:

Refresh the four vhost-device-vsock patches against c0bfee92d28f to
match upstream rust-vmm/vhost-device PR #936 (0848db4..f0c024d) and
PR #1007 (1268ac5..7d2775e):

  1. vhost-device-vsock-backend-rxq-cleanup.patch (PR Add missing include #1007 commit 1,
    1268ac5):

    • Add unit test in test_vsock_thread_backend verifying that stale
      backend_rxq keys are skipped and active keys with remaining
      pending_rx() ops are re-queued.
  2. vhost-device-vsock-handshake-cleanup.patch (PR Add missing include #1007 commit 2,
    a8ad7a6):

  3. vhost-device-vsock-snapshot.patch (PR Import libcuttlefish_host_config_adb #936 0848db4..f0c024d):

    • Persist 1-byte driver_read_config across set_device_state_fd
      and check_device_state so VSOCK_EVENT_TRANSPORT_RESET is only
      sent on restore if the guest driver had initialized the device
      before snapshot.
    • Replace Mutex<bool> with AtomicBool for
      transport_reset_pending and driver_read_config, lock threads
      before checking transport_reset_pending in get_config(), and
      check queue.ready() in reset_transport().
    • Add test_vsock_backend_save_restore unit test.
  4. vhost-device-vsock-stream-io-error-reset.patch (PR Add missing include #1007 commit 3,
    7d2775e):

    • Add unit tests for WouldBlock on nonblocking streams and
      send_bytes write errors on closed host peers.

Bug: 483173919
Bug: 566997830
Test: bazel build //cuttlefish/package:common
Test: 5-stage live Cuttlefish VM vsock stress & snapshot-restore test
Assisted-by: Jetski:Gemini

…#936 and PR google#1007

Bump `vhost_device_vsock_crates` in `vhost_device_vsock.MODULE.bazel`
from `20fa14c4c56e40a12104794a934dd70dc7642ff2` to
`c0bfee92d28ffa7199ebe894c16d877a6f216fc3`, which includes:
- `b269fab` (`Update vhost-user-backend to 0.24.0`, `vhost 0.18.0`,
  containing `rust-vmm/vhost` PR google#374 `e45799931a9e` so device-state
  transfer returns `Option<File>`)
- `c0bfee9` (`rust-vmm/vhost-device` PR google#992: `vsock: do forward-listen
  polling after guest accepts`)

Refresh the four `vhost-device-vsock` patches against `c0bfee92d28f` to
match upstream `rust-vmm/vhost-device` PR google#936 (`0848db4`..`f0c024d`) and
PR google#1007 (`1268ac5`..`7d2775e`):

1. `vhost-device-vsock-backend-rxq-cleanup.patch` (PR google#1007 commit 1,
   `1268ac5`):
   - Add unit test in `test_vsock_thread_backend` verifying that stale
     `backend_rxq` keys are skipped and active keys with remaining
     `pending_rx()` ops are re-queued.

2. `vhost-device-vsock-handshake-cleanup.patch` (PR google#1007 commit 2,
   `a8ad7a6`):
   - Rebase onto `c0bfee92d28f` (PR google#992), adding unit tests for
     early pre-handshake host disconnects and `BrokenPipe` on
     `VSOCK_OP_RESPONSE`.

3. `vhost-device-vsock-snapshot.patch` (PR google#936 `0848db4`..`f0c024d`):
   - Persist 1-byte `driver_read_config` across `set_device_state_fd`
     and `check_device_state` so `VSOCK_EVENT_TRANSPORT_RESET` is only
     sent on restore if the guest driver had initialized the device
     before snapshot.
   - Replace `Mutex<bool>` with `AtomicBool` for
     `transport_reset_pending` and `driver_read_config`, lock threads
     before checking `transport_reset_pending` in `get_config()`, and
     check `queue.ready()` in `reset_transport()`.
   - Add `test_vsock_backend_save_restore` unit test.

4. `vhost-device-vsock-stream-io-error-reset.patch` (PR google#1007 commit 3,
   `7d2775e`):
   - Add unit tests for `WouldBlock` on nonblocking streams and
     `send_bytes` write errors on closed host peers.

Bug: 483173919
Bug: 566997830
Test: bazel build //cuttlefish/package:common
Test: 5-stage live Cuttlefish VM vsock stress & snapshot-restore test
Assisted-by: Jetski:Gemini
@rmuthiah
rmuthiah requested a review from jemoreira October 27, 2026 16:19

This branch has not been deployed

No deployments
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