[PATCH v3 19/29] hw/arm/virt: Pass the bus on the ged creation

Eric Auger posted 29 patches 5 months ago
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <anisinha@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Shannon Zhao <shannon.zhaosl@gmail.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Richard Henderson <richard.henderson@linaro.org>
There is a newer version of this series
[PATCH v3 19/29] hw/arm/virt: Pass the bus on the ged creation
Posted by Eric Auger 5 months ago
The bus will be needed on ged realize for acpi pci hp setup.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
 hw/arm/virt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 08bd808499..2f34877716 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -696,6 +696,7 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms)
 
     dev = qdev_new(TYPE_ACPI_GED);
     qdev_prop_set_uint32(dev, "ged-event", event);
+    object_property_set_link(OBJECT(dev), "bus", OBJECT(vms->bus), &error_abort);
     sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
 
     sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, vms->memmap[VIRT_ACPI_GED].base);
-- 
2.49.0
Re: [PATCH v3 19/29] hw/arm/virt: Pass the bus on the ged creation
Posted by Jonathan Cameron via 4 months, 4 weeks ago
On Mon, 16 Jun 2025 11:46:48 +0200
Eric Auger <eric.auger@redhat.com> wrote:

> The bus will be needed on ged realize for acpi pci hp setup.
> 
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
I guess doing this in separate patches for previous and this one
maybe makes it easier to backport the previous if someone just wants
to enable this on a different arch.  Otherwise I'd have smashed them
together.

Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
> ---
>  hw/arm/virt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 08bd808499..2f34877716 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -696,6 +696,7 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms)
>  
>      dev = qdev_new(TYPE_ACPI_GED);
>      qdev_prop_set_uint32(dev, "ged-event", event);
> +    object_property_set_link(OBJECT(dev), "bus", OBJECT(vms->bus), &error_abort);
>      sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>  
>      sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, vms->memmap[VIRT_ACPI_GED].base);
Re: [PATCH v3 19/29] hw/arm/virt: Pass the bus on the ged creation
Posted by Eric Auger 4 months, 3 weeks ago
Hi Jonathan,

On 6/20/25 11:38 AM, Jonathan Cameron wrote:
> On Mon, 16 Jun 2025 11:46:48 +0200
> Eric Auger <eric.auger@redhat.com> wrote:
>
>> The bus will be needed on ged realize for acpi pci hp setup.
>>
>> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> I guess doing this in separate patches for previous and this one
> maybe makes it easier to backport the previous if someone just wants
> to enable this on a different arch.  Otherwise I'd have smashed them
> together.

for me it is also a matter of maintainership/reviewer role separataion,
virt and ged being maintained/reviewed by different people. So if you
don't mind, I will keep it separate all the more so I collected R-b's on
each ;-)

Eric
>
> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
>> ---
>>  hw/arm/virt.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>> index 08bd808499..2f34877716 100644
>> --- a/hw/arm/virt.c
>> +++ b/hw/arm/virt.c
>> @@ -696,6 +696,7 @@ static inline DeviceState *create_acpi_ged(VirtMachineState *vms)
>>  
>>      dev = qdev_new(TYPE_ACPI_GED);
>>      qdev_prop_set_uint32(dev, "ged-event", event);
>> +    object_property_set_link(OBJECT(dev), "bus", OBJECT(vms->bus), &error_abort);
>>      sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
>>  
>>      sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, vms->memmap[VIRT_ACPI_GED].base);