All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <graf@amazon.com>
To: <qemu-devel@nongnu.org>
Cc: qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org,
	qemu-s390x@nongnu.org, "Song Gao" <17746591750@163.com>,
	"Aditya Gupta" <adityag@linux.ibm.com>,
	"Alexey Kardashevskiy" <aik@ozlabs.ru>,
	"Farhan Ali" <alifm@linux.ibm.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Antony Pavlov" <antonynpavlov@gmail.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"BALATON Zoltan" <balaton@eik.bme.hu>,
	"Felipe Balbi" <balbi@kernel.org>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Brian Cain" <brian.cain@oss.qualcomm.com>,
	"Hendrik Brueckner" <brueckner@linux.ibm.com>,
	"Chao Liu" <chao.liu@processmission.com>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"Clément Chigot" <chigot@adacore.com>,
	"Cédric Le Goater" <clg@kaod.org>, "Helge Deller" <deller@gmx.de>,
	"Dorjoy Chowdhury" <dorjoychy111@gmail.com>,
	"Edgar E . Iglesias" <edgar.iglesias@gmail.com>,
	"Alexandre Iooss" <erdnaxe@crans.org>,
	"Eric Farman" <farman@linux.ibm.com>,
	"Francisco Iglesias" <francisco.iglesias@amd.com>,
	"Gaurav Sharma" <gaurav.sharma_7@nxp.com>,
	"Gautam Gala" <ggala@linux.ibm.com>,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Jan Kiszka" <jan.kiszka@web.de>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Jared Rossi" <jrossi@linux.ibm.com>,
	"Tyrone Ting" <kfting@nuvoton.com>,
	"Frederic Konrad" <konrad.frederic@yahoo.fr>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Bibo Mao" <maobibo@loongson.cn>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Glenn Miles" <milesg@linux.ibm.com>,
	"Matthew Rosato" <mjrosato@linux.ibm.com>,
	"Michael Rolnik" <mrolnik@gmail.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	"Niek Linnenbank" <nieklinnenbank@gmail.com>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@mailo.com>,
	"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Sai Pavan Boddu" <sai.pavan.boddu@amd.com>,
	"Samuel Tardieu" <sam@rfc1149.net>,
	"Bernhard Beschow" <shentey@gmail.com>,
	"Stafford Horne" <shorne@gmail.com>,
	"Sergio Lopez" <slp@redhat.com>,
	"Subbaraya Sundeep" <sundeep.lkml@gmail.com>,
	"Thomas Huth" <th.huth+qemu@posteo.eu>,
	"Ran Wang" <wangran@bosc.ac.cn>, "Hao Wu" <wuhaotsh@google.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>
Subject: [RFC PATCH 046/134] hw/i2c: Give onboard devices a QOM parent
Date: Sat, 11 Jul 2026 22:35:39 +0000	[thread overview]
Message-ID: <20260711223707.42139-47-graf@amazon.com> (raw)
In-Reply-To: <20260711223707.42139-1-graf@amazon.com>

Convert the *_orphan() device-creation calls in hw/i2c to the new
parented API introduced earlier in this series, so every onboard
device gets a stable path in the composition tree instead of landing
in /machine/unattached with an unstable device[N] name.

The parent for each device is the object that owns its lifetime: the
machine for board-created devices, the containing device for
composite children.  Names follow existing QOM conventions.

Per-site rationale (reviewers: dispute the modeling here):

hw/i2c/aspeed_i2c.c:1521 | i2c_slave_create_simple | OBJECT(s) | "slave" | inside AspeedI2CBus DeviceClass.realize(); slave belongs to the bus device
hw/i2c/core.c:367 | - | ORPHAN-JUSTIFIED | - | i2c_slave_new_orphan() is the orphan-API implementation itself; parented sibling already exists at :376
hw/i2c/core.c:371 | - | ORPHAN-JUSTIFIED | - | body of i2c_slave_new_orphan(); intentional orphan wrapper
hw/i2c/core.c:401 | - | ORPHAN-JUSTIFIED | - | i2c_slave_create_simple_orphan() is the orphan-API implementation itself; parented sibling already exists at :386
hw/i2c/core.c:403 | - | ORPHAN-JUSTIFIED | - | body of i2c_slave_create_simple_orphan(); intentional orphan wrapper
hw/i2c/smbus_eeprom.c:167 | qdev_new | parent | "eeprom[*]" | helper called from many board inits; thread Object *parent through smbus_eeprom_init_one() and smbus_eeprom_init() and update all 17 callers

Link: https://lore.kernel.org/qemu-devel/87jyr3w9tc.fsf@pond.sub.org/
Assisted-by: Kiro
Signed-off-by: Alexander Graf <graf@amazon.com>
---
 hw/arm/aspeed_ast1040_evb.c               |  3 ++-
 hw/arm/aspeed_ast10x0_evb.c               |  3 ++-
 hw/arm/aspeed_ast2400_palmetto.c          |  2 +-
 hw/arm/aspeed_ast2400_supermicrox11.c     |  2 +-
 hw/arm/aspeed_ast2500_evb.c               |  2 +-
 hw/arm/aspeed_ast2500_g220a.c             |  2 +-
 hw/arm/aspeed_ast2500_supermicro-x11spi.c |  2 +-
 hw/arm/aspeed_ast2500_witherspoon.c       |  2 +-
 hw/arm/aspeed_ast2600_evb.c               |  2 +-
 hw/i2c/aspeed_i2c.c                       |  4 ++--
 hw/i2c/smbus_eeprom.c                     | 11 ++++++-----
 hw/i386/pc_piix.c                         |  2 +-
 hw/i386/pc_q35.c                          |  2 +-
 hw/mips/fuloong2e.c                       |  2 +-
 hw/mips/malta.c                           |  2 +-
 hw/ppc/amigaone.c                         |  4 ++--
 hw/ppc/pegasos.c                          |  2 +-
 hw/ppc/sam460ex.c                         |  2 +-
 include/hw/i2c/smbus_eeprom.h             |  5 +++--
 19 files changed, 30 insertions(+), 26 deletions(-)

diff --git a/hw/arm/aspeed_ast1040_evb.c b/hw/arm/aspeed_ast1040_evb.c
index d0326d39f9..fb83087b13 100644
--- a/hw/arm/aspeed_ast1040_evb.c
+++ b/hw/arm/aspeed_ast1040_evb.c
@@ -54,7 +54,8 @@ static void ast1040_evb_i2c_init(AspeedMachineState *bmc)
     AspeedSoCState *soc = bmc->soc;
     uint8_t *eeprom_buf = g_malloc0(256);
 
-    smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 0), 0x50, eeprom_buf);
+    smbus_eeprom_init_one(OBJECT(bmc), aspeed_i2c_get_bus(&soc->i2c, 0), 0x50,
+                          eeprom_buf);
     i2c_slave_create_simple_orphan(aspeed_i2c_get_bus(&soc->i2c, 1), "tmp105", 0x4d);
 }
 
diff --git a/hw/arm/aspeed_ast10x0_evb.c b/hw/arm/aspeed_ast10x0_evb.c
index 52ead37bc7..dc134b555c 100644
--- a/hw/arm/aspeed_ast10x0_evb.c
+++ b/hw/arm/aspeed_ast10x0_evb.c
@@ -70,7 +70,8 @@ static void ast1030_evb_i2c_init(AspeedMachineState *bmc)
 
     /* U10 24C08 connects to SDA/SCL Group 1 by default */
     uint8_t *eeprom_buf = g_malloc0(32 * 1024);
-    smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 0), 0x50, eeprom_buf);
+    smbus_eeprom_init_one(OBJECT(bmc), aspeed_i2c_get_bus(&soc->i2c, 0), 0x50,
+                          eeprom_buf);
 
     /* U11 LM75 connects to SDA/SCL Group 2 by default */
     i2c_slave_create_simple_orphan(aspeed_i2c_get_bus(&soc->i2c, 1), "tmp105", 0x4d);
diff --git a/hw/arm/aspeed_ast2400_palmetto.c b/hw/arm/aspeed_ast2400_palmetto.c
index d89d042ce2..80f9c911b8 100644
--- a/hw/arm/aspeed_ast2400_palmetto.c
+++ b/hw/arm/aspeed_ast2400_palmetto.c
@@ -39,7 +39,7 @@ static void palmetto_bmc_i2c_init(AspeedMachineState *bmc)
      */
     i2c_slave_create_simple_orphan(aspeed_i2c_get_bus(&soc->i2c, 0), "ds1338", 0x68);
 
-    smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 0), 0x50,
+    smbus_eeprom_init_one(OBJECT(bmc), aspeed_i2c_get_bus(&soc->i2c, 0), 0x50,
                           eeprom_buf);
 
     /* add a TMP423 temperature sensor */
diff --git a/hw/arm/aspeed_ast2400_supermicrox11.c b/hw/arm/aspeed_ast2400_supermicrox11.c
index 9c90998754..b18adf3981 100644
--- a/hw/arm/aspeed_ast2400_supermicrox11.c
+++ b/hw/arm/aspeed_ast2400_supermicrox11.c
@@ -39,7 +39,7 @@ static void supermicrox11_bmc_i2c_init(AspeedMachineState *bmc)
      */
     i2c_slave_create_simple_orphan(aspeed_i2c_get_bus(&soc->i2c, 0), "ds1338", 0x68);
 
-    smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 0), 0x50,
+    smbus_eeprom_init_one(OBJECT(bmc), aspeed_i2c_get_bus(&soc->i2c, 0), 0x50,
                           eeprom_buf);
 
     /* add a TMP423 temperature sensor */
diff --git a/hw/arm/aspeed_ast2500_evb.c b/hw/arm/aspeed_ast2500_evb.c
index e46ce4a5aa..ba8a56bafd 100644
--- a/hw/arm/aspeed_ast2500_evb.c
+++ b/hw/arm/aspeed_ast2500_evb.c
@@ -30,7 +30,7 @@ static void ast2500_evb_i2c_init(AspeedMachineState *bmc)
     AspeedSoCState *soc = bmc->soc;
     uint8_t *eeprom_buf = g_malloc0(8 * 1024);
 
-    smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 3), 0x50,
+    smbus_eeprom_init_one(OBJECT(bmc), aspeed_i2c_get_bus(&soc->i2c, 3), 0x50,
                           eeprom_buf);
 
     /* The AST2500 EVB expects a LM75 but a TMP105 is compatible */
diff --git a/hw/arm/aspeed_ast2500_g220a.c b/hw/arm/aspeed_ast2500_g220a.c
index 577ee0aff4..27c9dc436a 100644
--- a/hw/arm/aspeed_ast2500_g220a.c
+++ b/hw/arm/aspeed_ast2500_g220a.c
@@ -59,7 +59,7 @@ static void g220a_bmc_i2c_init(AspeedMachineState *bmc)
             0x46, 0x46, 0xc4, 0x48, 0x48, 0x47, 0x47, 0xc1,
             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7,
     };
-    smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 4), 0x57,
+    smbus_eeprom_init_one(OBJECT(bmc), aspeed_i2c_get_bus(&soc->i2c, 4), 0x57,
                           eeprom_buf);
 }
 
diff --git a/hw/arm/aspeed_ast2500_supermicro-x11spi.c b/hw/arm/aspeed_ast2500_supermicro-x11spi.c
index 9e95d26901..bea459eeaa 100644
--- a/hw/arm/aspeed_ast2500_supermicro-x11spi.c
+++ b/hw/arm/aspeed_ast2500_supermicro-x11spi.c
@@ -35,7 +35,7 @@ static void supermicro_x11spi_bmc_i2c_init(AspeedMachineState *bmc)
      */
     i2c_slave_create_simple_orphan(aspeed_i2c_get_bus(&soc->i2c, 0), "ds1338", 0x68);
 
-    smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 0), 0x50,
+    smbus_eeprom_init_one(OBJECT(bmc), aspeed_i2c_get_bus(&soc->i2c, 0), 0x50,
                           eeprom_buf);
 
     /* add a TMP423 temperature sensor */
diff --git a/hw/arm/aspeed_ast2500_witherspoon.c b/hw/arm/aspeed_ast2500_witherspoon.c
index cb57cb421a..dda090ab60 100644
--- a/hw/arm/aspeed_ast2500_witherspoon.c
+++ b/hw/arm/aspeed_ast2500_witherspoon.c
@@ -73,7 +73,7 @@ static void witherspoon_bmc_i2c_init(AspeedMachineState *bmc)
      */
     i2c_slave_create_simple_orphan(aspeed_i2c_get_bus(&soc->i2c, 11), "ds1338", 0x32);
 
-    smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 11), 0x51,
+    smbus_eeprom_init_one(OBJECT(bmc), aspeed_i2c_get_bus(&soc->i2c, 11), 0x51,
                           eeprom_buf);
     dev = DEVICE(i2c_slave_new_orphan(TYPE_PCA9552, 0x60));
     qdev_prop_set_string(dev, "description", "pca0");
diff --git a/hw/arm/aspeed_ast2600_evb.c b/hw/arm/aspeed_ast2600_evb.c
index cf1e2b006c..ab7667da75 100644
--- a/hw/arm/aspeed_ast2600_evb.c
+++ b/hw/arm/aspeed_ast2600_evb.c
@@ -23,7 +23,7 @@ static void ast2600_evb_i2c_init(AspeedMachineState *bmc)
     AspeedSoCState *soc = bmc->soc;
     uint8_t *eeprom_buf = g_malloc0(8 * 1024);
 
-    smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 7), 0x50,
+    smbus_eeprom_init_one(OBJECT(bmc), aspeed_i2c_get_bus(&soc->i2c, 7), 0x50,
                           eeprom_buf);
 
     /* LM75 is compatible with TMP105 driver */
diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
index ac09e5f706..c58ecea011 100644
--- a/hw/i2c/aspeed_i2c.c
+++ b/hw/i2c/aspeed_i2c.c
@@ -1518,8 +1518,8 @@ static void aspeed_i2c_bus_realize(DeviceState *dev, Error **errp)
     sysbus_init_irq(SYS_BUS_DEVICE(dev), &s->irq);
 
     s->bus = i2c_init_bus(dev, s->name);
-    s->slave = i2c_slave_create_simple_orphan(s->bus, TYPE_ASPEED_I2C_BUS_SLAVE,
-                                       0xff);
+    s->slave = i2c_slave_create_simple(OBJECT(s), "slave", s->bus,
+                                       TYPE_ASPEED_I2C_BUS_SLAVE, 0xff);
 
     memory_region_init_io(&s->mr, OBJECT(s), &aspeed_i2c_bus_ops,
                           s, s->name, aic->reg_size);
diff --git a/hw/i2c/smbus_eeprom.c b/hw/i2c/smbus_eeprom.c
index 59fe07b16b..aaf90a10da 100644
--- a/hw/i2c/smbus_eeprom.c
+++ b/hw/i2c/smbus_eeprom.c
@@ -160,18 +160,19 @@ static const TypeInfo smbus_eeprom_types[] = {
 
 DEFINE_TYPES(smbus_eeprom_types)
 
-void smbus_eeprom_init_one(I2CBus *smbus, uint8_t address, uint8_t *eeprom_buf)
+void smbus_eeprom_init_one(Object *parent, I2CBus *smbus, uint8_t address,
+                           uint8_t *eeprom_buf)
 {
     DeviceState *dev;
 
-    dev = qdev_new_orphan(TYPE_SMBUS_EEPROM);
+    dev = qdev_new(parent, "eeprom[*]", TYPE_SMBUS_EEPROM);
     qdev_prop_set_uint8(dev, "address", address);
     /* FIXME: use an array of byte or block backend property? */
     SMBUS_EEPROM(dev)->init_data = eeprom_buf;
-    qdev_realize_and_unref(dev, (BusState *)smbus, &error_fatal);
+    qdev_realize(dev, (BusState *)smbus, &error_fatal);
 }
 
-void smbus_eeprom_init(I2CBus *smbus, int nb_eeprom,
+void smbus_eeprom_init(Object *parent, I2CBus *smbus, int nb_eeprom,
                        const uint8_t *eeprom_spd, int eeprom_spd_size)
 {
     int i;
@@ -184,7 +185,7 @@ void smbus_eeprom_init(I2CBus *smbus, int nb_eeprom,
     }
 
     for (i = 0; i < nb_eeprom; i++) {
-        smbus_eeprom_init_one(smbus, 0x50 + i,
+        smbus_eeprom_init_one(parent, smbus, 0x50 + i,
                               eeprom_buf + (i * SMBUS_EEPROM_SIZE));
     }
 }
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 3f361c8396..44ce592ea2 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -304,7 +304,7 @@ static void pc_init1(MachineState *machine, const char *pci_type)
         qdev_connect_gpio_out_named(DEVICE(piix4_pm), "smi-irq", 0, smi_irq);
         pcms->smbus = I2C_BUS(qdev_get_child_bus(DEVICE(piix4_pm), "i2c"));
         /* TODO: Populate SPD eeprom data.  */
-        smbus_eeprom_init(pcms->smbus, 8, NULL, 0);
+        smbus_eeprom_init(OBJECT(machine), pcms->smbus, 8, NULL, 0);
 
         object_property_add_link(OBJECT(machine), PC_MACHINE_ACPI_DEVICE_PROP,
                                  TYPE_HOTPLUG_HANDLER,
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index a4a7169398..bfea390825 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -317,7 +317,7 @@ static void pc_q35_init(MachineState *machine)
                                               TYPE_ICH9_SMB_DEVICE);
         pcms->smbus = I2C_BUS(qdev_get_child_bus(DEVICE(smb), "i2c"));
 
-        smbus_eeprom_init(pcms->smbus, 8, NULL, 0);
+        smbus_eeprom_init(OBJECT(machine), pcms->smbus, 8, NULL, 0);
     }
 
     /* the rest devices to which pci devfn is automatically assigned */
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index 5e5ade46f3..0046423d40 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -322,7 +322,7 @@ static void mips_fuloong2e_init(MachineState *machine)
 
     /* Populate SPD eeprom data */
     spd_data = spd_data_generate(DDR, machine->ram_size);
-    smbus_eeprom_init_one(smbus, 0x50, spd_data);
+    smbus_eeprom_init_one(OBJECT(machine), smbus, 0x50, spd_data);
 
     /* Network card: RTL8139D */
     network_init(pci_bus);
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index da6dd15a59..52aae144da 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1249,7 +1249,7 @@ void mips_malta_init(MachineState *machine)
     smbus = I2C_BUS(qdev_get_child_bus(dev, "i2c"));
     generate_eeprom_spd(&smbus_eeprom_buf[0 * 256], ram_size);
     generate_eeprom_serial(&smbus_eeprom_buf[6 * 256]);
-    smbus_eeprom_init(smbus, 8, smbus_eeprom_buf, smbus_eeprom_size);
+    smbus_eeprom_init(OBJECT(machine), smbus, 8, smbus_eeprom_buf, smbus_eeprom_size);
     g_free(smbus_eeprom_buf);
 
     /* Super I/O: SMS FDC37M817 */
diff --git a/hw/ppc/amigaone.c b/hw/ppc/amigaone.c
index 80802d42c6..866e5547d6 100644
--- a/hw/ppc/amigaone.c
+++ b/hw/ppc/amigaone.c
@@ -338,9 +338,9 @@ static void amigaone_init(MachineState *machine)
         spd_data = spd_data_generate(SDR, machine->ram_size);
     }
     fix_spd_data(spd_data);
-    smbus_eeprom_init_one(i2c_bus, 0x51, spd_data);
+    smbus_eeprom_init_one(OBJECT(machine), i2c_bus, 0x51, spd_data);
     if (machine->ram_size > 512 * MiB) {
-        smbus_eeprom_init_one(i2c_bus, 0x52, spd_data);
+        smbus_eeprom_init_one(OBJECT(machine), i2c_bus, 0x52, spd_data);
     }
 
     pci_mem = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 1);
diff --git a/hw/ppc/pegasos.c b/hw/ppc/pegasos.c
index bba73f60c8..2974625f1c 100644
--- a/hw/ppc/pegasos.c
+++ b/hw/ppc/pegasos.c
@@ -261,7 +261,7 @@ static void pegasos_init(MachineState *machine)
     dev = PCI_DEVICE(object_resolve_path_component(via, "pm"));
     i2c_bus = I2C_BUS(qdev_get_child_bus(DEVICE(dev), "i2c"));
     spd_data = spd_data_generate(DDR, machine->ram_size);
-    smbus_eeprom_init_one(i2c_bus, 0x57, spd_data);
+    smbus_eeprom_init_one(OBJECT(machine), i2c_bus, 0x57, spd_data);
 
     /* other PC hardware */
     pci_vga_init(pci_bus);
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index d23d2c2bd8..8623848633 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -343,7 +343,7 @@ static void sam460ex_init(MachineState *machine)
     spd_data = spd_data_generate(machine->ram_size < 128 * MiB ? DDR : DDR2,
                                  machine->ram_size);
     spd_data[20] = 4; /* SO-DIMM module */
-    smbus_eeprom_init_one(i2c, 0x50, spd_data);
+    smbus_eeprom_init_one(OBJECT(machine), i2c, 0x50, spd_data);
     /* RTC */
     i2c_slave_create_simple_orphan(i2c, "m41t80", 0x68);
 
diff --git a/include/hw/i2c/smbus_eeprom.h b/include/hw/i2c/smbus_eeprom.h
index 61a54cda76..f3aefada42 100644
--- a/include/hw/i2c/smbus_eeprom.h
+++ b/include/hw/i2c/smbus_eeprom.h
@@ -26,8 +26,9 @@
 #include "system/ram_addr.h"
 #include "hw/i2c/i2c.h"
 
-void smbus_eeprom_init_one(I2CBus *bus, uint8_t address, uint8_t *eeprom_buf);
-void smbus_eeprom_init(I2CBus *bus, int nb_eeprom,
+void smbus_eeprom_init_one(Object *parent, I2CBus *bus, uint8_t address,
+                           uint8_t *eeprom_buf);
+void smbus_eeprom_init(Object *parent, I2CBus *bus, int nb_eeprom,
                        const uint8_t *eeprom_spd, int size);
 
 enum sdram_type { SDR = 0x4, DDR = 0x7, DDR2 = 0x8 };
-- 
2.47.1



  parent reply	other threads:[~2026-07-11 22:49 UTC|newest]

Thread overview: 156+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-11 22:34 [RFC PATCH 000/134] qom: Make composition-tree parenting mandatory Alexander Graf
2026-07-11 22:34 ` [RFC PATCH 001/134] qom: Introduce object_new_child() Alexander Graf
2026-07-13  8:47   ` Daniel P. Berrangé
2026-07-13  9:01     ` Graf (AWS), Alexander
2026-07-13 16:49   ` Richard Henderson
2026-07-13 18:15     ` Peter Maydell
2026-07-13 18:47       ` Daniel P. Berrangé
2026-07-13 19:07         ` Peter Maydell
2026-07-11 22:34 ` [RFC PATCH 002/134] qdev: Rename qdev_new()/qdev_try_new() to *_orphan() Alexander Graf
2026-07-13  8:22   ` Philippe Mathieu-Daudé
2026-07-11 22:34 ` [RFC PATCH 003/134] qdev: Reintroduce qdev_new() with a mandatory QOM parent Alexander Graf
2026-07-13 10:55   ` Philippe Mathieu-Daudé
2026-07-11 22:34 ` [RFC PATCH 004/134] sysbus: Make sysbus_create_simple()/_varargs() take a " Alexander Graf
2026-07-13 10:54   ` Philippe Mathieu-Daudé
2026-07-11 22:34 ` [RFC PATCH 005/134] pci: Make pci_new*()/pci_create_simple*() " Alexander Graf
2026-07-11 22:34 ` [RFC PATCH 006/134] isa: Make isa_new()/isa_try_new()/isa_create_simple() " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 007/134] i2c: Make i2c_slave_new()/i2c_slave_create_simple() " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 008/134] ssi, usb: Make bus-layer creators " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 009/134] cpu: Make cpu_create() " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 010/134] hw/avr: Give onboard devices " Alexander Graf
2026-07-13  8:25   ` Philippe Mathieu-Daudé
2026-07-11 22:35 ` [RFC PATCH 011/134] hw/tricore: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 012/134] hw/xtensa: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 013/134] hw/alpha: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 014/134] hw/nitro: " Alexander Graf
2026-07-13  8:29   ` Philippe Mathieu-Daudé
2026-07-11 22:35 ` [RFC PATCH 015/134] hw/vmapple: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 016/134] hw/hppa: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 017/134] hw/microblaze: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 018/134] hw/sh4: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 019/134] hw/s390x: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 020/134] hw/or1k: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 021/134] hw/loongarch: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 022/134] hw/intc: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 023/134] hw/pci-host: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 024/134] hw/core: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 025/134] hw/remote: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 026/134] hw/ufs: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 027/134] hw/nvme: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 028/134] hw/vfio: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 029/134] hw/mem: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 030/134] hw/cxl: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 031/134] hw/hexagon: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 032/134] hw/xen: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 033/134] hw/display: " Alexander Graf
2026-07-13  8:32   ` Philippe Mathieu-Daudé
2026-07-11 22:35 ` [RFC PATCH 034/134] hw/nvram: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 035/134] hw/dma: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 036/134] hw/misc: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 037/134] hw/scsi: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 038/134] hw/net: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 039/134] hw/ide: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 040/134] hw/i3c: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 041/134] hw/pci-bridge: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 042/134] hw/sparc64: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 043/134] hw/sparc: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 044/134] hw/m68k: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 045/134] hw/rtc: " Alexander Graf
2026-07-11 22:35 ` Alexander Graf [this message]
2026-07-11 22:35 ` [RFC PATCH 047/134] hw/block: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 048/134] hw/char: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 049/134] hw/isa: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 050/134] hw/pci: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 051/134] hw/riscv: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 052/134] hw/mips: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 053/134] hw/i386: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 054/134] hw/ppc: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 055/134] hw/pci, hw/isa: Give VGA and slot-NIC helpers " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 056/134] hw/arm/virt: Give onboard devices " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 057/134] hw/arm/sbsa-ref: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 058/134] hw/arm/xilinx-zynq: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 059/134] hw/arm/xlnx-versal, xlnx-zynqmp: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 060/134] hw/arm/realview, integratorcp: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 061/134] hw/arm/npcm: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 062/134] hw/arm/versatile, vexpress: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 063/134] hw/arm/stellaris, musicpal: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 064/134] hw/arm/exynos: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 065/134] hw/arm/allwinner: " Alexander Graf
2026-07-11 22:35 ` [RFC PATCH 066/134] hw/arm/strongarm: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 067/134] hw/arm/omap: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 068/134] hw/arm/mps2: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 069/134] hw/arm/imx: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 070/134] hw/arm/misc: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 071/134] hw/arm/aspeed: Give onboard devices a QOM parent (part 1) Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 072/134] hw/arm/aspeed: Give onboard devices a QOM parent (part 2) Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 073/134] hw/nvram/at24c: Give at24c_eeprom_init() a QOM parent Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 074/134] hw/i386/pc: Give pcspk " Alexander Graf
2026-07-13  8:34   ` Philippe Mathieu-Daudé
2026-07-11 22:36 ` [RFC PATCH 075/134] hw/timer, hw/net: Give i8254 and isa-ne2000 helpers " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 076/134] hw/misc/unimp: Give create_unimplemented_device() " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 077/134] hw/usb: Give -usbdevice and auto-hub devices " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 078/134] hw/audio: Give -audio model= " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 079/134] hw/xen: Give xenstore-driven backend " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 080/134] hw/nitro: Give the vsock bridge " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 081/134] hw/isa: Give the isabus-bridge " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 082/134] net, target/mips: Give -nic and CPU-with-clock helpers " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 083/134] usb, ssi, i2c: Remove *_orphan() creator variants Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 084/134] isa: " Alexander Graf
2026-07-13  8:35   ` Philippe Mathieu-Daudé
2026-07-11 22:36 ` [RFC PATCH 085/134] pci: " Alexander Graf
2026-07-13  8:36   ` Philippe Mathieu-Daudé
2026-07-11 22:36 ` [RFC PATCH 086/134] cpu: Remove cpu_create_orphan() Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 087/134] sysbus: Remove *_orphan() creator variants Alexander Graf
2026-07-13  8:36   ` Philippe Mathieu-Daudé
2026-07-11 22:36 ` [RFC PATCH 088/134] qdev: Remove qdev_new_orphan() and qdev_try_new_orphan() Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 089/134] memory: Accept non-device owners in memory_region_init_ram() Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 090/134] hw/misc-boards: Give memory regions an explicit owner Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 091/134] hw/mips: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 092/134] hw/riscv: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 093/134] hw/i386: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 094/134] hw/arm: " Alexander Graf
2026-07-12 15:12   ` Bernhard Beschow
2026-07-11 22:36 ` [RFC PATCH 095/134] hw/arm/omap1: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 096/134] hw/sh4: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 097/134] hw/m68k: " Alexander Graf
2026-07-12 14:20   ` Thomas Huth
2026-07-11 22:36 ` [RFC PATCH 098/134] hw/ppc: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 099/134] hw/tricore: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 100/134] hw/xtensa: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 101/134] hw/display: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 102/134] hw/arm/omap: Give lcdc and dma " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 103/134] hw/char: Give parallel and htif " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 104/134] hw/remote: Give " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 105/134] system, backends: Give named " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 106/134] hw/ide: Let ide_init_ioport() take " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 107/134] memory: Require an owner for named memory regions Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 108/134] irq: Rename qemu_allocate_irq*() and friends to *_orphan() Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 109/134] irq: Reintroduce qemu_allocate_irq*() with a mandatory owner and name Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 110/134] hw/pci, hw/usb, system: Give allocated IRQs an " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 111/134] hw/i386, hw/xen: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 112/134] hw/arm: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 113/134] hw/xtensa: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 114/134] hw: " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 115/134] hw/core: Parent GPIO input IRQs and embedded IRQState via QOM Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 116/134] irq: Delete the *_orphan() IRQ allocation variants Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 117/134] sysbus: Parent main-system-bus directly under /machine Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 118/134] accel: Parent the accelerator singleton " Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 119/134] hw/core/reset: Give the root reset container and legacy shims a QOM path Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 120/134] system: Parent per-MR helper objects under their owner Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 121/134] hw/virtio, hw/display: Parent per-device helper objects Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 122/134] hw/i386/amd_iommu: Parent internally-created AMDVI-PCI under the IOMMU Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 123/134] hw/s390x, hw/remote: Parent per-devfn IOMMU objects Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 124/134] hw/pci-host/raven: Parent the OR-IRQ under the host bridge Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 125/134] hw/arm/mps2: Parent the OR-IRQ gates under the machine Alexander Graf
2026-07-11 22:36 ` [RFC PATCH 126/134] hw/arm/digic: Parent the DIGIC SoC " Alexander Graf
2026-07-11 22:37 ` [RFC PATCH 127/134] hw/microblaze: Parent the CPU " Alexander Graf
2026-07-11 22:37 ` [RFC PATCH 128/134] hw: Pair object_initialize_child() with plain realize() Alexander Graf
2026-07-11 22:37 ` [RFC PATCH 129/134] hw: Parent board-created CPUs under the machine Alexander Graf
2026-07-13 16:35   ` Bernhard Beschow
2026-07-13 20:01   ` Brian Cain
2026-07-11 22:37 ` [RFC PATCH 130/134] hw/pci-host/versatile: Use object_initialize_child() for pci_dev Alexander Graf
2026-07-11 22:37 ` [RFC PATCH 131/134] docs, qapi, scripts, iotests: Update /machine/unattached path references Alexander Graf
2026-07-11 22:37 ` [RFC PATCH 132/134] qom: Delete /machine/unattached and error on unparented realize Alexander Graf
2026-07-11 22:37 ` [RFC PATCH 133/134] docs/devel/qom: Document the composition-tree parenting contract Alexander Graf
2026-07-11 22:37 ` [RFC PATCH 134/134] MAINTAINERS: Add scripts/coccinelle/qom-parent/ under QOM Alexander Graf
2026-07-12 10:56 ` [RFC PATCH 000/134] qom: Make composition-tree parenting mandatory Bernhard Beschow

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=20260711223707.42139-47-graf@amazon.com \
    --to=graf@amazon.com \
    --cc=17746591750@163.com \
    --cc=adityag@linux.ibm.com \
    --cc=aik@ozlabs.ru \
    --cc=alifm@linux.ibm.com \
    --cc=alistair.francis@wdc.com \
    --cc=alistair@alistair23.me \
    --cc=antonynpavlov@gmail.com \
    --cc=armbru@redhat.com \
    --cc=atar4qemu@gmail.com \
    --cc=balaton@eik.bme.hu \
    --cc=balbi@kernel.org \
    --cc=berrange@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=brian.cain@oss.qualcomm.com \
    --cc=brueckner@linux.ibm.com \
    --cc=chao.liu@processmission.com \
    --cc=chenhuacai@kernel.org \
    --cc=chigot@adacore.com \
    --cc=clg@kaod.org \
    --cc=deller@gmx.de \
    --cc=dorjoychy111@gmail.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=erdnaxe@crans.org \
    --cc=farman@linux.ibm.com \
    --cc=francisco.iglesias@amd.com \
    --cc=gaurav.sharma_7@nxp.com \
    --cc=ggala@linux.ibm.com \
    --cc=harshpb@linux.ibm.com \
    --cc=hpoussin@reactos.org \
    --cc=jan.kiszka@web.de \
    --cc=jcmvbkbc@gmail.com \
    --cc=joel@jms.id.au \
    --cc=jrossi@linux.ibm.com \
    --cc=kfting@nuvoton.com \
    --cc=konrad.frederic@yahoo.fr \
    --cc=laurent@vivier.eu \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=maobibo@loongson.cn \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=milesg@linux.ibm.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=mrolnik@gmail.com \
    --cc=mst@redhat.com \
    --cc=nieklinnenbank@gmail.com \
    --cc=npiggin@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@mailo.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sai.pavan.boddu@amd.com \
    --cc=sam@rfc1149.net \
    --cc=shentey@gmail.com \
    --cc=shorne@gmail.com \
    --cc=slp@redhat.com \
    --cc=sundeep.lkml@gmail.com \
    --cc=th.huth+qemu@posteo.eu \
    --cc=wangran@bosc.ac.cn \
    --cc=wuhaotsh@google.com \
    /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.