Add a flag '--gdb <port>' to provide GDB remote protocol interface so
a developer can attach GDB to the guest kernel.
In this CL, we support read/write operations for registers and memories.
BUG=chromium:1141812
TEST=Attach gdb and see register values on workstation and intel DUT
Change-Id: Ia07763870d94e87867f6df43f039196aa703ee59
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2440221
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: Keiichi Watanabe <keiichiw@chromium.org>
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
io_jail has been migrated to aosp/external/minijail/rust/minijail.
This removes the crosvm copy and updates the references to use the new
location.
BUG=chromium:1096175
TEST=cargo test
Cq-Depend: chromium:2254418
Change-Id: I29d5c6178b6faf5e52671cfbe6fc7e51f0d21dd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2254298
Tested-by: Allen Webb <allenwebb@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Allen Webb <allenwebb@google.com>
Change-Id: Ia86cb49ffc89ad66fe67698e05968e6d6f19f743
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2231364
Auto-Submit: Andrew Walbran <qwandor@google.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Commit-Queue: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
We have instructions for building with Docker, but it's now possible to build
for normal Linux distros too. Also add a pointer to the main CrOS developer
guide.
BUG=none
TEST=follow the instructions
Change-Id: Ic7ce498268f8057fbe90a88166017f54108d0e16
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2057747
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Stephen Barber <smbarber@chromium.org>
Commit-Queue: Stephen Barber <smbarber@chromium.org>
Copy the IRC text from the chromium docs, giving users a place to go ask
questions.
Change-Id: I9466cb3058823b6afd65ff2912b05d8a70d70229
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2052390
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Dylan Reid <dgreid@chromium.org>
We emulate some hardware now, so this statement isn't accurate.
BUG=none
TEST=none
Change-Id: Id8e0e1189001d5b5fe62e032a28fe797bfd9721b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2007998
Reviewed-by: Zach Reizner <zachr@chromium.org>
Commit-Queue: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Remove the last (unused) reference to byteorder in vm_control/Cargo.toml
and remove it from the list of external crates in README.md.
BUG=None
TEST=./build_test
Change-Id: Ie70c0bc2f96c19b34ef1596885245eca7bc202f4
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1761156
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Add a script to run `cargo fmt` on all Rust code contained in crosvm.
This is different from `cargo fmt --all` which formats multiple crates
but a single workspace only. Crosvm consists of multiple workspaces.
Usage:
$ bin/fmt
To print a diff and exit 1 if code is not formatted, but without
changing any files, use:
$ bin/fmt --check
TEST=those commands
TEST=local kokoro
Change-Id: I4194509ad3a1bbc829c4b1069d54d940b927113b
Reviewed-on: https://chromium-review.googlesource.com/1477498
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Update the readme to indicate that crosvm starts in multiprocess mode by
default.
Also fix a few typos I spotted while skimming the rest of the document.
BUG=None
TEST=None
Change-Id: Ia3992ec7cbf27be984269f5399d48e7fd5c6fc8f
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1428339
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Since /var/run is a symlink to /run, and we want to avoid going
through the stateful /var whenever possible, use the direct path.
BUG=chromium:699880
TEST=precq passes
Change-Id: I5d95f5358c1fb0cb2ca73f9c4b145d8e36b4a361
Reviewed-on: https://chromium-review.googlesource.com/734225
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Moving the devices to their own module makes it easier to add tests that
use them.
Change-Id: I61bfef4037d16b20145b5fddce604835cdc4f67b
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/706559
Reviewed-by: Zach Reizner <zachr@chromium.org>
Break out vm_control to a crate that will be able to used by more
modules. Having vm_control usable from outside crosvm makes it possible
to move the devices out of crosvm in a later commit.
Change-Id: I1f060700ed49b5d77519d55efa2430490d521256
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/706558
Reviewed-by: Zach Reizner <zachr@chromium.org>
Change the default option to use a sanboxxed process for each device.
The old behavior can be re-enabled with the `--disable-sandbox` flag.
Change-Id: I65762a6cb52afac210fc0e683d999f20fe67a57e
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/696715
Reviewed-by: Zach Reizner <zachr@chromium.org>
This program is used to boot a 64-bit kernel elf. It has support for
basic devices that are exposed to the kernel, including a block device.
TEST=cargo test;
cargo run -- -m 512 -c 4 -d rootfs.squashfs -u -p "init=/bin/bash" vmlinux
BUG=chromium:712319
Change-Id: I25a8349a4624d8643fefe2ad70e517fe03b16b8c
Reviewed-on: https://chromium-review.googlesource.com/514417
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>