From patchwork Tue Jan 14 18:22:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 857259 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp2060664wrc; Tue, 14 Jan 2025 10:23:17 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXKINogonnLOuDqaULUE9PlEkrvJOrOTbkyLRC+fvZ4+9T/CIIW7dcGdZyLX3e7dgwtXQ2N8A==@linaro.org X-Google-Smtp-Source: AGHT+IGflC0/40WkWTl4n6RhTwDJtG4UV41+VS+I0n/7BXQ/8MDDljpMWx1GKlco1RnSRZmY0XfF X-Received: by 2002:a05:6214:1249:b0:6d8:b371:6a0f with SMTP id 6a1803df08f44-6df9b2d5c50mr438641696d6.31.1736878997180; Tue, 14 Jan 2025 10:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736878997; cv=none; d=google.com; s=arc-20240605; b=C0s+InqeaZY6OuiKdj6t8l3JXN3P891L416CltYyK4+X+I2H6zGIeKIWLo6Ftap1Uj al8uDHmDwpR7K8Wo7LA469vbEeFSPaaLqds0C6eUT6MCQ2BJTdceK48YhsXZH/pftF9d uECqErh7Mm9YNyXteSf0rQ2F4mzXaZyYGEW061DPYnuC/eJP/qUoGG0KSXOg8grMpOII Onm/JWCmF/Jxo8nJbOUEqLpf4JURhsLAmSQNXQd1nIzDPhcWsm8sGJpqsSqt/DplggCZ LzUBC74ZOZtDaY+rCIdqirHSndL7EOTly/0jgvmNf6BCIExI/UOwa+fwHLt7AG7MIQ74 p2KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=CR1XGoy+jnTDPy+e7vBvP4TFgYYpfs9zsMnWBCntSHI=; fh=wwgv5iTQ0hbU0nU+Ne6Vqk/luS5zZql4WTrY2nTFNxM=; b=hiiy8IMPNXA3cf+WnvPekG98L/vcw5vStd+7jnIAhy2d+ceddFfdMpAo5uXFdyzL97 s/zBFUIPHJh4CnolmavT69Oi6ge4j6RzdKiH0N6ZLYqStQ2M4eElwL3FNV0ThBQdHpzL NJnqIBiru8F/fymnvBF23tcR6nOVf6HRa+cKoHZQ7wCTQ8YPu9B6FDBfj7dCK9ffmRrY HFULHZfUaxx/mbBWcRx6HCbk2C8okxb+rIiMa8IpK15G1PfenUTEXaNKG3bawqJSdA2m 9BZV8vEFgJ04P3nhfkxU42CBEXfGGkw2PWeKiD/gpjjvIZ808r3o8gBLIXzsOF1xqNk7 8HnA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l9jj5UcI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6dfad9d3fb0si124675766d6.134.2025.01.14.10.23.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jan 2025 10:23:17 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l9jj5UcI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tXlYk-00024B-0i; Tue, 14 Jan 2025 13:22:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tXlYh-00023a-HY for qemu-devel@nongnu.org; Tue, 14 Jan 2025 13:22:35 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tXlYf-0004EF-GM for qemu-devel@nongnu.org; Tue, 14 Jan 2025 13:22:35 -0500 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-5d88c355e0dso10253372a12.0 for ; Tue, 14 Jan 2025 10:22:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736878951; x=1737483751; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CR1XGoy+jnTDPy+e7vBvP4TFgYYpfs9zsMnWBCntSHI=; b=l9jj5UcIv1mmw3fqzvMIwlR2JLrrNmjHUxiDku9Kh6ha1gAUO+xofkBAIRJNdHPZb6 HEIMLj5+mnykAlH+3JueZDkEUJpMhS6qGjZygrrmeTdcoPEBRFUqRR0VOnFrTUVU8k0c B37J3E31Bh9h6i85iMNGYKxT3QaaFDrO8mGHXvLrvitknbm1qQhOW0zBrdnRuZs2I0jq rtnWJeydGTErU2Xh/JIOdgCly7XOKPdKP8U1cyjWVQTq9guiqh0IUPOwD8ZQQXQQe7rG Z15U5uppNuDKQqvlJiTWz/M4QW3Ml4KKlwLCMnAUejiAdWiD5rkW6qgVCDxPVlZteDNY ZeAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736878951; x=1737483751; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CR1XGoy+jnTDPy+e7vBvP4TFgYYpfs9zsMnWBCntSHI=; b=echL0Xe0BcNvnN1PPVWBAhozI3xxZ9r5GUvFzxGIruUy4ABk1aXbD9jD6dBkbvU944 1shpMSiODrqYwNQhvV+FbBa+7Bi2LHAxHiqNIg7qBA0N3pyK2Bgu3cbpY7SRr5T4wVn/ lrBQzIrHpOeQVX2h7fvL3/mY7CDuHw7yyD/XLcjfm15Dm2W6CQn2cwMwZ2QSO12lBiAQ GE9h6Umw37tvkYyhVmSiQEsGkZuDRKdXMA84HdQaoBejxSyXN/0iHlnMwVOROsayj2Xj MdmE6juBmXxwBLi7SRvw3sLBMrBrtei5UPsY5xF96mGtMOGfw3tIQ15QVZI7Zw+7mcEr 3APQ== X-Gm-Message-State: AOJu0YwtRU54WE+XO4UVfBPIosHqeKE0pvYrJpXbqZK8QNRgMPBu8Z16 PwFtUAk+jL07kfWvVy99tTwBXxolm0rYW2rFBoMb1YEwhVfFrLcgpRQvTdPtDno= X-Gm-Gg: ASbGnctqWht4c0o69UxWpNMCeoGmYdRxvT93BH+uBIiIPoUiOx7zlR571t79Fp8ReBr tkUoDGjEnGu3CkOeoDmFPbic2wEvSKJqcyRNh4DASwXMcLo4tx3kztDe4zk4xfLnijgoAeD6g+l f84Vs12dcYcemQYinEz3COuc5siPmlRR0X5qVIdkyDdfvN8rGDtj8un4GmuzfPIOD2ZtBlFHKo8 iUAc9SWoBy8wug3KQwltWK0zDeodinZ7lItodvpRZaBr7sQfTwSiPs= X-Received: by 2002:a17:907:8004:b0:ab2:b72e:cf44 with SMTP id a640c23a62f3a-ab2b72efaabmr1820765866b.2.1736878951101; Tue, 14 Jan 2025 10:22:31 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab2c905f0b3sm655625666b.21.2025.01.14.10.22.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 10:22:30 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CBE9B5F89C; Tue, 14 Jan 2025 18:22:28 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Dmitry Osipenko , Sergio Lopez Pascual Subject: [RFC PATCH] docs/system: expand the virtio-gpu documentation Date: Tue, 14 Jan 2025 18:22:21 +0000 Message-Id: <20250114182221.840349-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This attempts to tidy up the VirtIO GPU documentation to make the list of requirements clearer. There are still a lot of moving parts and the distros have some catching up to do before this is all handled automatically. Signed-off-by: Alex Bennée Based-on: 20241110221838.2241356-1-dmitry.osipenko@collabora.com Cc: Dmitry Osipenko Cc: Sergio Lopez Pascual --- Dimitry, feel free to merge or adapt this incomplete RFC into v5 --- docs/system/devices/virtio-gpu.rst | 89 ++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 6 deletions(-) diff --git a/docs/system/devices/virtio-gpu.rst b/docs/system/devices/virtio-gpu.rst index f20c600163..6226fb732e 100644 --- a/docs/system/devices/virtio-gpu.rst +++ b/docs/system/devices/virtio-gpu.rst @@ -4,14 +4,91 @@ virtio-gpu ========== -This document explains the setup and usage of the virtio-gpu device. -The virtio-gpu device paravirtualizes the GPU and display controller. - -Linux kernel support --------------------- +The virtio-gpu device provides a GPU and display controller +paravirtualized using VirtIO. It supports a number of different modes +from simple 2D displays to fully accelerated 3D graphics. + +Dependencies +............ + +.. note:: + GPU virtualisation is still an evolving field. Depending on the mode + you are running you may need to override distribution supplied + libraries with more recent versions or enable build options. + +Host requirements +----------------- + +Depending on the mode there are a number of requirements the host must +meet to be able to be able to support guests. For 3D acceleration QEMU +must be able to access the hosts GPU and for the best performance be +able to reliably share GPU memory with the guest. + +.. list-table:: Host Requirements + :header-rows: 1 + + * - Mode + - Kernel + - Userspace + * - virtio-gpu + - framebuffer enabled + - GTK or SDL display + * - virtio-gpu-gl (OpenGL pass-through) + - GPU enabled + - libvirglrenderer (virgl support) + * - virtio-gpu-gl (rutabaga/gfxstream) + - GPU enabled + - aemu/rutabaga_gfx_ffi or vhost-user client with support + * - virtio-gpu-gl (Vulkan pass-through) + - Linux 6.13, CONFIG_UDMA + - libvirglrenderer (>= 1.1.0, venus support) + * - virtio-gpu-gl (Native Context) + - Linux 6.13, CONFIG_UDMA + - libvirglrenderer (master, possibly with patches) + + +Guest requirements +------------------ virtio-gpu requires a guest Linux kernel built with the -``CONFIG_DRM_VIRTIO_GPU`` option. +``CONFIG_DRM_VIRTIO_GPU`` option. Otherwise for 3D accelerations you +will need support from Mesa configured for whichever encapsulation you +need. + +.. list-table:: Guest Requirements + :header-rows: 1 + + * - Mode + - Min Mesa Version + - Mesa flags + * - virtio-gpu + - n/a + - n/a + * - virtio-gpu-gl (OpenGL pass-through) + - 20.3.0+ + - -Dgallium-drivers=virgl + * - virtio-gpu-gl (rutabaga/gfxstream) + - 24.3.0+ + - -Dvulkan-drivers=gfxstream + * - virtio-gpu-gl (Vulkan pass-through) + - 24.2+ + - -Dvulkan-drivers=virtio + * - virtio-gpu-gl (Native Context/Freedreno) + - master + - ? + * - virtio-gpu-gl (Native Context/Intel) + - `mr29870`_ + - -Dvulkan-drivers=iris -Dintel-virtio-experimental=true + * - virtio-gpu-gl (Native Context/AMD) + - `mr21658`_ + - -Dvulkan-drivers=radeonsi + +.. _mr29870: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29870 +.. _mr21658: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21658 + +Further information +................... + QEMU virtio-gpu variants ------------------------