rutabaga_gfx: an electrifying possibility

rutabaga_gfx is a cross platform, Rust-based, Wayland and
Vulkan-centric Virtual Graphics Interface (VGI).

Apologies for the mega-change, but it was hard to do this piece
by piece.

The rationale for this change is:

1) Android graphics virtualization experts have been proposing
for a VGI for many months (years?).  Their goal is to boot
Android anywhere, everywhere.

2) For the {wayland, cross-domain} context type prototype,
it's desirable to create a {wayland, camera} connection at the
appropriate time. Details can be found in the code, though the
RutabagaChannels have yet to be hooked up.

There's a high chance neither effort will work.  As such,
rutabaga is just a prototype.

However, even (1) and (2) don't end up working, this
refactor/cleanup by itself makes a ton of sense.

Here's a summary of revelant changes:

* Removed auto-generated {p_defines, p_format, virgl_protocol}.
These files were added for tests when bringing up crosvm-gpu,
and AFAICT these tests are not run.  There's actually now a
commit queue for virglrenderer changes and container boot tests
that provides excellent coverage.

* Removed command_buffer.rs.  Used only for the previously
mentioned tests.  It's quite nice, but couldn't determine the right
place to put it.  Maybe data_model?  But removed it in the interim.

* Removed {write_from_guest_memory, read_to_volatile}.  The same
basic functionality has been moved into {transfer_write,
transfer_read} in Rutabaga.

* Removed VirtioResource, Virtio3DResource, Virtio2DResource,
and VirtioGfxStreamResource in favor of VirtioGpuResource and
RutabagaResource.  This leads to less duplication and clearer
separation between external library functions and VMM functions.

* Moved display and hypervisor memory management functions to
virtio_gpu.rs.  This is because external components do not interface
with this functionality, and there was a lot of duplication (for example
map/unmap blob).

* Added context management between gfxstream and virglrenderer.

* Added separate gfxstream and virglrenderer flags.

* Clearer naming.

* Added simple implementations for context init and multiple timelines.
These changes have no effect since all Google kernels don't pass the
revelant flags, but are useful for theoretical {wayland, cross-domain}
prototype.

* Unify RESOURCE_CREATE_3D and RESOURCE_CREATE_2D handling.

* Better error handling.

BUG=b:146066070, b:173630595, b:150239451
TEST=launch virtual machine with 2D mode
TEST=launch virtual machine with 3D mode
TEST=boot ARCVM

Change-Id: I240b0c134a3b562cbc65981837a41f6db7767c92
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2522452
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
diff --git a/Cargo.toml b/Cargo.toml
index aea0d72..4a2eccd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,7 +43,7 @@
 video-encoder = ["devices/video-encoder"]
 wl-dmabuf = ["devices/wl-dmabuf", "gpu_buffer", "resources/wl-dmabuf"]
 x = ["devices/x"]
-virtio-gpu-next = ["gpu_renderer/virtio-gpu-next"]
+virtio-gpu-next = ["rutabaga_gfx/virtio-gpu-next"]
 composite-disk = ["protos/composite-disk", "protobuf", "disk/composite-disk"]
 gfxstream = ["devices/gfxstream"]
 gdb = ["gdbstub", "thiserror",  "arch/gdb", "vm_control/gdb", "x86_64/gdb"]
@@ -61,7 +61,7 @@
 enumn = { path = "enumn" }
 gdbstub = { version = "0.4.0", optional = true }
 gpu_buffer = { path = "gpu_buffer", optional = true }
-gpu_renderer = { path = "gpu_renderer", optional = true }
+rutabaga_gfx = { path = "rutabaga_gfx", optional = true }
 hypervisor = { path = "hypervisor" }
 kernel_cmdline = { path = "kernel_cmdline" }
 kernel_loader = { path = "kernel_loader" }
@@ -108,4 +108,4 @@
 syscall_defines = { path = "syscall_defines" }
 sys_util = { path = "sys_util" }
 tempfile = { path = "tempfile" }
-wire_format_derive = { path = "../../platform2/vm_tools/p9/wire_format_derive" } # ignored by ebuild
\ No newline at end of file
+wire_format_derive = { path = "../../platform2/vm_tools/p9/wire_format_derive" } # ignored by ebuild