aboutsummaryrefslogtreecommitdiff
path: root/hw/hyperv
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-01-19 16:35:09 +0000
committerPeter Maydell <peter.maydell@linaro.org>2024-02-02 13:51:57 +0000
commitd7f35529287abf0ed66e83eb0614bc24186f6957 (patch)
treeba41a8a8a048821e755e5dcd8cfd6651efafb613 /hw/hyperv
parente6c03989af6dcdfdd64ff717a8b4b47f3848c0b7 (diff)
downloadqemu-d7f35529287abf0ed66e83eb0614bc24186f6957.zip
qemu-d7f35529287abf0ed66e83eb0614bc24186f6957.tar.gz
qemu-d7f35529287abf0ed66e83eb0614bc24186f6957.tar.bz2
vmbus: Switch bus reset to 3-phase-reset
Switch vmbus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Cédric Le Goater <clg@redhat.com> Acked-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Tested-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Message-id: 20240119163512.3810301-3-peter.maydell@linaro.org
Diffstat (limited to 'hw/hyperv')
-rw-r--r--hw/hyperv/vmbus.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c
index c86d189..380239a 100644
--- a/hw/hyperv/vmbus.c
+++ b/hw/hyperv/vmbus.c
@@ -2453,9 +2453,9 @@ static void vmbus_unrealize(BusState *bus)
qemu_mutex_destroy(&vmbus->rx_queue_lock);
}
-static void vmbus_reset(BusState *bus)
+static void vmbus_reset_hold(Object *obj)
{
- vmbus_deinit(VMBUS(bus));
+ vmbus_deinit(VMBUS(obj));
}
static char *vmbus_get_dev_path(DeviceState *dev)
@@ -2476,12 +2476,13 @@ static char *vmbus_get_fw_dev_path(DeviceState *dev)
static void vmbus_class_init(ObjectClass *klass, void *data)
{
BusClass *k = BUS_CLASS(klass);
+ ResettableClass *rc = RESETTABLE_CLASS(klass);
k->get_dev_path = vmbus_get_dev_path;
k->get_fw_dev_path = vmbus_get_fw_dev_path;
k->realize = vmbus_realize;
k->unrealize = vmbus_unrealize;
- k->reset = vmbus_reset;
+ rc->phases.hold = vmbus_reset_hold;
}
static int vmbus_pre_load(void *opaque)