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 1/2] hw/hyperv/hyperv: Convert to Resettable interface
Date: Mon, 30 Nov 2026 18:33:46 +0000 [thread overview]
Message-ID: <20261130-hyperv-resettable-v1-1-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
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
next prev 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 ` Oscar Alejandro Sánchez Lucero [this message]
2026-12-01 13:41 ` [PATCH 1/2] hw/hyperv/hyperv: Convert " 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
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-1-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.