mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
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> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |