From nobody Sat Apr 11 23:07:58 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1772694034; cv=none; d=zohomail.com; s=zohoarc; b=jWNChmPkMZR8WOqa0Zpo3BUqiuJDoffouyG4j67DN398nD/zDjrg7hILDxOjs/NA+51yzP38jgc5TBqy3/yB0W2361siCMwto4Z0mIMosxL0pGLkSXIumSnY+9rD5gfYYNip0gHT/l45ncxjEv3QaviKY3vYviFiSjJLSucVGpk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772694034; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2es2aBjZqT0ax3ThS164ydpYHqlvwID5B2Mml69M/Jk=; b=P9kHC1nul7AtmHhhGuWLBaPcUxR1ct/KDmh5XWCnuuuB0+d8xjETi4pzFgr//X1rVblH4tbtsLbPI+BeFOYoNrV13loMyniF6FAvUJVp6AAfOhMouKIpjMnIcM3lveQA3b8LGsutSdYDgnKyLUzkPLO+0L9WYLMHBGfLxjXO4tA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772694034922175.5241271865292; Wed, 4 Mar 2026 23:00:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vy2gK-0003Qa-JC; Thu, 05 Mar 2026 01:59:36 -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 1vy2gI-0003Q5-Um for qemu-devel@nongnu.org; Thu, 05 Mar 2026 01:59:34 -0500 Received: from mgamail.intel.com ([192.198.163.8]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vy2gG-0007qJ-P4 for qemu-devel@nongnu.org; Thu, 05 Mar 2026 01:59:34 -0500 Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2026 22:59:29 -0800 Received: from vkasired-desk2.fm.intel.com ([10.105.128.132]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2026 22:59:28 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772693973; x=1804229973; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mSJwk8OL8GT7Kwlz7h7yRvXBaRvRP8lpklTQLrCYMRk=; b=LBu9yp+45qmqTwStW56JFv4hZKIb0cvlZIzBN+gl00MeUXJ0jRzTRzhl Ex+SeihB5n121U1jC33EtEqmwrIBqrvzp6uzG5fq1XbCYv4p8t9Y4L3w5 3BhK9jdRlU0G4x29nByIfGoXV7+BuEFvYZ01WgKTBBrC2H5sOtmt3tv0w 5CAgnOfNq7L0otOcTJiAAcXb8Oie5FtPc5ZdNAGVBfGDVMQJtvk193kdy 59TISMRbovUpePKGfi/Hkb0tQi623XdKurouU3bmwyrsThVjwyM6OmRsj NBltet/IJHoLKJgsLEjgXCIvbU6xLck3oAocp9oRx4IK3ZdchcZOzaBPx g==; X-CSE-ConnectionGUID: Ig96LRC8QziCNNEyTD3ygQ== X-CSE-MsgGUID: LH8PQ0RxQge4/JCFJ2p1Lg== X-IronPort-AV: E=McAfee;i="6800,10657,11719"; a="91343488" X-IronPort-AV: E=Sophos;i="6.21,325,1763452800"; d="scan'208";a="91343488" X-CSE-ConnectionGUID: zVYiGyV3Rzq1phu9GNnwKA== X-CSE-MsgGUID: oMztsGplRvevcYfue2n2YQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,325,1763452800"; d="scan'208";a="218725650" From: Vivek Kasireddy To: qemu-devel@nongnu.org Cc: Vivek Kasireddy , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Akihiko Odaki , Dmitry Osipenko , Alex Williamson , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v9 01/10] virtio-gpu: Recreate the resource's dmabuf if new backing is attached Date: Wed, 4 Mar 2026 22:54:32 -0800 Message-ID: <20260305065700.1155146-2-vivek.kasireddy@intel.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260305065700.1155146-1-vivek.kasireddy@intel.com> References: <20260305065700.1155146-1-vivek.kasireddy@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.198.163.8; envelope-from=vivek.kasireddy@intel.com; helo=mgamail.intel.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.703, RCVD_IN_VALIDITY_SAFE_BLOCKED=1.386, 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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1772694035968158500 There are cases when a blob resource's backing might get detached and re-attached again such as when the underlying object is getting migrated in the Guest. In these situations, we need to obtain a new dmabuf fd, which can be done by calling virtio_gpu_init_udmabuf(). Cc: Marc-Andr=C3=A9 Lureau Cc: Alex Benn=C3=A9e Cc: Akihiko Odaki Cc: Dmitry Osipenko Cc: Alex Williamson Cc: C=C3=A9dric Le Goater Reviewed-by: Akihiko Odaki Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 643e91ca2a..f20111fa57 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -937,6 +937,10 @@ virtio_gpu_resource_attach_backing(VirtIOGPU *g, cmd->error =3D VIRTIO_GPU_RESP_ERR_UNSPEC; return; } + + if (res->blob_size) { + virtio_gpu_init_udmabuf(res); + } } =20 static void --=20 2.53.0