All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw/remote/proxy: Convert to Resettable interface
@ 2026-12-01 16:27 Oscar Alejandro Sánchez Lucero
  0 siblings, 0 replies; only message in thread
From: Oscar Alejandro Sánchez Lucero @ 2026-12-01 16:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: Elena Ufimtseva, Jagannathan Raman,
	Oscar Alejandro Sánchez Lucero

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>



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-01 16:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 16:27 [PATCH] hw/remote/proxy: Convert to Resettable interface Oscar Alejandro Sánchez Lucero

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.