From patchwork Wed Dec 13 13:00:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 753523 Delivered-To: patch@linaro.org Received: by 2002:adf:ff85:0:b0:336:3f68:820c with SMTP id j5csp182862wrr; Wed, 13 Dec 2023 05:06:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFtgNcLS2F6IsFwKOsrE0D9qRdsKzpQt/Z0ioMoP2SAR8UZQWOuMMTOcg0KYA3dZlquP7U4 X-Received: by 2002:a05:622a:100f:b0:425:4043:18ce with SMTP id d15-20020a05622a100f00b00425404318cemr10272462qte.129.1702472805044; Wed, 13 Dec 2023 05:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702472805; cv=none; d=google.com; s=arc-20160816; b=TNchj7i2cTK+pxgYFB1xeBJ4ZR1D57hM9SLOYrsoZhdJq/Q2uzAQsjVFm/Fdlfiw9R 1rLtb9FuDaZ8wf1nydaXYyOjGqXeSXFJiK4yiX0p3oqcx6Fkxcr298HK2zAHvm+1SxUP KtjDU7i3a/JPWviX2ShGsy8GHCtf6p8oErvOBYiRrLvts9aN4pB8yuUifmf/6xnPSflO BnHPEKnIUGKypHVB9s30ttR1TRiDNcUvyw8j5oIoZqUKqqXri6pZGT1O4DFjrYDIOKkX HbWhUV6YzLqEhuUEnjFzPxPuTjpYCS15Pp7eqOYHcJIRvt2wvLU4KNAXz5KiETKKbgSI nUVA== 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=5oSHHGZEw4PLKCQJS6InwM2iH7O4/DqA0n/Q0Nb0IR8=; fh=m04Zw7Rd3szriI+fwMSRTbsn9jEhMzlDh3fvULRyulY=; b=qpjZ3DC8cUF3jkhgMS0lolM9mbFAjlgLXR6U+6/N7gILCPQddSiKByK4QNR7XmqoyF Of1tohlZYBOkH0dD+4GC6VfpWAfhwMG4wctp02jVx3bSXx0mawJCglrOj1HefnBMdnoG y6GLrimPNmHzQQhl62ZGjkQrDtO28zf+Y87qvs5hLfhPASSsFVkngMKfL/8M+nbsOwpS 3TPtMgGnNdnSnyXFDQnMQHY6SoE1c5ZtJvO+wkK/aiRsQGqMyXsPe5EOGnb2duG3ymKQ JeeyICDlBgV88txxNI2LjcNIB0E8rlUZtKcrXECdUSKm133+sq1VK3IwYun/QkLZ+H3z ludg== 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 s7-20020ac87587000000b00425525e7db8si12174191qtq.461.2023.12.13.05.06.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Dec 2023 05:06:45 -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 1rDOtP-0001QG-Ce; Wed, 13 Dec 2023 08:03:15 -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 1rDOs1-0008Il-Ok; Wed, 13 Dec 2023 08:01:49 -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 1rDOrz-00071U-Vc; Wed, 13 Dec 2023 08:01:49 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 97F8B3B440; Wed, 13 Dec 2023 16:01:01 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 3D6DB3C8D1; Wed, 13 Dec 2023 16:00:42 +0300 (MSK) Received: (nullmailer pid 1024733 invoked by uid 1000); Wed, 13 Dec 2023 13:00:41 -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-7.2.8 13/24] hw/virtio: Add VirtioPCIDeviceTypeInfo::instance_finalize field Date: Wed, 13 Dec 2023 16:00:22 +0300 Message-Id: <20231213130041.1024630-13-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 67e771c373..e5e74a7160 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2174,6 +2174,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 938799e8f6..c4676ff4d4 100644 --- a/include/hw/virtio/virtio-pci.h +++ b/include/hw/virtio/virtio-pci.h @@ -241,6 +241,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;