[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/13] hw/virtio: Add VirtioPCIDeviceTypeInfo::instance_finalize f
|
From: |
Peter Maydell |
|
Subject: |
[PULL 05/13] hw/virtio: Add VirtioPCIDeviceTypeInfo::instance_finalize field |
|
Date: |
Mon, 27 Nov 2023 17:08:15 +0000 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
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é <philmd@linaro.org>
Message-id: 20231121174051.63038-2-philmd@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
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,
--
2.34.1
- [PULL 00/13] target-arm queue, Peter Maydell, 2023/11/27
- [PULL 01/13] target/arm: Set IL bit for pauth, SVE access, BTI trap syndromes, Peter Maydell, 2023/11/27
- [PULL 03/13] hw/net/can/xlnx-zynqmp: Avoid underflow while popping TX FIFOs, Peter Maydell, 2023/11/27
- [PULL 06/13] hw/virtio: Free VirtIOIOMMUPCI::vdev.reserved_regions[] on finalize(), Peter Maydell, 2023/11/27
- [PULL 04/13] hw/net/can/xlnx-zynqmp: Avoid underflow while popping RX FIFO, Peter Maydell, 2023/11/27
- [PULL 07/13] hw/misc/mps2-scc: Free MPS2SCC::oscclk[] array on finalize(), Peter Maydell, 2023/11/27
- [PULL 05/13] hw/virtio: Add VirtioPCIDeviceTypeInfo::instance_finalize field,
Peter Maydell <=
- [PULL 12/13] hw/misc, hw/ssi: Fix some URLs for AMD / Xilinx models, Peter Maydell, 2023/11/27
- [PULL 09/13] hw/nvram/xlnx-efuse-ctrl: Free XlnxVersalEFuseCtrl[] "pg0-lock" array, Peter Maydell, 2023/11/27
- [PULL 02/13] target/arm: Handle overflow in calculation of next timer tick, Peter Maydell, 2023/11/27
- [PULL 08/13] hw/nvram/xlnx-efuse: Free XlnxEFuse::ro_bits[] array on finalize(), Peter Maydell, 2023/11/27
- [PULL 10/13] hw/input/stellaris_gamepad: Free StellarisGamepad::keycodes[] array, Peter Maydell, 2023/11/27
- [PULL 13/13] hw/dma/xlnx_csu_dma: don't throw guest errors when stopping the SRC DMA, Peter Maydell, 2023/11/27
- [PULL 11/13] hw/ssi/xilinx_spips: fix an out of bound access, Peter Maydell, 2023/11/27
- Re: [PULL 00/13] target-arm queue, Stefan Hajnoczi, 2023/11/28
- Re: [PULL 00/13] target-arm queue, Stefan Hajnoczi, 2023/11/28