Skip to content

Interest in a WebGPU backend for virtio-gpu? #841

@tareksander

Description

@tareksander

I was researching about the various ways of getting graphics/compute acceleration into a VM, and apart from partitioning a GPU with hardware support, they all seem susceptible to various potential escape vectors.

My first idea was to define a safe subset of Vulkan and use checks on the host, but I realized that's pretty much what WebGPU does, and with corporate backing of implementations and battle-tested by browsers.

AFAIK it would be a valid Vulkan implementation to pretty much ignore all synchronization and let it all be handled implicitly by WebGPU, so using Vulkan as an API in the VM would still be possible with driver support. The main point is that the safety is handled on the host, and not in a WebGPU layer inside the guest, where raw access to e.g. Vulkan could still lead to a compromised system.

Before I go and to the work though, I wanted to check whether safe GPU acceleration in VMs is even something other people want, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions