[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Purpose of QOM properties registered at realize time?
From: |
Eduardo Habkost |
Subject: |
Purpose of QOM properties registered at realize time? |
Date: |
Tue, 6 Oct 2020 18:06:47 -0400 |
Hi,
While trying to understand how QOM properties are used in QEMU, I
stumbled upon multiple cases where alias properties are added at
realize time.
Now, I don't understand why those properties exist. As the
properties are added at realize time, I assume they aren't
supposed to be touched by the user at all. If they are not
supposed to be touched by the user, what exactly is the purpose
of those QOM properties?
For reference, these are the cases I've found:
$ git grep -nwpE
'object_property_add_alias|qdev_pass_gpios|qdev_alias_all_properties' | grep
-A1 realize
hw/arm/allwinner-a10.c=71=static void aw_a10_realize(DeviceState *dev, Error
**errp)
hw/arm/allwinner-a10.c:89: qdev_pass_gpios(DEVICE(&s->intc), dev, NULL);
--
hw/arm/allwinner-h3.c=232=static void allwinner_h3_realize(DeviceState *dev,
Error **errp)
hw/arm/allwinner-h3.c:359: object_property_add_alias(OBJECT(s), "sd-bus",
OBJECT(&s->mmc0),
--
hw/arm/armsse.c=429=static void armsse_realize(DeviceState *dev, Error **errp)
hw/arm/armsse.c:1092: qdev_pass_gpios(dev_secctl, dev, "mscexp_status");
--
hw/arm/armv7m.c=149=static void armv7m_realize(DeviceState *dev, Error **errp)
hw/arm/armv7m.c:219: qdev_pass_gpios(DEVICE(&s->nvic), dev, NULL);
--
hw/arm/bcm2835_peripherals.c=128=static void
bcm2835_peripherals_realize(DeviceState *dev, Error **errp)
hw/arm/bcm2835_peripherals.c:322: object_property_add_alias(OBJECT(s),
"sd-bus", OBJECT(&s->gpio), "sd-bus");
--
hw/arm/bcm2836.c=69=static void bcm2836_realize(DeviceState *dev, Error **errp)
hw/arm/bcm2836.c:87: object_property_add_alias(OBJECT(s), "sd-bus",
OBJECT(&s->peripherals),
hw/arm/msf2-soc.c=79=static void m2sxxx_soc_realize(DeviceState *dev_soc, Error
**errp)
hw/arm/msf2-soc.c:170: object_property_add_alias(OBJECT(s), bus_name,
--
hw/arm/nrf51_soc.c=58=static void nrf51_soc_realize(DeviceState *dev_soc, Error
**errp)
hw/arm/nrf51_soc.c:138: qdev_pass_gpios(DEVICE(&s->gpio), dev_soc, NULL);
--
hw/arm/xlnx-zynqmp.c=276=static void xlnx_zynqmp_realize(DeviceState *dev,
Error **errp)
hw/arm/xlnx-zynqmp.c:522: object_property_add_alias(OBJECT(s), bus_name,
sdhci, "sd-bus");
--
hw/misc/mac_via.c=1011=static void mac_via_realize(DeviceState *dev, Error
**errp)
hw/misc/mac_via.c:1028: object_property_add_alias(OBJECT(dev), "irq[0]",
OBJECT(ms),
--
hw/ppc/spapr_drc.c=511=static void realize(DeviceState *d, Error **errp)
hw/ppc/spapr_drc.c:530: object_property_add_alias(root_container, link_name,
hw/riscv/sifive_e.c=186=static void sifive_e_soc_realize(DeviceState *dev,
Error **errp)
hw/riscv/sifive_e.c:233: qdev_pass_gpios(DEVICE(&s->gpio), dev, NULL);
hw/riscv/sifive_u.c=651=static void sifive_u_soc_realize(DeviceState *dev,
Error **errp)
hw/riscv/sifive_u.c:743: qdev_pass_gpios(DEVICE(&s->gpio), dev, NULL);
--
Eduardo
- Purpose of QOM properties registered at realize time?,
Eduardo Habkost <=
- Re: Purpose of QOM properties registered at realize time?, BALATON Zoltan, 2020/10/07
- Re: Purpose of QOM properties registered at realize time?, Paolo Bonzini, 2020/10/07
- Re: Purpose of QOM properties registered at realize time?, Eduardo Habkost, 2020/10/07
- Re: Purpose of QOM properties registered at realize time?, Paolo Bonzini, 2020/10/07
- Re: Purpose of QOM properties registered at realize time?, Eduardo Habkost, 2020/10/07
- Re: Purpose of QOM properties registered at realize time?, Paolo Bonzini, 2020/10/07
- Re: Purpose of QOM properties registered at realize time?, Eduardo Habkost, 2020/10/07
- Re: Purpose of QOM properties registered at realize time?, Peter Maydell, 2020/10/07
Re: Purpose of QOM properties registered at realize time?, Peter Maydell, 2020/10/07