summary refs log tree commit diff
path: root/vhost
Commit message (Collapse)AuthorAge
* hw/virtio/vhost: Add simple tests backed by fakesJason D. Clinton2018-02-02
| | | | | | | | | | | | | | | | | | | | This slightly advances the use of fakes to test higher level application logic. The fakes are rudimentary at this point, but I wanted to get feedback on the addition of generics in order to facilitate swaping concrete implementations out with fakes in higher level code. BUG=none TEST=./build_test and cargo test -p crosvm -p data_model -p syscall_defines -p kernel_loader -p net_util -p x86_64 -p virtio_sys -p kvm_sys -p vhost -p io_jail -p net_sys -p sys_util -p kvm Change-Id: Ib64581014391f49cff30ada10677bbbcd0088f20 Reviewed-on: https://chromium-review.googlesource.com/689740 Commit-Ready: Jason Clinton <jclinton@chromium.org> Tested-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org>
* crosvm: change GuestAddress to always be a u64Sonny Rao2018-02-01
| | | | | | | | | | | | | | | We want to be able to run 64-bit ARM kernels using a 32-bit version of crosvm, to make it more consistent use a u64 to represent GuestAddress. BUG=chromium:797868 TEST=./build_test passes on all architectures TEST=crosvm runs on caroline Change-Id: I43bf993592caf46891e3e5e05258ab70b6bf3045 Signed-off-by: Sonny Rao <sonnyrao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/896398 Reviewed-by: Dylan Reid <dgreid@chromium.org>
* Implement virtio-vsockChirantan Ekbote2017-09-18
| | | | | | | | | | | | | Implement the virtual sockets device using vhost subsystem of the host kernel to handle data transfer. BUG=chromium:708267 TEST=build and run maitred in guest VM without issue Change-Id: I35b542c0fc7e0fd9296f7ba3e1dfce60bf524d15 Signed-off-by: Chirantan Ekbote <chirantan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/638838 Reviewed-by: Stephen Barber <smbarber@chromium.org>
* vhost: Fix-up failing tests and add a little more coverageJason D. Clinton2017-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | This fakes out the underlying Net implementation with FakeNet to try and get some of the code a little further along before it explodes. Then, we test for known failures when running without a real vhost file descriptors. This allows us to pass without running as root as we would expect running on Paladins. This is also the final module that was failing at ToT. Also adds vhost to the build_test test targets. BUG=none TEST=Run unit tests: cargo test -p crosvm -p data_model -p syscall_defines -p kernel_loader -p net_util -p x86_64 -p virtio_sys -p kvm_sys -p vhost -p io_jail -p net_sys -p sys_util -p kvm Also ran ./build_test Change-Id: Ie12d05c044634a660a234483532cf783e2a7fe84 Reviewed-on: https://chromium-review.googlesource.com/656278 Commit-Ready: Jason Clinton <jclinton@chromium.org> Tested-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: Jason Clinton <jclinton@chromium.org>
* Refactor VhostNet into separate vhost and net piecesChirantan Ekbote2017-08-28
| | | | | | | | | | | | | | | | | | A large portion of the VhostNet implementation is common to all vhost devices. Create a new Vhost trait that encapsulates this behavior and split the network specific bits into a new Net type and implement the Vhost trait for it. BUG=chromium:708267 TEST=build and run with a VHOST_NET enabled kernel and see that everything still works fine Change-Id: Ia6b7591f9428c1fba1e13b11791fe40e1bd3942b Signed-off-by: Chirantan Ekbote <chirantan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/630060 Reviewed-by: Jason Clinton <jclinton@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>
* vhost: add crate for interacting with vhost netStephen Barber2017-07-20
Signed-off-by: Stephen Barber <smbarber@chromium.org> BUG=chromium:738639 TEST=cargo test Change-Id: I83ef1657a90c3946db296c2e743397dbd1947de4 Reviewed-on: https://chromium-review.googlesource.com/538101 Commit-Ready: Stephen Barber <smbarber@chromium.org> Tested-by: Stephen Barber <smbarber@chromium.org> Tested-by: Dylan Reid <dgreid@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org>