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: "Elena Ufimtseva" <elena.ufimtseva@oracle.com>,
	"Jagannathan Raman" <jag.raman@oracle.com>,
	"Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>
Subject: [PATCH] hw/remote/proxy: Convert to Resettable interface
Date: Tue, 01 Dec 2026 16:27:20 +0000	[thread overview]
Message-ID: <20261201-remote-proxy-resettable-v1-1-168352bb73af@gmail.com> (raw)

Replace the deprecated device_class_set_legacy_reset() with the
Resettable interface by implementing the hold phase in
proxy_device_reset_hold().

Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
 hw/remote/proxy.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/hw/remote/proxy.c b/hw/remote/proxy.c
index e915665..fee2ebe 100644
--- a/hw/remote/proxy.c
+++ b/hw/remote/proxy.c
@@ -24,7 +24,7 @@
 #include "system/kvm.h"
 
 static void probe_pci_info(PCIDevice *dev, Error **errp);
-static void proxy_device_reset(DeviceState *dev);
+static void proxy_device_reset_hold(Object *obj, ResetType type);
 
 static void proxy_intx_update(PCIDevice *pci_dev)
 {
@@ -214,13 +214,14 @@ static void pci_proxy_dev_class_init(ObjectClass *klass, const void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+    ResettableClass *rc = RESETTABLE_CLASS(klass);
 
     k->realize = pci_proxy_dev_realize;
     k->exit = pci_proxy_dev_exit;
     k->config_read = pci_proxy_read_config;
     k->config_write = pci_proxy_write_config;
 
-    device_class_set_legacy_reset(dc, proxy_device_reset);
+    rc->phases.hold = proxy_device_reset_hold;
 
     device_class_set_props(dc, proxy_properties);
 }
@@ -379,9 +380,9 @@ static void probe_pci_info(PCIDevice *dev, Error **errp)
     }
 }
 
-static void proxy_device_reset(DeviceState *dev)
+static void proxy_device_reset_hold(Object *obj, ResetType type)
 {
-    PCIProxyDev *pdev = PCI_PROXY_DEV(dev);
+    PCIProxyDev *pdev = PCI_PROXY_DEV(obj);
     MPQemuMsg msg = { 0 };
     Error *local_err = NULL;
 

---
base-commit: 9751c62358073580cbf330a4df22077a7c6a407c
change-id: 20261201-remote-proxy-resettable-bc917d83aa14

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



                 reply	other threads:[~2026-12-01 16:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261201-remote-proxy-resettable-v1-1-168352bb73af@gmail.com \
    --to=aleszlucero@gmail.com \
    --cc=elena.ufimtseva@oracle.com \
    --cc=jag.raman@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.