From patchwork Tue Dec 12 12:18:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 753054 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1869541wrs; Tue, 12 Dec 2023 04:24:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGcbzXTh1rn/xZjPvkqFhqie40jjHAuLeJWBomAJHxArD2GQ1xwz4LDnOt9+OzJj5HWc6iL X-Received: by 2002:a05:6808:3a19:b0:3b9:e0f1:809b with SMTP id gr25-20020a0568083a1900b003b9e0f1809bmr10082359oib.49.1702383867077; Tue, 12 Dec 2023 04:24:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702383867; cv=none; d=google.com; s=arc-20160816; b=s0idY4pvlbP1Bd+tXlO1ZXtO/UnVGxFvfBK+7oBxNpX7sJbSo1iczdst8O/6qzpgor b9pVFoj6tEh5WK7zfGYFVLrKSDI3KMSaUMgt/Q1ICteJHfe/Mg7vvmSmkkUCpupN0bnK hsJnVO7WpBlq81z/82wLQqblfHqZgT5Nb1MiJHSaLyDfQYwj/raT4F/yHaVcdMWfFTgI JH4ufYceE3CgonyqpQGPTaRoMh3Cri0wLLkgv3YBjwN4FPpLvT6ERXUCypyC4/SVuwdV QCqfhaRge1abAz260o8aBlp2/FEbEd7Zj6N0eAlfdFzx0cVSgVjEetDpe1pG6FFidgzM zcIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=YzUe1S2S8/20FSjVYGU7XIdDItxJeWpNeL9XX9jTpkc=; fh=m04Zw7Rd3szriI+fwMSRTbsn9jEhMzlDh3fvULRyulY=; b=sCAUzpknmAJ2nmhkddG0WdzldC7TYKyP1kIRQrbYG3583ZekzgyhIgP1I34j6oLqsc qho8TF09VJPbz3NFzS4V4cSvmCIyMcG6HmuPw0JtLE7LS62yq8pviLr/wVxPNyq7Pgu/ 6qbTjomRv7roJ7w7KVeNxM5P+Hvzq6cszfRf4DLNZRpFclgrj/KDTd6ajet86EC0k9OG dpdqCda2haEcNf8wp1OKlg5SHqmGdmdYwQit3LN0XXYqKrKOsXUqjyJET5WRUWvowZeO 42Nee2bpyaRC2yv/ZQKKHkTPNRcVfu3ALNglr0MM8XsdqAl++H1dvhE2uU+xM8+6PW7Z oByg== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dp12-20020a05620a2b4c00b0077419b27790si11156845qkb.97.2023.12.12.04.24.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Dec 2023 04:24:27 -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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rD1kr-0007dR-CR; Tue, 12 Dec 2023 07:20:54 -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 1rD1kT-0006u1-W9; Tue, 12 Dec 2023 07:20:32 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rD1kP-0000mi-PL; Tue, 12 Dec 2023 07:20:29 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 5161B3AF09; Tue, 12 Dec 2023 15:18:50 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 17B373B957; Tue, 12 Dec 2023 15:18:33 +0300 (MSK) Received: (nullmailer pid 1003462 invoked by uid 1000); Tue, 12 Dec 2023 12:18:31 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell , Michael Tokarev Subject: [Stable-8.1.4 21/31] hw/virtio: Add VirtioPCIDeviceTypeInfo::instance_finalize field Date: Tue, 12 Dec 2023 15:18:09 +0300 Message-Id: <20231212121831.1003318-21-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Philippe Mathieu-Daudé The VirtioPCIDeviceTypeInfo structure, added in commit a4ee4c8baa ("virtio: Helper for registering virtio device types") got extended in commit 8ea90ee690 ("virtio: add class_size") with the @class_size field. Do similarly with the @instance_finalize field. Signed-off-by: Philippe Mathieu-Daudé Message-id: 20231121174051.63038-2-philmd@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell (cherry picked from commit 837053a7f491b445088eac647abe7f462c50f59a) Signed-off-by: Michael Tokarev diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index edbc0daa18..c663fb2570 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2388,6 +2388,7 @@ void virtio_pci_types_register(const VirtioPCIDeviceTypeInfo *t) .parent = t->parent ? t->parent : TYPE_VIRTIO_PCI, .instance_size = t->instance_size, .instance_init = t->instance_init, + .instance_finalize = t->instance_finalize, .class_size = t->class_size, .abstract = true, .interfaces = t->interfaces, diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h index ab2051b64b..47c83edd28 100644 --- a/include/hw/virtio/virtio-pci.h +++ b/include/hw/virtio/virtio-pci.h @@ -246,6 +246,7 @@ typedef struct VirtioPCIDeviceTypeInfo { size_t instance_size; size_t class_size; void (*instance_init)(Object *obj); + void (*instance_finalize)(Object *obj); void (*class_init)(ObjectClass *klass, void *data); InterfaceInfo *interfaces; } VirtioPCIDeviceTypeInfo;