All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] hw/hyperv: Convert Hyper-V devices to Resettable interface
@ 2026-11-30 18:33 Oscar Alejandro Sánchez Lucero
  2026-11-30 18:33 ` [PATCH 1/2] hw/hyperv/hyperv: Convert " Oscar Alejandro Sánchez Lucero
  2026-11-30 18:33 ` [PATCH 2/2] hw/hyperv/vmbus: " Oscar Alejandro Sánchez Lucero
  0 siblings, 2 replies; 5+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-11-30 18:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Maciej S. Szmigiero, Oscar Alejandro Sánchez Lucero

Convert the remaining Hyper-V device models in hw/hyperv/ (hyperv-synic
and vmbus-device) from the transitional device_class_set_legacy_reset()
wrapper to the ResettableClass interface (hold phase), moving towards
removing the legacy_reset callback from DeviceClass once all callers are
migrated (as noted in include/hw/core/qdev.h).

Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
Oscar Alejandro Sánchez Lucero (2):
      hw/hyperv/hyperv: Convert to Resettable interface
      hw/hyperv/vmbus: Convert to Resettable interface

 hw/hyperv/hyperv.c | 6 +++---
 hw/hyperv/vmbus.c  | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
---
base-commit: 9751c62358073580cbf330a4df22077a7c6a407c
change-id: 20261130-hyperv-resettable-5445c813cd28

Best regards,
--  
Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] hw/hyperv/hyperv: Convert to Resettable interface
  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 ` Oscar Alejandro Sánchez Lucero
  2026-12-01 13:41   ` Bin Meng
  2026-11-30 18:33 ` [PATCH 2/2] hw/hyperv/vmbus: " Oscar Alejandro Sánchez Lucero
  1 sibling, 1 reply; 5+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-11-30 18:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Maciej S. Szmigiero, Oscar Alejandro Sánchez Lucero

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

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

diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c
index 900ff80..4c0380e 100644
--- a/hw/hyperv/hyperv.c
+++ b/hw/hyperv/hyperv.c
@@ -131,9 +131,9 @@ static void synic_realize(DeviceState *dev, Error **errp)
     g_free(eventp_name);
 }
 
-static void synic_reset(DeviceState *dev)
+static void synic_reset_hold(Object *obj, ResetType type)
 {
-    SynICState *synic = SYNIC(dev);
+    SynICState *synic = SYNIC(obj);
     memset(synic->msg_page, 0, sizeof(*synic->msg_page));
     memset(synic->event_page, 0, sizeof(*synic->event_page));
     synic_update(synic, false, 0, 0);
@@ -145,7 +145,7 @@ static void synic_class_init(ObjectClass *klass, const void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
 
     dc->realize = synic_realize;
-    device_class_set_legacy_reset(dc, synic_reset);
+    RESETTABLE_CLASS(klass)->phases.hold = synic_reset_hold;
     dc->user_creatable = false;
 }
 

-- 
2.53.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] hw/hyperv/vmbus: Convert to Resettable interface
  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-11-30 18:33 ` Oscar Alejandro Sánchez Lucero
  2026-12-01 13:41   ` Bin Meng
  1 sibling, 1 reply; 5+ messages in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-11-30 18:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Maciej S. Szmigiero, Oscar Alejandro Sánchez Lucero

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] hw/hyperv/hyperv: Convert to Resettable interface
  2026-11-30 18:33 ` [PATCH 1/2] hw/hyperv/hyperv: Convert " Oscar Alejandro Sánchez Lucero
@ 2026-12-01 13:41   ` Bin Meng
  0 siblings, 0 replies; 5+ messages in thread
From: Bin Meng @ 2026-12-01 13:41 UTC (permalink / raw)
  To: Oscar Alejandro Sánchez Lucero; +Cc: qemu-devel, Maciej S. Szmigiero

On Tue, Dec 1, 2026 at 2:34 AM Oscar Alejandro Sánchez Lucero
<aleszlucero@gmail.com> wrote:
>
> Replace the transitional device_class_set_legacy_reset() wrapper with
> the ResettableClass interface by implementing the hold phase in
> synic_reset_hold().
>
> Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
> ---
>  hw/hyperv/hyperv.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>

Reviewed-by: Bin Meng <bin.meng@processmission.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] hw/hyperv/vmbus: Convert to Resettable interface
  2026-11-30 18:33 ` [PATCH 2/2] hw/hyperv/vmbus: " Oscar Alejandro Sánchez Lucero
@ 2026-12-01 13:41   ` Bin Meng
  0 siblings, 0 replies; 5+ messages in thread
From: Bin Meng @ 2026-12-01 13:41 UTC (permalink / raw)
  To: Oscar Alejandro Sánchez Lucero; +Cc: qemu-devel, Maciej S. Szmigiero

On Tue, Dec 1, 2026 at 2:34 AM Oscar Alejandro Sánchez Lucero
<aleszlucero@gmail.com> wrote:
>
> 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(-)
>

Reviewed-by: Bin Meng <bin.meng@processmission.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-01 13:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/2] hw/hyperv/vmbus: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:41   ` Bin Meng

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.