Ensure that every Cargo.toml dependency on a third-party crates.io crate
specifies at least a major version, or a minor version for 0.x crates,
to ensure that if a new major version is published, it cannot cause API
breaks.
The versions are selected to match the ones already in Cargo.lock, so
this should have no functional change, but it will help prevent new "*"
versions from being introduced via copy-and-paste.
For rationale, see the Cargo FAQ:
<https://doc.rust-lang.org/cargo/faq.html#can-libraries-use--as-a-version-for-their-dependencies>
`minijail`, `audio_streams`, and `cras` are left as "*" for now, since
they have unusual situations (imported from a submodule and/or replaced
at build time with ebuild magic).
BUG=None
TEST=tools/dev_container tools/presubmit
TEST=verify Cargo.lock is unchanged
Change-Id: Ifa18199f812f01d2d10bfb4146b3353c1a76527c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5555656
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
The riscv64 architecture support uses the `hypervisor` crate API, not
`kvm` directly; this was probably included unintentionally or left over
from old pre-`hypervisor`-crate code.
BUG=None
TEST=grep for `kvm` in `riscv64` directory
Change-Id: I45eb1c9c50a0b0bb4590334d8bf7f374182b9275
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5518122
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
The gdb support is implemented outside of the hypervisor crate now,
aside from two debug-specific VcpuAarch64 functions, which don't depend
on the gdbstub crate for their API. Drop the cfg checks and make these
APIs always available (the compiler will optimize them out if they are
not called anyway) and remove the unused gdbstub dependencies.
BUG=b:323354478
TEST=tools/dev_container tools/presubmit
Change-Id: Ieb313a1098239e9d764207c9cb6cc18c8a376795
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5500375
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Several crates still declared a dependency on data_model despite not
using any imports from it.
BUG=b:312312646
TEST=tools/dev_container tools/presubmit
Change-Id: I63a67696c205f684b1e4ac8bdad4de5f294b63dc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5370964
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
gdbstub 0.6.3 -> 0.7.0
gdbstub_arch 0.2.4 -> 0.3.0
There is small change in API, see src/crosvm/gdb.rs. `read_addrs` now returns a `usize` instead of a `()`.
This change is needed to submit this AOSP topic: https://android-review.git.corp.google.com/c/platform/external/crosvm/+/2879249
BUG=b:286979636
TEST=tools/presubmit --all
Change-Id: I124d65e673c5943070c2bb5e39e3a7e5506e5528
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5146447
Commit-Queue: Frederick Mayle <fmayle@google.com>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Updates are made to source and documentation.
This more accurately represents the currently supported platforms of
Android/Linux and Windows, without unexpectedly including other
unix-like operating systems.
Command to reproduce:
$ find . -type f -not -path '*/\.git/*' | xargs -I {} sed -i 's/cfg(unix)/cfg(any(target_os = "android", target_os = "linux"))/g' {}
$ cargo fmt
md files manually updated to fix line lengths.
Renaming `unix` modules to `linux` will be done in a later CL.
Test: ./tools/dev_container ./tools/presubmit
Bug: b/298269162
Change-Id: I42c1bf0abf80b9a0df25551613910293217c7295
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4909059
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
http://crrev.com/c/4477776 made riscv64 dependencies conditional to fix
Windows builders. This is slightly inconvenient for Android, which needs
to manually fixup dependencies as a result (see http://aosp/2655597).
This change makes only the minijail dependency conditional, which
satisfies Windows builders and simplifies Android.
BUG=b:286142463
TEST=CQ
Change-Id: I88f31f23dcc802dcf81ca554e728e7b9e9aaa46d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4684773
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Braden Kell <bradenkell@google.com>
Remove the architecture-specific requirements from the gdb config
checks. This enables gdb across every supported target_arch without
having to manually add new architectures to each cfg check.
For the specific case of target_arch = "arm", this patch will newly
enable gdb support. The gdbstub protocol will still send aarch64 state,
matching the guest.
This stubs out enough riscv64 gdb functions and types to make
`cargo build --features=gdb` compile, but gdb support will not be
functional on that architecture without additional work.
Change-Id: I63b079b7a3dca4aec2c13c775c0ccb8850625884
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4506285
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Dylan Reid <dgreid@rivosinc.com>
Instead of unconditionally depending on these dependencies only include
them for riscv64 builds. This will fix a build breakage on the windows
builders.
Thanks to denniskempin and dverkamp for suggesting this fix.
Change-Id: I035dc23cd0b58f63a3bcb3b8f883aba97d56492d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4477776
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Basic support for riscv. This, combined with follow on commits adds
basic support for booting a linux kernel on a riscv machine. This has
been tested with a qemu host as the riscv hypervisor extension is not
yet widely available in hardware.
Change-Id: I44f83f1acf1be2297b62d1f10311e3e47319e5f8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4460936
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>