crosvm/devices
Lingfeng Yang 5572c8db3f devices: gpu: Integrate ExternalMapping with virtio-gpu
This CL takes the global map_request and uses it as an Arc<Mutex<>>
reference in virtio gpu, enabling virtio gpu backends to generate
external library mappings.

The workflow is demonstrated in the gfxstream backend:

1. Guest triggers vkMapMemory on host
2. Host generates a blob id, sends back to guest
3. Guest asks to RESOURCE_CREATE_BLOB with the blob id,
creating a resource id
4. Guest asks to RESOURCE_MAP_BLOB with the resulting resource id
5. Host gets hva, size from the backend using the resource id
6. Host maps hva, size via KVM to the guest pci offset via sending a
ExternalMapping over map_request
7. Guest maps that PCI offset, exposing memory to guest userspace

BUG=b/153580313
TEST=dEQP.vk.memory.*

Change-Id: I242beedab1dcaf9eb08d9797ed10dc993b58abde
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2035595
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
2020-08-11 04:24:00 +00:00
..
src devices: gpu: Integrate ExternalMapping with virtio-gpu 2020-08-11 04:24:00 +00:00
Cargo.toml Add "base" crate and transition crosvm usages to it from sys_util 2020-08-06 18:19:44 +00:00