From patchwork Mon Nov 27 17:08:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 747588 Delivered-To: patch@linaro.org Received: by 2002:a5d:6706:0:b0:32d:baff:b0ca with SMTP id o6csp3317039wru; Mon, 27 Nov 2023 09:10:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyWBhIDlnlyrT1i4mU+LN3UZlYP4HsUZ1nlZGJkz5pzyY6RyVDSR+H817fQZ3kbE2dzA1M X-Received: by 2002:adf:f9ce:0:b0:332:ee1e:1993 with SMTP id w14-20020adff9ce000000b00332ee1e1993mr6125426wrr.20.1701105040637; Mon, 27 Nov 2023 09:10:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701105040; cv=none; d=google.com; s=arc-20160816; b=hE33QpItRFnf5zfFO4IcDBXbWogcSFoUUI0nsDlPCIDggOjQAlRg9i24D4QideUb4b mSyunBcKwm5/CHs+d1MeX/9iT1udXd5y611KVQzJHrsrlGTlDfxLuEEUzDrJLN75bwiL 4t3NrBwNMmDzjMFnz1SUPDeBhu5TTdXAgL35NH5rESe4HGf/5NiDodl2TfAPvOHkufzv VkVcBF+CTsIa1F8JQFwKUFalAe9nWEXRzi6LT8JD1kAJVxz0xnzzPouwfjzYakli+xoG Gd1kQOXhUf4wVUQin43HjXr0vEgRoy0ZK20fyxC50dQvpwzTVNLS4pXhR7VANIqpaxaS iwIQ== 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:to:from :dkim-signature; bh=Uozfwdg6qaLITswlXPk9OVCRz1sYyYvlqurNNgsUApU=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=QkbLUv7xKoVa3pCLo4o3Obruq83bG/Xncybb+6h+tQV66kLB8NFmFoFXo6Nv5F+boB TvLtzVM7DkshEdOUDS6xnu0pZtOFXhzA6hhKAWVs55OuZoV26/5r7Z8AEXQhf2WN6EFB Ja4RNt12hoQVGSlIO3rItseAzqiFpnukokv4OtVarIqbdFD2yfaiWpYqzMaZQQUTES+I zfEz5ErldxVSkvwbaB9Ads45RtQOWQHFjBeIFXjiWUZhSPCD0O1QOh4DIQ9LecPlco+e fJXf4b5I8cLQqkf2rD3AHMehtF1DAhZlhYBesdcNtRymJfvKqNOufb7uxRGp2ydVGREh QX1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SQBdXuM1; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l8-20020a5d6748000000b0032f7a8bae56si5598924wrw.1041.2023.11.27.09.10.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Nov 2023 09:10:40 -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; dkim=pass header.i=@linaro.org header.s=google header.b=SQBdXuM1; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7f6C-0007Uh-0J; Mon, 27 Nov 2023 12:08:44 -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 1r7f63-0007Sa-Jq for qemu-devel@nongnu.org; Mon, 27 Nov 2023 12:08:37 -0500 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7f5y-0004d3-E7 for qemu-devel@nongnu.org; Mon, 27 Nov 2023 12:08:35 -0500 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2c997447ff9so27099201fa.0 for ; Mon, 27 Nov 2023 09:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701104908; x=1701709708; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Uozfwdg6qaLITswlXPk9OVCRz1sYyYvlqurNNgsUApU=; b=SQBdXuM1ODmWaIcoB+fL56b2Gc+hwaSl/pKdp5DuxFS42DDEgmctMxEwTHpF0s+iMv MSbSO/WIB2HB6PyT6Uo9/eQ06WaLzuAKwa78XY+RmA0VJEY/hB54phXDqx7BWU2GwAwL 6osgq9emVsNF6xJyNzyd/5ZafSWRmog4J+UDrzQK0OyXrXf0zV69rJTRQonca3JR3zFv L4ThvKxkyww7wgX4pNSiaXeTdjgeZnZpRZC99lpo26wpfePn7yXRdep5ljTK1vPy2Mi2 NQjiYnxdKlSqz5R68zr8HR+HdvuN6A0efn9gP8ddMNkMutbgDp6VlcAb47azwM+NDDSp B7gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701104908; x=1701709708; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Uozfwdg6qaLITswlXPk9OVCRz1sYyYvlqurNNgsUApU=; b=uaLkqtuXPIhv1d3jYJWfScqLu6JNscaDTfY6wKaGWMNO5K92KgLNBR+GIoXqZdpJAo M9W5iEnLR7v0SYox8l7EifAnacnJHW5S5YYGDvxvS8+n2cLZKGaDq9cRYoSeD/nK2l6G FyVcNz5UFbuCTI74FkKzblf36mLRkiUtmmvb8ew/UlkF/vA5aQ9nH4i9JVcbUpgvMB0d 6kQp87Pv3Lslq6McEXCZK+Ryyv3LAsz6jQHfEV84nbK7nCVG8vV5w+Zu1hEfsAFTnmkk DzAbPn9yXr/UiMHxNaWrlf3XEx9vp2/r/0aHCa2xlpZoTETcO53pwl6hsxXTnKTI33AB 0rVQ== X-Gm-Message-State: AOJu0Yw5vmjGNmW7FDwBtvELLiTX8kBuh9m2tX08/7JsabTAFguKMKeA +WDWdwQ0fRuUDkxSmxJA9g+/UenwZcwvfK6PYKo= X-Received: by 2002:a2e:8ec4:0:b0:2c5:380:2a10 with SMTP id e4-20020a2e8ec4000000b002c503802a10mr8451966ljl.25.1701104908725; Mon, 27 Nov 2023 09:08:28 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id fl8-20020a05600c0b8800b004030e8ff964sm15353216wmb.34.2023.11.27.09.08.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 09:08:27 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/13] hw/virtio: Add VirtioPCIDeviceTypeInfo::instance_finalize field Date: Mon, 27 Nov 2023 17:08:15 +0000 Message-Id: <20231127170823.589863-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231127170823.589863-1-peter.maydell@linaro.org> References: <20231127170823.589863-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::233; envelope-from=peter.maydell@linaro.org; helo=mail-lj1-x233.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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 --- include/hw/virtio/virtio-pci.h | 1 + hw/virtio/virtio-pci.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/hw/virtio/virtio-pci.h b/include/hw/virtio/virtio-pci.h index 5a3f182f998..59d88018c16 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; diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 205dbf24fb1..e4338795423 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2391,6 +2391,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,