Cover Letter Detail
Show a cover letter.
GET /api/covers/2194901/?format=api
{ "id": 2194901, "url": "http://patchwork.ozlabs.org/api/covers/2194901/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/cover/20260210070155.1176081-1-vivek.kasireddy@intel.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260210070155.1176081-1-vivek.kasireddy@intel.com>", "list_archive_url": null, "date": "2026-02-10T06:59:40", "name": "[v6,00/11] vfio: Create dmabuf from multiple VFIO ranges and use it in virtio-gpu", "submitter": { "id": 81116, "url": "http://patchwork.ozlabs.org/api/people/81116/?format=api", "name": "Kasireddy, Vivek", "email": "vivek.kasireddy@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/cover/20260210070155.1176081-1-vivek.kasireddy@intel.com/mbox/", "series": [ { "id": 491614, "url": "http://patchwork.ozlabs.org/api/series/491614/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=491614", "date": "2026-02-10T06:59:41", "name": "vfio: Create dmabuf from multiple VFIO ranges and use it in virtio-gpu", "version": 6, "mbox": "http://patchwork.ozlabs.org/series/491614/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/2194901/comments/", "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=kaJ+T5nP;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f9CGC5HZ7z1xwH\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 18:03:47 +1100 (AEDT)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vphlM-0004wy-FT; Tue, 10 Feb 2026 02:02:20 -0500", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <vivek.kasireddy@intel.com>)\n id 1vphlL-0004wQ-5f\n for qemu-devel@nongnu.org; Tue, 10 Feb 2026 02:02:19 -0500", "from mgamail.intel.com ([198.175.65.16])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <vivek.kasireddy@intel.com>)\n id 1vphlI-0004oR-V3\n for qemu-devel@nongnu.org; Tue, 10 Feb 2026 02:02:18 -0500", "from orviesa006.jf.intel.com ([10.64.159.146])\n by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Feb 2026 23:02:13 -0800", "from vkasired-desk2.fm.intel.com ([10.105.128.132])\n by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Feb 2026 23:02:13 -0800" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1770706937; x=1802242937;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=4Zdy/XrCdJj7pJZGNtq2+xvfDdpkE1U/hRqSmFbjE68=;\n b=kaJ+T5nP/JI2bffEFDyMiejZDfgiX+3OMz0g1IjWJ7+t6Qay1lo/F7PF\n mSJvHymL5vpFytB4ku+B18gh1YTaaTPBK/GVnDQdvMbT+zsQoQRckMy15\n nms1ErhlYQYqg5Bp3i+fUNIzm5IJLECIuUKqgjlVBQUuHwKG8Tw/jXYKa\n Mw9XoSTlJ6BQnPE+tr9aQXG/dZnrzSCcz1VPB9a1arnAdtTaCF4WjL/1w\n k5mEISB0uI0Im5vBIxflSsScPi/dV1FEby1OrzU31tTNQ6naKT/kKJ4Ak\n 0D3cCmi8uBMA8A4W/c4mpV912AivPwe1a1YkFZYJ+jZjrliEsR5hidVXE w==;", "X-CSE-ConnectionGUID": [ "qSZNOWU+QJOG631Ya6Zs/A==", "eutzdwjeSmaw23Wpt4H5aw==" ], "X-CSE-MsgGUID": [ "CatLslCsTFu6rX/eE1jxFg==", "ovJYMqqxTyu2wz4K79fVLA==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11696\"; a=\"72012134\"", "E=Sophos;i=\"6.21,283,1763452800\"; d=\"scan'208\";a=\"72012134\"", "E=Sophos;i=\"6.21,283,1763452800\"; d=\"scan'208\";a=\"210920527\"" ], "X-ExtLoop1": "1", "From": "Vivek Kasireddy <vivek.kasireddy@intel.com>", "To": "qemu-devel@nongnu.org", "Cc": "Vivek Kasireddy <vivek.kasireddy@intel.com>, =?utf-8?q?Marc-Andr=C3=A9_L?=\n\t=?utf-8?q?ureau?= <marcandre.lureau@redhat.com>,\n =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>,\n Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>,\n Dmitry Osipenko <dmitry.osipenko@collabora.com>,\n Alex Williamson <alex@shazbot.org>,\n =?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@redhat.com>,\n Dongwon Kim <dongwon.kim@intel.com>", "Subject": "[PATCH v6 00/11] vfio: Create dmabuf from multiple VFIO ranges and\n use it in virtio-gpu", "Date": "Mon, 9 Feb 2026 22:59:40 -0800", "Message-ID": "<20260210070155.1176081-1-vivek.kasireddy@intel.com>", "X-Mailer": "git-send-email 2.50.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=198.175.65.16;\n envelope-from=vivek.kasireddy@intel.com; helo=mgamail.intel.com", "X-Spam_score_int": "-43", "X-Spam_score": "-4.4", "X-Spam_bar": "----", "X-Spam_report": "(-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,\n RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001,\n 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": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "The virtio-gpu driver running in the Guest VM can create Guest blob\nresources (by importing dmabufs) that are backed by System RAM. This\nis made possible by making use of memfd memory backend and udmabuf\ndriver on the Host side. However, in order to create Guest blobs\nthat are backed by vfio-pci device regions (which happens when\nvirtio-gpu imports dmabufs from devices that have local memory such\nas dGPU VFs), we have to add support for creating dmabuf from multiple\nVFIO device ranges (same region) and leverage it in virtio-gpu.\n\nSo, while creating the blobs we first try to create a dmabuf by\ncalling into the udmabuf driver assuming that the backing memory \nis memfd based. If that fails, and if it is determined that the blob\nis backed by a vfio-pci device region, we would then call into the\nvfio-pci driver to have a dmabuf fd created.\n\nChangelog:\nv5 -> v6:\n- Drop the additional error_setg() call in virtio_gpu_create_udmabuf()\n and only have LOG_GUEST_ERROR for invalid ramblocks (Akihiko)\n- Merge the patch that introduces vfio_device_lookup() helper with the\n one that adds support for vfio_device_create_dmabuf() (Cedric)\n- Use only one 'Error **' parameter instead of two while creating\n and mmapping the dmabuf (Cedric)\n- Collect R-b tags from Akihiko\n\nv4 -> v5:\n- Improve commit message for the patch that replaces dma_memory_map()\n with virtio_gpu_dma_memory_map() (Akihiko)\n- Create separate patches to remove rcu_read_lock/unlock and use\n g_autofree for list pointer in virtio_gpu_create_udmabuf()\n (Akihiko, Cedric)\n- Create a separate patch to improve error handling (Cedric)\n- Make vfio_device_lookup() a common helper local to vfio/device.c\n (Cedric, Akihiko)\n- Move the dmabuf mmap helper to vfio/device.c (Akihiko)\n- Replace PROT_READ with PROT_NONE and vbasedev->fd with -1 while\n creating the placeholder mapping in dmabuf mmap helper (Akihiko)\n\nv3 -> v4:\n- Drop the patch that introduces ram_block_is_memfd_backed()\n- Drop the additional check in virtio_gpu_create_udmabuf() that\n checks for memfd backed ram blocks (Akihiko)\n- Remove rcu_read_lock/unlock and replace warn_report() with\n qemu_log_mask() in virtio_gpu_create_udmabuf()\n- Improve the commit message and logic in the patch that adds\n support for vfio_device_create_dmabuf_fd()\n- Rebase on top of vfio-next\n\nv2 -> v3:\n- Use memory_region_get_ram_ptr() to obtain hva for both memfd and\n VFIO backed memory regions (Akihiko)\n- Drop the patch that introduced qemu_iovec_same_memory_regions()\n helper and move the \"same memory region\" check into\n virtio_gpu_create_udmabuf(), vfio_device_create_dmabuf_fd() (Akihiko)\n- Refactor virtio_gpu_init_dmabuf() to not rely on helpers such as\n memory_region_is_ram_device() to identify memory regions and\n instead call virtio_gpu_create_udmabuf() unconditionally (Akihiko)\n- Add a patch to introduce ram_block_is_memfd_backed() helper\n\nv1 -> v2:\n- Drop the patch that uses res->blob_size instead of res->blob to\n identify blob resources (Akihiko)\n- Remove the res->dmabuf_fd < 0 check while attaching backing to a\n resource (Akihiko)\n- Remove cmd->cmd_hdr.type != VIRTIO_GPU_CMD_RESOURCE_CREATE_BLOB\n check while attaching backing (Akihiko)\n- Improve vfio_get_region_index_from_mr() and add documentation (Cedric)\n- Remove rcu_read_lock/unlock around qemu_ram_block_from_host()\n (Akihiko, Cedric)\n- Improve, document and rename vfio_device_create_dmabuf() to\n vfio_device_create_dmabuf_fd() (Cedric)\n- Add a new helper to lookup VFIO device from memory region (Cedric)\n- Document vfio_device_get_region_info() (Cedric)\n- Ensure that info variable (in vfio_dmabuf_mmap()) is initialized\n before use (Cedric)\n- Rename udmabuf files and helpers to dmabuf (Akihiko)\n- Remove the redundant check for virtio_gpu_have_udmabuf() in\n virtio_gpu_init_dmabuf() (Akihiko)\n- Add a helper to check whether all the entries of a dmabuf belong\n to a single memory region or not (Akihiko)\n\nRFC -> v1:\n- Create the CPU mapping using vfio device fd if the dmabuf exporter\n (vfio-pci) does not provide mmap() support (Akihiko)\n- Log a warning with LOG_GUEST_ERROR instead of warn_report() when\n dmabuf cannot be created using Guest provided addresses (Akihiko)\n- Use address_space_translate() instead of gpa2hva() to obtain the\n Host addresses (Akihiko)\n- Rearrange the patches and improve the commit messages (Akihiko)\n- Fix compilation error when VFIO is not enabled (Alex)\n- Add a new helper to obtain VFIO region index from memory region\n- Move vfio_device_create_dmabuf() to hw/vfio/device.c\n\nTested with an SRIOV enabled Intel dGPU (B60) by running Gnome Wayland\n(in the VM) and Qemu with the following (relevant) parameters:\n-device vfio-pci,host=0000:03:00.1\n-device virtio-vga,max_outputs=1,xres=1920,yres=1080,blob=true\n-display gtk,gl=on\n\nAssociated virtio-gpu kernel driver series (merged):\nhttps://lore.kernel.org/dri-devel/20241126031643.3490496-1-vivek.kasireddy@intel.com/\n\n---\nCc: Marc-André Lureau <marcandre.lureau@redhat.com>\nCc: Alex Bennée <alex.bennee@linaro.org>\nCc: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>\nCc: Dmitry Osipenko <dmitry.osipenko@collabora.com>\nCc: Alex Williamson <alex@shazbot.org>\nCc: Cédric Le Goater <clg@redhat.com>\nCc: Dongwon Kim <dongwon.kim@intel.com>\n\nVivek Kasireddy (11):\n virtio-gpu: Recreate the resource's dmabuf if new backing is attached\n virtio-gpu: Find hva for Guest's DMA addr associated with a ram device\n virtio-gpu: Rename udmabuf files and helpers to dmabuf\n virtio-gpu-dmabuf: Remove rcu_read_lock/unlock from\n virtio_gpu_create_udmabuf()\n virtio-gpu-dmabuf: Use g_autofree for the list pointer\n virtio-gpu-dmabuf: Improve error handling by introducing 'Error **'\n vfio: Document vfio_device_get_region_info()\n vfio/region: Add a helper to get region index from memory region\n vfio/device: Add support for creating dmabuf from multiple ranges\n vfio/device: Add a helper to mmap a dmabuf\n virtio-gpu-dmabuf: Create dmabuf for blobs associated with VFIO\n devices\n\n hw/display/Kconfig | 5 +\n hw/display/meson.build | 4 +-\n ...abuf-stubs.c => virtio-gpu-dmabuf-stubs.c} | 4 +-\n ...rtio-gpu-udmabuf.c => virtio-gpu-dmabuf.c} | 100 ++++++++----\n hw/display/virtio-gpu.c | 31 +++-\n hw/vfio/device.c | 146 ++++++++++++++++++\n hw/vfio/region.c | 14 ++\n include/hw/vfio/vfio-device.h | 53 +++++++\n include/hw/virtio/virtio-gpu.h | 6 +-\n 9 files changed, 322 insertions(+), 41 deletions(-)\n rename hw/display/{virtio-gpu-udmabuf-stubs.c => virtio-gpu-dmabuf-stubs.c} (79%)\n rename hw/display/{virtio-gpu-udmabuf.c => virtio-gpu-dmabuf.c} (67%)" }