summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-09Upgrade rust/vmm_vhost to fff997dda0625bd6f7c33bc0d79653c91b41b6c7android-s-beta-5android-s-beta-5Joel Galenson
Test: make Change-Id: I1911c42bc5dd48d381ad1978a3d21136233f4712
2021-07-29Update crosvm deps to use patch.crates-io for pathsDennis Kempin
This allows the crosvm workspace to provide the path to these crates while still keeping local cargo builds of just this crate working. BUG=b:194336213 TEST=cargo build here and in crosvm. This won't affect portage builds. Change-Id: I558bca9bf308d2404aabb660c074c231d19cfa09 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/rust-vmm/vhost/+/3049855 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Tested-by: Dennis Kempin <denniskempin@google.com> Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-07-16Merge remote-tracking branch 'aosp/upstream-main' into mergeupstreamAndrew Walbran
Re-ran cargo2android.py. Bug: 193402941 Bug: 192256642 Test: atest VirtualizationTestCases Change-Id: I7ac0c23ff7d700e45e7527db3d226aa644186cd0
2021-07-09Merge remote-tracking branch 'upstream/master' into HEADKeiichi Watanabe
Conflicts: Cargo.toml src/vhost_user/connection.rs They conflicted with "0323efc use sys_util and tempfile from crosvm". BUG=none TEST=cargo test --all-features Cq-Depend: chromium:2884021 Change-Id: I383721c587a065679078237e175f048152b8d6ec
2021-07-07vhost_user: Move utility function to mod.rsKeiichi Watanabe
Move take_single_file() to mod.rs as it is used in both master feature and slave feature so that we can build the master feature without the slave feature. Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
2021-07-07x86_64 coverage: reduce by 0.8Harshavardhan Unnibhavi
Signed-off-by: Harshavardhan Unnibhavi <harshanavkis@gmail.com>
2021-07-07Inflight I/O: Packed virtqueues queue regionsHarshavardhan Unnibhavi
Signed-off-by: Harshavardhan Unnibhavi <harshanavkis@gmail.com>
2021-07-07Inflight I/O: Split virtqueues queue regionsHarshavardhan Unnibhavi
Signed-off-by: Harshavardhan Unnibhavi <harshanavkis@gmail.com>
2021-07-02build(deps): bump rust-vmm-ci from `6591890` to `d2ab3c0`dependabot[bot]
Bumps [rust-vmm-ci](https://github.com/rust-vmm/rust-vmm-ci) from `6591890` to `d2ab3c0`. - [Release notes](https://github.com/rust-vmm/rust-vmm-ci/releases) - [Commits](https://github.com/rust-vmm/rust-vmm-ci/compare/6591890ee181c75ef87d5601582db0dbc043ae07...d2ab3c090833aec72eee7da1e3884032206b00e3) --- updated-dependencies: - dependency-name: rust-vmm-ci dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
2021-06-23vhost_user: Stop passing around RawFdKeiichi Watanabe
Use `File` or `dyn AsRawFd` instead of `RawFd` to handle ownership easily. Fixes #37. Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org> Change-Id: I6c79d73d1a54163d4612b0ca4d30bf7bd53f9b0f
2021-06-22Add SlaveReqHandler::from_streamChirantan Ekbote
A device process may already have a connected socket to the VMM, for example by inheriting one end of a socketpair() created by the parent process. Add a method to create a SlaveReqHandler directly from a connected socket. Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
2021-06-22build(deps): bump rust-vmm-ci from 24d66cd to 6591890dependabot[bot]
Bumps [rust-vmm-ci](https://github.com/rust-vmm/rust-vmm-ci) from `24d66cd` to `6591890`. - [Release notes](https://github.com/rust-vmm/rust-vmm-ci/releases) - [Commits](https://github.com/rust-vmm/rust-vmm-ci/compare/24d66cdae63d4aa7f8de01b616c015b97604a116...6591890ee181c75ef87d5601582db0dbc043ae07)
2021-06-22coverage: Update coverage_scoreKeiichi Watanabe
Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
2021-06-22pipeline: Bump docker version for custom clippyKeiichi Watanabe
Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
2021-06-22vhost_user: Allow clippy::upper_case_acronymsKeiichi Watanabe
Allow enum names whose characters are all upper case such as `NOOP`. This change is needed to uprev bump rust-vmm-ci's version at #46. Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
2021-06-17slave_req_handler: relax reply_ack_flag testAlex Bennée
In reality the real guest may never see the VHOST_USER_F_PROTOCOL_FEATURES bit during the device feature negotiation. It is explicitly marked as UNUSED in the VirtIO spec so the it would be perfectly valid for it to be ignored by the virtio driver. The vhost-user spec explicitly states about the GET/SET PROTOCOL FEATURES messages: Slave that reported ``VHOST_USER_F_PROTOCOL_FEATURES`` must support this message even before ``VHOST_USER_SET_FEATURES`` was called. which implies the final acked feature set shouldn't impact on the negotiated VHOST_USER_PROTOCOL_F_REPLY_ACK feature. This prevents a hang with the QEMU remote end which makes it's determination to ask for a reply based only on the negotiated protocol feature set: virtio_has_feature(dev->protocol_features, VHOST_USER_PROTOCOL_F_REPLY_ACK); Let's be liberal in what we accept. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Michael S. Tsirkin <mst@redhat.com>
2021-06-16vhost_user: Fix NEED_REPLY for all messagesSebastien Boeuf
Except the list of commands from which we can expect a reply, all the other commands should be able to reply with an acknowledgment if being asked for. For the commands such as SET_PROTOCOL_FEATURES, which usually happens before the protocol features negotiation is complete, we should also be able to reply with an ACK if needed. Indeed, the protocol features negotiation could have happened earlier, which means we might expect a reply ACK from GET_FEATURES command if this happens later on. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-06-11vhost_user: Add Inflight I/O tracking supportSebastien Boeuf
The inflight I/O tracking feature is useful for handling crashes and disconnections from the backend. It allows the backend to rely on a buffer that was shared earlier with the VMM to restore to the previous state it was before the crash. This feature depends on the availability of the protocol feature VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD, and it implements both VHOST_USER_GET_INFLIGHT_FD and VHOST_USER_SET_INFLIGHT_FD messages. Fixes #43 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-06-08Enable feature needed for crosvm merge am: 3a98cbc06bplatform-tools-31.0.3android-s-beta-4android-s-beta-3android-s-beta-4Jason Macnak
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1726071 Change-Id: I6b25ac0e2eab2de24fbfce19635d7e33fce5c0e0
2021-06-08Update 'platform' to 'external' for Android am: cc89ee7ee2Jason Macnak
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1724831 Change-Id: Icda483f80635c68fd69c0bc580422fafe3871f62
2021-06-08vhost_user: Add header flags supportSebastien Boeuf
Introduce a new method set_flags() in order to let the caller define the expected set of flags that should be applied to the header for the following messages. Fixes #40 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-06-02Enable feature needed for crosvm mergeJason Macnak
Bug: b/189933900 Test: m crosvm (with latest merge) Change-Id: I93331b58bbd3597cf53d7fad1d6541585642c231
2021-06-02Update 'platform' to 'external' for AndroidJason Macnak
... to fix errors "failed to read `<my aosp repo>/platform/crosvm/sys_util/Cargo.toml`" when running cargo2android on Crosvm. Bug: b/189933900 Test: cargo2android in external/crosvm Change-Id: I98d3c29b15ff08bd3bc40d0431c632ef9c75c17c
2021-05-27Merge "Upgrade rust/crates/vmm_vhost to ↵Treehugger Robot
eaca5d36a2701c99b354ab5bc0954a78dfc9ff4f" am: d752e1b24a Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1713408 Change-Id: I3fa4a005d32103791f6ffc83b1ffa5ff229191fb
2021-05-27Merge "Upgrade rust/crates/vmm_vhost to ↵Treehugger Robot
eaca5d36a2701c99b354ab5bc0954a78dfc9ff4f"
2021-05-21vhost_user: Fix get/set protocol featuresSebastien Boeuf
Based on the specification, one can call into VHOST_USER_GET_PROTOCOL_FEATURES or VHOST_USER_SET_PROTOCOL_FEATURES before VHOST_USER_SET_FEATURES. The current code is wrong as it expects the VIRTIO features to be already acknowledged at the time the protocol features are get/set. Quote from the spec for both VHOST_USER_GET_PROTOCOL_FEATURES and VHOST_USER_SET_PROTOCOL_FEATURES: Slave that reported VHOST_USER_F_PROTOCOL_FEATURES must support this message even before VHOST_USER_SET_FEATURES was called. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-05-20Update license name to match new project path am: 61511343d2Jorge E. Moreira
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1704148 Change-Id: I80921d1a936fc5ee668d94b6b4a56bcf30b042d2
2021-05-19Upgrade rust/crates/vmm_vhost to eaca5d36a2701c99b354ab5bc0954a78dfc9ff4fJoel Galenson
Test: make Change-Id: I1cc8024a4bb1e9d6fee8e747720dbd7a6fd92d8b
2021-05-18Add custom pipeline yaml for wider clippy coverageKeiichi Watanabe
Fixes #25. Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
2021-05-12Add metadata files am: fa467c1dd1Jorge E. Moreira
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1704407 Change-Id: Ieaf0ef115a7cfaf225f0b5a82afd62b706e1f1d3
2021-05-11Update license name to match new project pathJorge E. Moreira
Bug: 187839847 Change-Id: I25ab2c8d757e5d2fccb02c5eca3e1dac69affa7a
2021-05-11Add metadata filesandroid-s-beta-2android-s-beta-1Jorge E. Moreira
Bug: 187839847 Change-Id: I0d6278674b0bdfb5ac59c9878b769b6c3461fb1a
2021-05-11Upgrade to GitHub-native Dependabotdependabot-preview[bot]
2021-05-10vhost_user: implement From instead of IntoDaniel Verkamp
Implementing From<...> provides the equivalent Into<..> automatically, so this form is preferred. Fixes the clippy from_over_into warning: https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
2021-04-30[LSC] Add LOCAL_LICENSE_KINDS to external/rust/crates/vmm_vhost am: 17c6610442Bob Badour
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1690702 Change-Id: I6fd5c6485de0c4e0ad3ca0d3ca87c436945182a2
2021-04-29[LSC] Add LOCAL_LICENSE_KINDS to external/rust/crates/vmm_vhostBob Badour
Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I91d89b2ea6990a4665e1af35adee017233affdc8
2021-04-28Merge remote-tracking branch 'cros/upstream/master' into HEADDylan Reid
Change-Id: Ib26713fadbb587790a5756f0c40e0b23743c2755
2021-04-28vhost_user: Fix check for SET_VRING_ENABLEKeiichi Watanabe
We should allow to receive SET_VRING_ENABLE request with non-zero index even if MQ protocol feature is disabled because some device can have multiple queues without the MQ feature. e.g. virtio-net means that it supports multiple pairs of tx/rx queues. So, the slave must support at least one pair of queues regardless of whether MQ is supported. Instead, make it check if VHOST_USER_F_PROTOCOL_FEATURES has been negotiated. Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
2021-04-26Re-Add Android.bp file am: 200df3137aJorge Moreira Broche
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1676155 Change-Id: Ie7820d86a7eda741b18c707629fd01035159a79a
2021-04-15Revert "Add Android.bp file" am: 66cbf7119aMatthew Maurer
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1676804 Change-Id: Ia5df8fd7c6a3963d0d17923fcaf3627cc3207ce2
2021-04-15Add Android.bp file am: cb90b5b4d9Jorge E. Moreira
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1676995 Change-Id: I0a48925dca82642305f67fc02ed6869cca75d96c
2021-04-15Merge remote-tracking branch 'aosp/upstream-main' am: 86868ea15cJorge E. Moreira
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1676994 Change-Id: I1896033874d9f7edc287a4dbf3d3294251eed104
2021-04-15Re-Add Android.bp fileJorge Moreira Broche
This time in a topic with the crosvm changes it depends on This reverts commit 66cbf7119a2e3023664171adbd528ac94243e2c5. Reason for revert: Merging along the changes it depends on Change-Id: Idafa87fcc683efece89fdd807117b12e111bb1ef
2021-04-15Revert "Add Android.bp file"Matthew Maurer
This reverts commit cb90b5b4d9a76b03c9774df919f0dc74c331dc51. Reason for revert: Breaking Build Change-Id: I24874cb134d4b2f46a0499f71674b324ab24649f
2021-04-15Add Android.bp fileJorge E. Moreira
Bug: 185157703 Test: build updated crosvm locally Change-Id: I34fbdc6b798ae4e1d56f6cd20f94b6c3634987e3
2021-04-15Merge remote-tracking branch 'aosp/upstream-main'Jorge E. Moreira
Bug: 185157703 Test: locally with following change Change-Id: Id39b5523128be41f44b551722ffcf325b58dbb58
2021-04-14Initial empty repositoryInna Palant
2021-04-05Fix typos in the error messagesStefano Garzarella
Replace 'virtque' with 'virtqueue' and 'talbe' with 'table'. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2021-03-29vhost_user: config offset matches qemuDylan Reid
Modify the interpretation of the set and get config offset field to match qemu. The wording in the vhost user spec is ambiguous, bet lets defer to qemu's implementation so vhost based devices can be used with qemu as a VMM. Fixes #29. Signed-off-by: Dylan Reid <dgreid@chromium.org> Change-Id: Ib1b909d02c3b7dab1964799f0a4d960f1ef308fa
2021-03-18build(deps): bump rust-vmm-ci from `ebc7016` to `24d66cd`dependabot-preview[bot]
Bumps [rust-vmm-ci](https://github.com/rust-vmm/rust-vmm-ci) from `ebc7016` to `24d66cd`. - [Release notes](https://github.com/rust-vmm/rust-vmm-ci/releases) - [Commits](https://github.com/rust-vmm/rust-vmm-ci/compare/ebc701641fa57f78d03f3f5ecac617b7bf7470b4...24d66cdae63d4aa7f8de01b616c015b97604a116) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>