These should be written as ChromeOS and ChromiumOS (without the space)
to match the updated branding. The copyright headers were already
migrated to the new style (https://crrev.com/c/3894243), but there were
some more instances left over.
BUG=None
TEST=tools/cargo-doc
Change-Id: I8c76aea2eb33b2e370ab71ee9b5cc0a4cfd00585
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4129934
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
The simple_open example doesn't work without --features=x, so mark it as
a required feature.
BUG=None
TEST=cargo build -p gpu_display --example simple_open # fails
TEST=cargo build -p gpu_display --features x --example simple_open
Change-Id: Id780d6e56bb8aebd4abfc42f58ab0b49fb524f02
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4068551
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
This helps diagnose problems if the examples don't work (for example,
simple_open requires the `x` feature to be enabled).
BUG=None
TEST=run simple and simple_open examples
Change-Id: Ic115d48d93531bf2313948597a49a003538949cd
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4029530
Reviewed-by: Zihan Chen <zihanchen@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This will allow them to be build via
cargo build --bin simple
cargo build --bin simple_open
It will also include them in CI builds to ensure the
code will not rot.
BUG=None
TEST=CQ
Change-Id: Id6e73f3d5535141f5b1df0edc07c0f84cd03305b
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3997601
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
Makes the async vhost-user backend cross-platform. The next change will
add the plumbing to turn it on. The plan is to create GpuBackendConfig
and GpuVmmConfig in the broker and pass to the relevant processes.
This way, we can also pass GpuBackendConfig to the main process if we
want to use the original non-vhost-user worker. The config changes will
be included with the plumbing CL that follows.
- Split into a sys module.
- Introduce 'platform_workers' that tracks platform-dependent futures.
Reasoning: Windows will need to be able to launch more futures at
runtime due to our input handling, it's useful to have a vector of
workers to append to. This way the specific worker function doesn't
need to leak into the shared file. We can also put the resource
bridge workers here following the same logic.
- Introduce backend and VMM config structures to pass around.
BUG=b:243061269
TEST=downstream / presubmit
Change-Id: I53458c4dd2cf74b9e6bf5d10819533206e47a683
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3963645
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Kaiyi Li <kaiyili@google.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Commit-Queue: Idan Raiter <idanr@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
On Windows, we have to create a GUI thread that creates the window and
retrieves window messages from the thread-specific message queue created
by the system. All host events, such as window resizing and mouse and
keyboard events, are sent in the form of window messages. Hence, we
created these structs/traits to model it:
- `Window`: Owns the handle of one window, and provides helper functions
for operating on this window.
- `HandleWindowMessage`: A trait implemented by the struct that
processes host events. In our case, that is the surface.
- `WindowMessageProcessor`: Holds one `Window` object and one
`HandleWindowMessage` trait object. We only support one window for
now. Once we support multi-windowing, there will be multiple
processors.
- `WindowMessageDispatcher`: A singleton, responsible for dispatching
messages retrieved from the message queue to the targeted processor.
- `WindowProcedureThread`: Wraps the GUI thread, retrieves messages from
the message queue and forwards them to the dispatcher. It also
provides helper functions for other threads to talk to the GUI thread.
- `MessageRelayThread`: Relays service messages to the GUI thread.
Main difference from other platforms: event devices are imported to the
GUI thread, since all host events are processed there.
BUG=b:213150276
TEST=presubmit
Change-Id: I0aabf6adf8a9ff4b24375e9c7df7625b6f761c7a
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3834009
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Pujun Lun <lunpujun@google.com>
This change contains the results of running
./tools/contib/cargo_refactor.py
This will break the next uprev, and needs to be synchronizized
with the corresponding ebuild changes in https://crrev.com/c/3248925
BUG=b:195126527
TEST=./tools/run_tests
Change-Id: Ied15a1841887bb8f59fba65b912b81acf69beb73
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3248129
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Promote xdg_shell_v6_unstable to the stable version of xdg shell
protocol.
In addition, we must fix the the build.rs file. It looks for:
/usr/share/wayland-protocols
not
/build/${BOARD}/usr/share/wayland-protocols
Fix this by looking at pkg-config, and not the environment when
looking for the protocol path.
BUG=b:177939148
TEST=Tested on Ubuntu (gnome)
Cq-Depend: chromium:2914164
Change-Id: I7beff3845a3bf9f248171492ffd55ee3991a32ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2666159
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
For now, this crate simply re-exports all of sys_util, but it will
be updated to provide new interfaces when needed. This is the
first step to making crosvm not directly depend on sys_util, so
that we can make the interface changes we need without fear of
negatively affecting (i.e. completely breaking) other usages
within chromeos.
BUG=b:162363783
TEST=./build_test
Change-Id: I7d0aa3d8a1f66af1c7fee8fd649723ef17027150
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2325168
Tested-by: Michael Hoyle <mikehoyle@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Michael Hoyle <mikehoyle@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Adds bindings to the X11 display window to capture keyboard & mouse
input & send it to the guest via an EventDevice.
Original implementation by zachr@chromium.org.
BUG=chromium:1023975
TEST=None
Change-Id: I33156a8ca0b8c610a2080e3b6891cca2a865734b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1971121
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
This change adds an X11 backend to the gpu_display crate. With this
addition, the virtio-gpu device can display to traditional linux
desktops that only have X11 output.
Change-Id: I86c80cac91ca5bdc97588194a44040273ae69385
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1591572
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Auto-Submit: Zach Reizner <zachr@chromium.org>
Separated out of CL:1513058 to make it possible to land parts
individually while the affected crate has no other significant CLs
pending. This avoids repeatedly introducing non-textual conflicts with
new code that adds `use` statements.
TEST=cargo check
TEST=cargo check --all-features
TEST=cargo check --target aarch64-unknown-linux-gnu
Change-Id: I290fc72e5624cf8b4b2bacaf124cc5b654255978
Reviewed-on: https://chromium-review.googlesource.com/1519696
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: David Tolnay <dtolnay@chromium.org>
To support eclass migration for crosvm ebuild from crate to cros-rust.
This CL need to be built with cros-rust version crosvm ebuild.
- Upgrage crate cc from 1.0.15 to 1.0.25.
- Change local tempdir version from 0.3.5 to 0.3.7 for ebuild
integration.
- Remove 9s directory since it's moved to platform2.
BUG=chromium:781398
BUG=chromium:907520
TEST=Run $ FEATURES=test emerge-eve crosvm
in a clean chroot
CQ-DEPEND=CL:1421303
Change-Id: Iab615b555a51f8020e5efae1cc40ac6b54ea87f2
Reviewed-on: https://chromium-review.googlesource.com/1421237
Commit-Ready: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
This provides virtual display style output, useful for debugging
virtio-gpu. Although using virtio-gpu for display purposes clashes with
the more integreated virtio-wayland support, it is nonetheless helpful
for debugging virtio-gpu, and is technically required to fully implement
that device.
TEST=cargo build -p gpu_display
BUG=chromium:837073
CQ-DEPEND=CL:1096300
Change-Id: I59f895e951ef593d4119e7558168dd34223519ee
Reviewed-on: https://chromium-review.googlesource.com/1043446
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>