get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2194893/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2194893,
    "url": "http://patchwork.ozlabs.org/api/patches/2194893/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260210070155.1176081-12-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-12-vivek.kasireddy@intel.com>",
    "list_archive_url": null,
    "date": "2026-02-10T06:59:51",
    "name": "[v6,11/11] virtio-gpu-dmabuf: Create dmabuf for blobs associated with VFIO devices",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "7b0a18b5da1cdd16cbfb542f20f1073b2ba8794d",
    "submitter": {
        "id": 81116,
        "url": "http://patchwork.ozlabs.org/api/people/81116/?format=api",
        "name": "Kasireddy, Vivek",
        "email": "vivek.kasireddy@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260210070155.1176081-12-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/patches/2194893/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2194893/checks/",
    "tags": {},
    "related": [],
    "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=ERJFw2TO;\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 4f9CF95G9kz1xvb\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 18:02:53 +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 1vphli-0005A9-43; Tue, 10 Feb 2026 02:02:42 -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 1vphlf-00057m-JW\n for qemu-devel@nongnu.org; Tue, 10 Feb 2026 02:02:39 -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 1vphld-0004oR-LL\n for qemu-devel@nongnu.org; Tue, 10 Feb 2026 02:02:39 -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:15 -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:14 -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=1770706957; x=1802242957;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=RDJw7SL5tnzcRtJqDrZV2wCnXuhljoWjheVY1G/e+fw=;\n b=ERJFw2TOoNsuMx6i0xlnAKufv9M4ytf32Tc3fQjMqxkwtWAUW6CCCL01\n /H4uUS52mnGBwcteI7oQgLzC1CPKqD/9MZXDMEZ0NDxcMriABy/eHcW91\n N81hwBi2uLnW1rMgx3WU6ePwLsVthlZadeUtqhXM5DrJAAPfySLGhDLFt\n tZIvbnRriEA9xoj6WojtP3c+tkZfhWVj1HE6wPujzd+LNqE1osGsYjYiC\n jtUYQiqU81NpcOeTzqBYn2Ms5TbMAn6bue2fv91DrwPtdYv63DRRHUbGH\n 5dWvME6ZRI3SpWvINlXG2C55NnRYUNe8GAmctPETR8Cc4o04XYXnQJAX/ A==;",
        "X-CSE-ConnectionGUID": [
            "i9sFoLA/TLqZtpkRK7FQ7g==",
            "KY9oa0X/TdKL1TbsuCEfnw=="
        ],
        "X-CSE-MsgGUID": [
            "xdp4N3j5RJWPm5dk36krzw==",
            "apD5OCfZTHqSHZZUt39teg=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11696\"; a=\"72012188\"",
            "E=Sophos;i=\"6.21,283,1763452800\"; d=\"scan'208\";a=\"72012188\"",
            "E=Sophos;i=\"6.21,283,1763452800\"; d=\"scan'208\";a=\"210920562\""
        ],
        "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>",
        "Subject": "[PATCH v6 11/11] virtio-gpu-dmabuf: Create dmabuf for blobs\n associated with VFIO devices",
        "Date": "Mon,  9 Feb 2026 22:59:51 -0800",
        "Message-ID": "<20260210070155.1176081-12-vivek.kasireddy@intel.com>",
        "X-Mailer": "git-send-email 2.50.1",
        "In-Reply-To": "<20260210070155.1176081-1-vivek.kasireddy@intel.com>",
        "References": "<20260210070155.1176081-1-vivek.kasireddy@intel.com>",
        "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": "In addition to memfd, a blob resource can also have its backing\nstorage in a VFIO device region. Since, there is no effective way\nto determine where the backing storage is located, we first try to\ncreate a dmabuf assuming it is in memfd. If that fails, we try to\ncreate a dmabuf assuming it is in VFIO device region.\n\nSo, we first call virtio_gpu_create_udmabuf() to check if the blob's\nbacking storage is located in a memfd or not. If it is not, we invoke\nthe vfio_device_create_dmabuf() API which identifies the right VFIO\ndevice and eventually creates a dmabuf fd.\n\nNote that in virtio_gpu_remap_dmabuf(), we first try to test if\nthe VFIO dmabuf exporter supports mmap or not. If it doesn't, we\nfall back to the vfio_device_mmap_dmabuf() API to get a mapping\ncreated for the dmabuf.\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>\nSigned-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>\n---\n hw/display/Kconfig             |  5 ++++\n hw/display/virtio-gpu-dmabuf.c | 50 ++++++++++++++++++++++++++++------\n 2 files changed, 47 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/hw/display/Kconfig b/hw/display/Kconfig\nindex 1e95ab28ef..0d090f25f5 100644\n--- a/hw/display/Kconfig\n+++ b/hw/display/Kconfig\n@@ -106,6 +106,11 @@ config VIRTIO_VGA\n     depends on VIRTIO_PCI\n     select VGA\n \n+config VIRTIO_GPU_VFIO_BLOB\n+    bool\n+    default y\n+    depends on VFIO\n+\n config VHOST_USER_GPU\n     bool\n     default y\ndiff --git a/hw/display/virtio-gpu-dmabuf.c b/hw/display/virtio-gpu-dmabuf.c\nindex d9b2ecaf31..54d010b995 100644\n--- a/hw/display/virtio-gpu-dmabuf.c\n+++ b/hw/display/virtio-gpu-dmabuf.c\n@@ -18,6 +18,7 @@\n #include \"ui/console.h\"\n #include \"hw/virtio/virtio-gpu.h\"\n #include \"hw/virtio/virtio-gpu-pixman.h\"\n+#include \"hw/vfio/vfio-device.h\"\n #include \"trace.h\"\n #include \"system/ramblock.h\"\n #include \"system/hostmem.h\"\n@@ -27,6 +28,27 @@\n #include \"standard-headers/linux/udmabuf.h\"\n #include \"standard-headers/drm/drm_fourcc.h\"\n \n+static bool virtio_gpu_create_vfio_dmabuf(struct virtio_gpu_simple_resource *r,\n+                                          Error **errp)\n+{\n+    bool ret = false;\n+#if defined(CONFIG_VIRTIO_GPU_VFIO_BLOB)\n+    Error *local_err = NULL;\n+    int fd;\n+\n+    if (!vfio_device_create_dmabuf(r->iov, r->iov_cnt, &fd, &local_err)) {\n+        error_report_err(*errp);\n+        *errp = NULL;\n+        error_propagate(errp, local_err);\n+        return false;\n+    }\n+\n+    ret = true;\n+    r->dmabuf_fd = fd;\n+#endif\n+    return ret;\n+}\n+\n static bool virtio_gpu_create_udmabuf(struct virtio_gpu_simple_resource *res,\n                                       Error **errp)\n {\n@@ -73,16 +95,28 @@ static bool virtio_gpu_create_udmabuf(struct virtio_gpu_simple_resource *res,\n static bool virtio_gpu_remap_dmabuf(struct virtio_gpu_simple_resource *res,\n                                     Error **errp)\n {\n+    Error *local_err = NULL;\n+    bool ret = true;\n     void *map;\n \n     map = mmap(NULL, res->blob_size, PROT_READ, MAP_SHARED, res->dmabuf_fd, 0);\n     if (map == MAP_FAILED) {\n         error_setg_errno(errp, errno, \"dmabuf mmap failed\");\n-        res->remapped = NULL;\n-        return false;\n+        map = NULL;\n+        ret = false;\n+#if defined(CONFIG_VIRTIO_GPU_VFIO_BLOB)\n+        if (vfio_device_mmap_dmabuf(res->iov, res->iov_cnt, &map,\n+                                    res->blob_size, &local_err)) {\n+            ret = true;\n+        } else {\n+            error_report_err(*errp);\n+            *errp = NULL;\n+        }\n+#endif\n+        error_propagate(errp, local_err);\n     }\n     res->remapped = map;\n-    return true;\n+    return ret;\n }\n \n static void virtio_gpu_destroy_dmabuf(struct virtio_gpu_simple_resource *res)\n@@ -145,8 +179,10 @@ void virtio_gpu_init_dmabuf(struct virtio_gpu_simple_resource *res)\n         pdata = res->iov[0].iov_base;\n     } else {\n         if (!virtio_gpu_create_udmabuf(res, &local_err)) {\n-            if (local_err) {\n-                error_report_err(local_err);\n+            if (!virtio_gpu_create_vfio_dmabuf(res, &local_err)) {\n+                if (local_err) {\n+                    error_report_err(local_err);\n+                }\n             }\n             return;\n         }\n@@ -163,9 +199,7 @@ void virtio_gpu_init_dmabuf(struct virtio_gpu_simple_resource *res)\n \n void virtio_gpu_fini_dmabuf(struct virtio_gpu_simple_resource *res)\n {\n-    if (res->remapped) {\n-        virtio_gpu_destroy_dmabuf(res);\n-    }\n+    virtio_gpu_destroy_dmabuf(res);\n }\n \n static void virtio_gpu_free_dmabuf(VirtIOGPU *g, VGPUDMABuf *dmabuf)\n",
    "prefixes": [
        "v6",
        "11/11"
    ]
}