Commit graph

179 commits

Author SHA1 Message Date
Daniel Verkamp
55c3856818 docs: update ChromeOS developer guide links
These have moved back to the www.chromium.org website.

Change-Id: I2e29687a8a074b308249949d4272357ec20af8ba
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5381669
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-03-21 17:41:27 +00:00
Junichi Uekawa
8c8939860e book: qemu-user not qemu-static.
static is just describing how the binaries are linked; the emulator being used
is the qemu-user, which emulates guest userspace syscall API and uses the host
kernel.

BUG=None
TEST=read it

Change-Id: I8b827498727de4ce85604dc3b9efebd89df56e62
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5308639
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Reviewed-by: Ryuichiro Chiba <chibar@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2024-03-14 09:33:50 +00:00
Federico 'Morg' Pareschi
e59edadc4e docs: Add u2f device support page to mdbook
BUG=b:326345530
TEST=built mdbook

Change-Id: Iff8aee96b640b954cf9caf58c5618c48e0168b7d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5320441
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Morg <morg@google.com>
2024-03-14 02:45:28 +00:00
Noah Gold
2bc8a5d7c6 book: style guide: add dispatch enum pattern.
auradkar@, fmayle@, schuffelen@, and nkgold@ discussed
the guidance for cross platform enums and have decided
to recommend a new pattern for dispatch style enums.

BUG=NONE
TEST=builds

Change-Id: I07ce234753a5c39873ae214d6407181cbd46fcf0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5369097
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Reviewed-by: Cody Schuffelen <schuffelen@google.com>
2024-03-13 22:53:09 +00:00
Bogdan-Cosmin Chifor
244f1e1d37 x86_64: Enable identity map address and accomodate larger BIOS size
On Azure Dv3 instances `unrestricted guest` is not available.
This prevents crosvm from booting, because TSS address overlaps
with BIOS memory region when BIOS is larger than ~250K.
This fix allows 16M BIOS maximum size and enables identity map address
which allows crosvm to boot on machines where `unrestricted guest` is
not available.

BUG=None
TEST=tools/presubmit
TEST=Boot an AOSP Cuttlefish VM on Azure (without unrestricted guest) and GCP (with unrestricted guest)

Co-authored-by: Bogdan-Cosmin Chifor <bogdan.chifor@tii.ae>
Co-authored-by: Mikko Koivisto <mikko.koivisto@unikie.com>
Co-authored-by: Myung Kyu Kim <myung.kyu.kim@unikie.com>
Change-Id: Ibf7b6685eca969f5f52dd6e5f3510bf919c14e2c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5290234
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-02-16 21:41:01 +00:00
Daniel Verkamp
e23ea9b060 cmdline: add --input to consolidate virtio-input options
Add a single --input command-line option that can accomodate all virtio
input device types. This will eventually replace the existing input
options such as --keyboard, --mouse, and --multi-touch. For now, a
deprecation notice is added and the existing options continue to work as
before.

BUG=b:255223604
BUG=b:321746987

Change-Id: I243c76a6e16ee0019b4538a39af0363bdfe32d59
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5226605
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-02-13 21:56:14 +00:00
Keiichi Watanabe
1790e3681a docs: Fix link to the internal uprev playbook
BUG=none
TEST=mdbook serve

Change-Id: Id18cb9f43e96d0736384d5a8f20cb36706e16830
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5223795
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
2024-01-23 18:49:48 +00:00
Shintaro Kawamura
aa0e6ea99a doc: how to cherry-pick to release branch
BUG=none
TEST=mdbook serve

Change-Id: Ie21d9e3c8e575785d0907b5a39bcb8bca1d5e8f6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5201654
Commit-Queue: Shin Kawamura <kawasin@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2024-01-18 08:00:31 +00:00
Keiichi Watanabe
7ac450d400 book: Use v6.6 termina kernel in custom_kernel_rootfs
Since we started using v6.6 for termina, let's use it
for the crosvm's example as well

BUG=b:314352490
TEST=run crosvm by following the instruction

Change-Id: I9e6f6a2ddcbc6a908d60155611a4f8047a92f021
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5188016
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Morg <morg@google.com>
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
2024-01-11 18:50:52 +00:00
Joe Hattori
70f5f0ddaa docs: Add SCSI section.
Currently we have an experimental SCSI device, but documentation does
not exist. This commmit adds a SCSI section to the crosvm book.

TEST=mdbook build
BUG=b:300042376

Change-Id: Ie54f6ed364436963fc0169b456e8033f4616866d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5075264
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Joe Hattori <hattorij@google.com>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
2023-12-01 11:10:03 +00:00
Elie Kheirallah
f1cceab6f1 docs: add info about two-step snapshotting
BUG=b:303092706
TEST=mdbook build

Change-Id: I02f461d0643119d168a618373c7164fed988f115
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5046338
Auto-Submit: Elie Kheirallah <khei@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-11-21 20:26:48 +00:00
Daniel Verkamp
5172482b39 crosvm: add generic --vhost-user frontend option
Deprecate the existing --vhost-user-* device-specific frontend options
and replace them with a single --vhost-user option that takes the device
type as one of its arguments.

This simplifies the device setup code significantly; there is now a
single list of vhost_user frontend devices that can be created in one
loop instead of scattering device-type-specific creation all over the
create_virtio_devices() function.

The DeviceType names are normalized for this new --vhost-user option as
well - when relevant, they use the full name rather than abbreviating it
inconsistently (for example, "blk" is now known as "block", which
matches the option used with `crosvm devices`). A few special cases are
handled with serde renames (such as "p9" -> "9p"), but all other device
types use the default serde kebab-case naming.

BUG=b:262291811
TEST=connect to `crosvm devices` and virtiofsd with --vhost-user

Change-Id: I75e9442f73af122ccfda9731331cde5c238b88fb
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5030974
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2023-11-21 19:14:01 +00:00
Joe Hattori
ec26085d6b devices: virtio: Add trace points to virtio-blk and virtio-scsi
This commit adds tracing points in virtio-blk and virtio-scsi, so that
developpers can easily measure the performance of each commands.

BUG=300042376
TEST=tools/presubmit

Change-Id: Iaae2912505c6e224fa1fe587fb51c97838ecb66b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5035879
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Commit-Queue: Joe Hattori <hattorij@google.com>
2023-11-16 11:34:15 +00:00
A. Cody Schuffelen
6e8a64dea7 Replace base sys.rs cfg_if with multiple use statements
This allows defining `platform` out of a composite of symbols from
different platforms, which is relevant for multi-platform pieces like
`unix`.

Bug: b/309011910
Change-Id: Iccdc7927dba6ecf4dd45c58ae0f6caa698b94c86
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4997936
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-11-03 21:14:36 +00:00
Noah Gold
67a814074f docs: add unsafe comment style guidance.
We've been following most of these practices already, but it seems worth
writing them down especially for new contributors. Something new
here is `unsafe_op_in_unsafe_fn` which I saw in one of kawasin@'s swap
CLs. It seems like a really useful tool to help us convey more subtle
safety situations.

BUG=none
TEST=build mdbook & verified the page looks reasonable.

Change-Id: I4151d0cff9969900abbbe5832bb61c9a04327d8b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4996510
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Shin Kawamura <kawasin@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
2023-11-01 23:34:15 +00:00
Daniel Verkamp
6db7340bca docs: book: update ChromeOS kernel branch to 6.1
This is what we are shipping with Crostini, so update the docs to match.

Also fix a debootstrab -> debootstrap typo.

BUG=b:299353857
TEST=(cd docs/book; mdbook build)

Change-Id: Icf2f967e8bd44e2aabc8f74cd96c89811ac3352a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4578299
Auto-Submit: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Zihan Chen <zihanchen@google.com>
Reviewed-by: Zihan Chen <zihanchen@google.com>
2023-10-25 00:44:04 +00:00
Elie Kheirallah
4387a66d07 docs: add log levels to advanced_usage
Add details on how to change log levels in crosvm.

BUG=N/A
TEST=mdbook build

Change-Id: I2ded0d14c5df9bf2032d8e4fb0896882c754fda5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4956179
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Elie Kheirallah <khei@google.com>
2023-10-19 23:14:01 +00:00
A. Cody Schuffelen
4748c54b95 Rename "unix" to "linux" in code and docs
$ for DIR in $(find . -name "unix"); do mv $DIR $(echo $DIR | sed "s/unix/linux/"); done
$ for FILE in $(find . -name "unix.rs"); do mv $FILE $(echo $FILE | sed "s/unix/linux/"); done
$ find . -type f -not -path '*/\.git/*' | xargs -I {} sed -E -i "s/mod unix/mod linux/g" {}
$ find . -type f -not -path '*/\.git/*' -not -path '*/third_party/perfetto/*' | xargs -I {} sed -E -i "s/([^o][^s])::unix/\1::linux/g" {}
$ find . -type f -not -path '*/\.git/*' | xargs -I {} sed -E -i "s/use unix::/use linux::/g" {}
$ find . -type f -not -path '*/\.git/*' -not -path '*/third_party/perfetto/*' | xargs -I {} sed -E -i "s/sys::unix/sys::linux/g" {}
$ find . -type f -not -path '*/\.git/*' | xargs -I {} sed -E -i "s/use unix as platform/use linux as platform/g" {}

Test: ./tools/dev_container ./tools/presubmit
Bug: b/298269162
Change-Id: I2c8acb14d77a5588dab4eae124f4a9afbb9025f5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4909060
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
Reviewed-by: Frederick Mayle <fmayle@google.com>
2023-10-11 01:15:07 +00:00
A. Cody Schuffelen
97dff044f8 Replace #[cfg(unix)] with #[cfg(any(target_os = "android", target_os = "linux"))]
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>
2023-10-11 00:43:29 +00:00
Daniel Verkamp
e10df59fd3 devices: remove --software-tpm support
The software TPM backed by the libtpm2 simulator was only used for
testing; now that we have the vTPM proxy device, the software TPM is no
longer needed.

This also allows removal of the tpm2 submodule (tpm2-sys/libtpm2).

BUG=b:300673042
TEST=tools/dev_container tools/presubmit

Change-Id: I3feb5f715f9f12f832450df712c0f63ed7b4fb13
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4875221
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-10-02 23:28:45 +00:00
Federico 'Morg' Pareschi
8582fde1ce docs: add instructions to run virtio-fs as rootfs
BUG=None
TEST=`./tools/dev_container ./tools/fmt` and mdbook build

Change-Id: I7fa86a9ad571ff15d8605c6a44e5a76547cb9f76
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4768222
Auto-Submit: Morg <morg@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Morg <morg@google.com>
2023-09-14 05:20:24 +00:00
Daniel Verkamp
40114fd26e Remove virtio-vhost-user (VVU) support
This code is unused and untested, while simultaneously making the rest
of the virtio device code more complex. Remove it.

BUG=b:276993009
TEST=tools/dev_container tools/presubmit

Change-Id: I9d44f92419c6912d1735043404d4f64efc95bba4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4676076
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Frederick Mayle <fmayle@google.com>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2023-09-05 17:59:33 +00:00
Gurchetan Singh
803cbb2ca8 docs: add gfxstream release links, also FFI description
To make potential Debian packaging easier, include links
to latest release.

BUG=b:296070975
TEST=compile

Change-Id: I13a49acb8ec2f677e3095c31e24ad9a6e2a9a1cc
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4808252
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
2023-08-23 23:31:37 +00:00
Gurchetan Singh
f73bb33b84 docs/book: clarify gfxstream guest Linux support
Clarify that not all headless tests work.

BUG=b:291606715
TEST=compile

Change-Id: Ib6720ef787c749f8d92b3744d1a64a1f331836aa
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4800334
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
2023-08-22 00:27:38 +00:00
Junichi Uekawa
49806e44dc docs: Add a link to how to run tryjob.
It's probably not straightforward as you have to have knowledge of CrOS build
system and how crosvm is set up.

BUG=None
TEST=read it and try `cros try ...`

Change-Id: I2d60b73f13d30596af900683b1ff77aeeadcb744
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4763024
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
2023-08-18 02:29:55 +00:00
Natsuko Mineno
e8b2cd080e docs: add USB to cros_tracing categories
BUG=b:295105245
TEST=mdbook build

Change-Id: I2369a32d820f2d71f8196c83d7b1cd2087b5e5e7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4768219
Reviewed-by: Ryuichiro Chiba <chibar@chromium.org>
Reviewed-by: Morg <morg@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Natsuko Mineno <natsukomineno@chromium.org>
2023-08-10 05:25:06 +00:00
Junichi Uekawa
47fcce7991 docs: book: Add reference to trace_marker USE flag.
Instead of having to search for it in the codebase, maybe add a reference here.

If there's more CrOS specific stuff, we can split it out to a separate section later.

BUG=None
TEST=read it.

Change-Id: I4e66e69388881a2022eb6852134be534aff5fdcd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4762724
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2023-08-09 20:24:13 +00:00
Gurchetan Singh
98dde09c4d docs: fix meson commands
Fixes:

"WARNING: Running the setup command as `meson [options]`
 instead of `meson setup [options]` is ambiguous and
 deprecated."

BUG=b:291606715
TEST=compile

Change-Id: I19ab4f7bcb6610a80ae0929a99c1fefd35b87f63
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4763870
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-08-09 17:24:21 +00:00
Joe Hattori
ab3d88e71f docs: make sure user is added to the kvm group in running_crosvm/example_simple.md.
At present, the `tools/examples/example_simple` script fails with an
access error when the user is not added to the kvm group.

This commit makes sure the user is added to the kvm group when trying to
run crosvm in running_crosvm/example_simple.md.

Tested on my local environment and checked the script works regardless
of the user being in the kvm group.

BUG=b:294970555
TEST=./tools/presubmit
TEST=./tools/examples/example_simple works regardless of user being in
the kvm group
TEST=shellcheck

Change-Id: I19e42af048774f68c7e0a93afa89a7acd183ba82
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4763917
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Joe Hattori <hattorij@google.com>
2023-08-09 10:37:25 +00:00
Federico 'Morg' Pareschi
c597e2e23c docs: Improve wording on crosvm landing page
The original wording was very short and a bit unclear so I decided to
re-write it a bit. I also add a link to our getting started page and
further references to crosvm's strong points (sandboxing, etc)

BUG=None
Test=mdbook build + verified it looks good

Change-Id: If4a0c62643222336b32f75668ee61689b06cda09
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4753338
Commit-Queue: Morg <morg@google.com>
Auto-Submit: Morg <morg@google.com>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2023-08-09 04:45:25 +00:00
Junichi Uekawa
f931125120 docs: Update chrome os workflow.
cros_workon_make clobbers files and it's difficult to work with. It
seems like the build process clobbering Cargo.toml and a few files at
every build also does not make incremental build work very well. So
instead of suggesting cros_workon_make, suggest emerge and cros
build-packages. It seems to be what people are using.

BUG=None
TEST=read it

Change-Id: Ibc8ad020b73708b75eb752893ca67da1276fcb71
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4759384
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-08-08 21:38:34 +00:00
Federico 'Morg' Pareschi
68f13464d7 docs: explain username and password in the example
BUG=None
TEST=compile mdbook

Change-Id: I347f4c0112c66cec326121c7b4830aaf9975b398
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4756204
Auto-Submit: Morg <morg@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2023-08-07 02:47:09 +00:00
Gurchetan Singh
25605ceb6a docs: improve gfxstream/rutabaga info
Shoutout to akihiko.odaki@ for suggestions:

"Why not install dependencies in one command?
sudo apt install libdrm libglm-dev libstb-dev

The cmake command for AEMU is broken into two lines but the newline
character between them are not escaped. It should be one line or the
newline should be escaped.

It also gives a warning:
CMake Warning:
   Ignoring extra path from command line:

    "../"

And it's probably better to have a dedicated build directory. /build is
in .gitignore so you may:
cmake -DAEMU_COMMON_GEN_PKGCONFIG=ON \
       -DAEMU_COMMON_BUILD_CONFIG=gfxstream \
       -DENABLE_VKCEREAL_TESTS=OFF -B build

It's also better to use the following commands to build and install it
just in case the system has a different backend (like Ninja):
cmake --build build -j
sudo cmake --install build

The build directory of gfxstream may be named just "build" so that you
can blindly copy the command on Arm64 or whatever and to ignore it with
.gitignore.

You may build and install it with the following command:
meson install -C build
No need for separate build command and sudo. Meson takes care of that.

The documentation has one command for building and installing Rutabaga,
but that may cause a problem. For example, you may have rustup
configured for a normal user but not for the superuser. Perhaps it's
better not to have "build" as a dependency of "install" and have two
commands for each of the steps:
make
sudo make install"

BUG=b:291606715
TEST=compile book

Change-Id: I7f75b0ebfda825bcf0f7d0ffee574669ee6ee801
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4743519
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-08-02 17:17:19 +00:00
Wang Ningyuan
4cb6d64167 docs: book: Network device hotplug
Updated the book to cover the network device hotplug feature.

BUG=b:243767476
TEST=./tools/dev_container ./tools/fmt

Change-Id: I570a981a347ce8896e4cf0eaf65a7c755b331590
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4720165
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Jason Iman <jasongustaman@chromium.org>
Commit-Queue: Ningyuan Wang <ningyuan@google.com>
2023-07-31 04:34:18 +00:00
Federico 'Morg' Pareschi
a1924bef1b docs: Add USB documentation page to crosvm book
BUG=b:290315473
TEST=`tools/dev_container tools/presubmit format`
TEST=generated docs and served the html pages and all looks good

Change-Id: I6057a1ee849226659b915345d707c42b462dd4b9
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4712779
Commit-Queue: Morg <morg@google.com>
Auto-Submit: Morg <morg@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-07-28 01:22:31 +00:00
Gurchetan Singh
4875e7e74c docs: update gfxstream build instructions
New repo.

BUG=b:291606715
TEST=compile

Change-Id: Ie79da81fabc7cfe8b5b0de5ebe2c4c446650ba7a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4722178
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-07-27 20:12:32 +00:00
Elie Kheirallah
f3c830ec97 book: add more details to network example
Some information seemed omitted from network, which requires some file
creation or modification to get the example working. Added the info.

BUG=N/A
TEST=mdbook build

Change-Id: I01069a3ac690b531e7902eab626ded498df7ebb1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4694602
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Elie Kheirallah <khei@google.com>
Auto-Submit: Elie Kheirallah <khei@google.com>
2023-07-18 16:43:29 +00:00
Gurchetan Singh
95c328e437 docs: add documentation on rutabaga_gfx
The people have demanded it.

BUG=b:291606715
TEST=build docs + view

Change-Id: I22db2fc62d8a09343842d3a7b06dfbd35052e458
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4691162
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2023-07-17 21:56:03 +00:00
Noah Gold
cbb610cafe docs: add style guidance for functions & tech debt.
BUG=b:289140900
TEST=TBD

Change-Id: Icc160bdcbadc958b14369d310c0d80b23264b7b9
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4674830
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
2023-07-17 17:29:28 +00:00
Daniel Verkamp
019d6bace7 devices: virtio: remove SignalableInterrupt trait
Use the concrete Interrupt type in its place, since Interrupt now works
for all virtio and vhost transports.

No functional change intended.

BUG=b:244204463
TEST=tools/dev_container tools/presubmit

Change-Id: Ie08c396b7eee997dfde7ae46a5ab7c728ba3584c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4639203
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2023-07-11 17:58:11 +00:00
Elie Kheirallah
556bae3415 docs: document installing packages with virt-builder
Some examples in the book assume that packages are installed. One
example as such is `Vsock`, where there's an assumption that `ncat` is
installed.
Some examples provide a hint at how packages are installed, but it's not
explicitely formulated. And if you skip the examples page and go
directly to Vsock, you lack the information on how to install `ncat`.
Added more information in the Example Usage on how to install packages,
and added the virt-builder command in vsock.

BUG=N/A
TEST=mdbook build

Change-Id: Id5a07287458ce55538ccb8a9b387dfb4b512042f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4675702
Commit-Queue: Elie Kheirallah <khei@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2023-07-10 15:51:48 +00:00
Daniel Verkamp
9754eb6222 docs: book: add a page about fuzzing
Link to the oss-fuzz configuration and build dashboard.

BUG=None
TEST=(cd docs/book; mdbook build)

Change-Id: Id87fad6eb5002492b92405a216b57d43fa43bed2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4669511
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-07-06 19:36:55 +00:00
Daniel Verkamp
0e53e19523 docs: book: move testing docs into a directory
This will allow us to add more testing-related pages under book/testing/

The previous URL is configured for redirection so existing links should
still work.

BUG=None
TEST=(cd docs/book; mdbook build)

Change-Id: I1fe8d8f074791a3a5680581a205f33857c24f6b2
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4669510
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-07-06 19:32:58 +00:00
Richard Zhang
0859f08d66 docs: Update network testing docs for sshing
BUG=None
TEST=None

Change-Id: I6d65612a530ddf8319aeccad75aea649b861528a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4652555
Commit-Queue: Richard Zhang <rizhang@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2023-06-30 00:01:27 +00:00
Noah Gold
7eaa6e75c5 Document interrupts & snapshotting.
BUG=b:277651566
TEST=ran mdbook serve & verified the book looked as expected.

Change-Id: Id6e1723f99dbe428c009a7a03bc651c9b1ee4125
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4598283
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2023-06-20 17:47:36 +00:00
Daniel Verkamp
273a25cc09 docs: book: update system requirements
Declare Linux 4.14 as the minimum supported kernel version; this is
the oldest stable kernel used on a ChromeOS system, and recent changes
require 4.11 or newer now that KVM's immediate exit feature is required.

Also put the existing content into a Linux-specific section so that
information about other platforms can be added here later.

Change-Id: I439d7c9981b109a580cfbe3b1887d75df1bd57af
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4578298
Reviewed-by: Zihan Chen <zihanchen@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-06-01 22:42:22 +00:00
Daniel Verkamp
929acf6534 docs: book: add riscv64 to linux building docs
Mention riscv64 in addition to the other architectures, and update the
recommended presubmit command to run in the dev_container for easy copy
and paste.

Change-Id: Ic58e7d72504d42af95aeab06d084056f06a62289
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4574300
Reviewed-by: Zihan Chen <zihanchen@google.com>
2023-06-01 22:37:17 +00:00
Daniel Verkamp
4e807800b9 docs: book: update minijail and seccomp docs
- Fix the links to point to the current chromiumos repositories.
- Delete a weird preachy sentence about language choice.
- Update the location of the jail helpers source file and add a link.
- Add a paragraph about the policy BPF build process.

Change-Id: I43791eefb619e4c2cac6bb994d31ee95f5725ad0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4574299
Reviewed-by: Shin Kawamura <kawasin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2023-06-01 18:21:49 +00:00
Daniel Verkamp
5263540f6c x86_64: remove --features=direct memory layout
Always use the standard memory layout now that we are removing support
for the "direct" feature.

BUG=b:279218487
TEST=tools/dev_container tools/presubmit

Change-Id: Ic5b7a31d7bbc7715494c3c62126662023b50eb0b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4550407
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2023-05-31 22:30:46 +00:00
yuanyaogoog
b46bdc351a devices: Add trace point for virtio-net
Currently, there is no trace point in virtio-net. This CL add
preliminary trace points for virtio-net. Trace point traces the
virtio-net status after initialization and each package size write
to or read from tap device.

BUG=b:276683004
TEST=run crosvm with virtio-net and check tracing logs in
/sys/kernel/tracing

Change-Id: Id26e66c0ccf82fc800355484f876e51821607907
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4555079
Commit-Queue: Yuan Yao <yuanyaogoog@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2023-05-30 02:14:52 +00:00