All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>,
	"Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>
Subject: [PATCH 2/2] hw/hyperv/vmbus: Convert to Resettable interface
Date: Mon, 30 Nov 2026 18:33:47 +0000	[thread overview]
Message-ID: <20261130-hyperv-resettable-v1-2-bc96d292edaa@gmail.com> (raw)
In-Reply-To: <20261130-hyperv-resettable-v1-0-bc96d292edaa@gmail.com>

Replace the transitional device_class_set_legacy_reset() wrapper with
the ResettableClass interface by implementing the hold phase in
vmbus_dev_reset_hold().

Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
 hw/hyperv/vmbus.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c
index ab99f08..ac6820d 100644
--- a/hw/hyperv/vmbus.c
+++ b/hw/hyperv/vmbus.c
@@ -2318,10 +2318,10 @@ error_out:
     error_propagate(errp, err);
 }
 
-static void vmbus_dev_reset(DeviceState *dev)
+static void vmbus_dev_reset_hold(Object *obj, ResetType type)
 {
     uint16_t i;
-    VMBusDevice *vdev = VMBUS_DEVICE(dev);
+    VMBusDevice *vdev = VMBUS_DEVICE(obj);
     VMBusDeviceClass *vdc = VMBUS_DEVICE_GET_CLASS(vdev);
 
     if (vdev->channels) {
@@ -2387,7 +2387,7 @@ static void vmbus_dev_class_init(ObjectClass *klass, const void *data)
     kdev->bus_type = TYPE_VMBUS;
     kdev->realize = vmbus_dev_realize;
     kdev->unrealize = vmbus_dev_unrealize;
-    device_class_set_legacy_reset(kdev, vmbus_dev_reset);
+    RESETTABLE_CLASS(klass)->phases.hold = vmbus_dev_reset_hold;
 }
 
 static void vmbus_dev_instance_init(Object *obj)

-- 
2.53.0



  parent reply	other threads:[~2026-11-30 18:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 18:33 [PATCH 0/2] hw/hyperv: Convert Hyper-V devices to Resettable interface Oscar Alejandro Sánchez Lucero
2026-11-30 18:33 ` [PATCH 1/2] hw/hyperv/hyperv: Convert " Oscar Alejandro Sánchez Lucero
2026-12-01 13:41   ` Bin Meng
2026-11-30 18:33 ` Oscar Alejandro Sánchez Lucero [this message]
2026-12-01 13:41   ` [PATCH 2/2] hw/hyperv/vmbus: " Bin Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130-hyperv-resettable-v1-2-bc96d292edaa@gmail.com \
    --to=aleszlucero@gmail.com \
    --cc=maciej.szmigiero@oracle.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.