summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-14Remove everything except OWNERS. am: 7f5633b28cHEADandroid-t-preview-2android-t-preview-1android-t-beta-3android-s-v2-beta-3android-s-qpr3-beta-1mastermainandroid-t-preview-1android-s-v2-beta-3android-s-qpr3-beta-1Andrew Walbran
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1907704 Change-Id: Ieb51052261cecd2e307dc59e53a25d0c2d3f25d2
2021-12-02Remove everything except OWNERS.Andrew Walbran
vmm_vhost is now part of the crosvm repository. Bug: 207770431 Test: m crosvm Change-Id: I837b2bbe9fc802702164d22177884971d6766572
2021-11-11tempfile moved out of crosvm, so remove the path override here. am: 75b8a2d939Andrew Walbran
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1873618 Change-Id: I3d61d0b33adeada505175a79983259fed3ff53a7
2021-10-29tempfile moved out of crosvm, so remove the path override here.Andrew Walbran
Change-Id: Ide6c46a96cea6b7c3c3a307ab3307635f1eb06d9
2021-10-29Fix path to sys_util and tempfile. am: 2b46221057Andrew Walbran
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1874074 Change-Id: Id7cfd284a959466659b721f3f1513956bf4f3f78
2021-10-28Fix path to sys_util and tempfile.Andrew Walbran
This is needed for cargo2android.py to work properly for crosvm. Bug: 204072128 Test: ./all2android.sh under external/crosvm Change-Id: Ia4e1ad62564f3b1e082d0ae7fd65900b0fbade2f
2021-09-30Upgrade rust/vmm_vhost to d65bd280d9f4e192a884f1761e4b097c11aae6de am: ↵android-s-v2-preview-2android-s-v2-preview-1android-s-v2-beta-2android-s-v2-preview-1Joel Galenson
25c2a16906 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1833581 Change-Id: I94586f9e5cffa50234de86b2701786cb726f3e09
2021-09-22Upgrade rust/vmm_vhost to d65bd280d9f4e192a884f1761e4b097c11aae6deJoel Galenson
Test: make Change-Id: I4065eb4385c40bed09ce804ca7343b668f4822e7
2021-09-09CHROMIUM: Use File for device request fdChirantan Ekbote
There is nothing in the vhost-user documentation or spec that says this must be a socket for fs device requests. It's not even guaranteed that it is an fd for a UnixStream. Change the type to a File and leave it up to the backend to convert it into a more specialized type if necessary. Upstream PR: https://github.com/rust-vmm/vhost/pull/49 BUG=b:179755651 TEST=cargo test Cq-Depend: chromium:2987594 Change-Id: I52ce0c62e0627a87462be8e0a44fa534763f10ed Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/rust-vmm/vhost/+/2988140 Tested-by: Chirantan Ekbote <chirantan@chromium.org> Commit-Queue: Chirantan Ekbote <chirantan@chromium.org> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2021-08-31Merge remote-tracking branch 'upstream/master' into HEADDaniel Verkamp
Pull in warning fixes for Rust 1.53+. BUG=None TEST=cargo test --all-features Change-Id: Idd7a8d5bceee304e7667c62e0f878c373ea47929
2021-08-18Upgrade rust/vmm_vhost to fff997dda0625bd6f7c33bc0d79653c91b41b6c7 am: ↵Joel Galenson
570efe19a5 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1791050 Change-Id: I2a25a0e6fe50579bc9475198c3f231a01310bc1e
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-29fix warning: unaligned_referenceswanglei01
fix warning, when compiling with 1.53.0 ``` warning: reference to packed field is unaligned --> src/vhost_user/message.rs:252:53 | 252 | unsafe { std::mem::transmute_copy::<u32, R>(&self.request) } | ^^^^^^^^^^^^^ | = note: `#[warn(unaligned_references)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523> = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) ``` Signed-off-by: wanglei <wllenyj@linux.alibaba.com>
2021-07-26Inflight I/O: Make struct members publicHarshavardhan Unnibhavi
Signed-off-by: Harshavardhan Unnibhavi <harshanavkis@gmail.com>
2021-07-21x86_64 coverage: reduce by 0.6Harshavardhan Unnibhavi
Signed-off-by: Harshavardhan Unnibhavi <harshanavkis@gmail.com>
2021-07-21Inflight I/O: Make structs and members publicHarshavardhan Unnibhavi
Signed-off-by: Harshavardhan Unnibhavi <harshanavkis@gmail.com>
2021-07-20Merge remote-tracking branch 'aosp/upstream-main' into mergeupstream am: ↵Andrew Walbran
e7f63d9629 am: c2979cdd9f Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1768745 Change-Id: I64ec66ad5a214d0792555982251a35912840ff3d
2021-07-20Merge remote-tracking branch 'aosp/upstream-main' into mergeupstream am: ↵Andrew Walbran
e7f63d9629 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1768745 Change-Id: Ic66e983b673cd36e63bb78f53d36e0a7d0c43358
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: 3a98cbc06b am: 72170f95e7Jason Macnak
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1726071 Change-Id: Id4889cc7a157e0cd88679cdb19e6b991850ac513
2021-06-08Update 'platform' to 'external' for Android am: cc89ee7ee2 am: eaa0f1c8c1Jason Macnak
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1724831 Change-Id: I06dfec73cda337b5856ba3fb324a1ffe3176bed6
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 am: 81b093c96c Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1713408 Change-Id: I4b7c1331b9a1fbbe1aa92dac714ac7d0666c2326
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: 61511343d2 am: 229e68740eJorge E. Moreira
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/vmm_vhost/+/1704148 Change-Id: I2e74da86c939d895e56ac1ee6cd4552016456ad7
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>