Commit graph

6 commits

Author SHA1 Message Date
Zach Reizner
7ca9f771e7 add plugin support for configuring CPUID
The guest expects to be able to read the CPUID, so the plugin process
needs to specify what the CPUID for each VCPU will have.

TEST=cargo test --features plugin; ./build_test
BUG=chromium:800626

Change-Id: I9258540ab2501126c3d8cadbd09b7fc01d19f7a9
Reviewed-on: https://chromium-review.googlesource.com/906006
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2018-02-12 22:42:38 -08:00
Zach Reizner
086922c222 kvm: add set_irq_routing method
This is used by the plugin process API, which may register an IRQ
routing table.

TEST=./build_test
BUG=chromium:800626

Change-Id: If40965e8abfb0c9074c90b5fc77f9042f06499e0
Reviewed-on: https://chromium-review.googlesource.com/857910
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
2018-01-25 19:23:42 -08:00
Sonny Rao
4aa86930ed kvm_sys: update bindings and add aarch64 bindings
Re-generated the bindings for x86_64 and arm which now use union types
so a little bit of code in the library also changed, and adds bindings
for aarch64 which are required to run an aarch64 guest.

Also, I manually fixed the zero-length array cases where rust bindgen
doesn't properly align the structs.  See rust bindgen bug 684.

BUG=chromium:797868
TEST=run crosvm on x86_64, ensure networking works
TEST=./build_test passes on x86

Change-Id: Iab2193a8f1d4c68bd3346ae683c74bbf16fe45d4
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/845519
Reviewed-by: Zach Reizner <zachr@chromium.org>
2018-01-02 21:32:18 -08:00
Zach Reizner
56077cf863 fix compiler errors and warnings
Problems that were fixed:
  - gcc crate deprecated compile_library
  - `cargo test -p kvm` had a compile error
  - `cargo test -p kvm_sys` failed to link with libc
  - main.rs failed to include `getpid` and had dead code
  - fork.rs had a warning in `cargo test -p sys_util`
  - unused const in serial.rs

BUG=None
TEST=sudo cargo test -p data_model -p io_jail -p kernel_loader -p kvm \
     -p kvm_sys -p net_sys -p net_util -p syscall_defines -p sys_util \
     -p virtio_sys -p vhost -p x86_64 -p crosvm

Change-Id: Iaf0389013fbcdfbfaa7cf37ea1a1fc045f480ada
Reviewed-on: https://chromium-review.googlesource.com/642509
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
2017-08-30 13:04:16 -07:00
Stephen Barber
c4968f7de9 sys_util: add ioctl module
Factor out common ioctl wrappers and macros into their own module.

Signed-off-by: Stephen Barber <smbarber@chromium.org>

BUG=none
TEST=cargo test

Change-Id: Ibede8a853f5cc6c6d62565930f312b11024cc5b5
Reviewed-on: https://chromium-review.googlesource.com/566540
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2017-07-13 22:03:30 -07:00
Dylan Reid
303f86fa21 kvm-sys: rename to kvm_sys
underscores are better

Change-Id: Ida36de419f6ecf704f40d868cf7296d4d4fc41e6
Reviewed-on: https://chromium-review.googlesource.com/492666
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2017-05-02 05:20:27 -07:00