[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH-for-4.2 v8 3/9] hw/acpi: Add ACPI Generic Event
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH-for-4.2 v8 3/9] hw/acpi: Add ACPI Generic Event Device Support |
Date: |
Tue, 30 Jul 2019 17:25:24 +0200 |
On Fri, 26 Jul 2019 11:45:13 +0100
Shameer Kolothum <address@hidden> wrote:
> From: Samuel Ortiz <address@hidden>
>
> The ACPI Generic Event Device (GED) is a hardware-reduced specific
> device[ACPI v6.1 Section 5.6.9] that handles all platform events,
> including the hotplug ones. This patch generates the AML code that
> defines GEDs.
>
> Platforms need to specify their own GED Event bitmap to describe
> what kind of events they want to support through GED. Also this
> uses a a single interrupt for the GED device, relying on IO
> memory region to communicate the type of device affected by the
> interrupt. This way, we can support up to 32 events with a unique
> interrupt.
>
> This supports only memory hotplug for now.
>
> diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
> new file mode 100644
> index 0000000000..7902e9d706
> --- /dev/null
> +++ b/hw/acpi/generic_event_device.c
[...]
> +void build_ged_aml(Aml *table, const char *name, HotplugHandler *hotplug_dev,
> + uint32_t ged_irq, AmlRegionSpace rs)
> +{
[...]
> +
> + if (ged_events) {
> + error_report("GED: Unsupported events specified");
> + exit(1);
I'd use error_abort instead, since it's programing error, if you have to respin
series.
> + }
> + }
> +
> + /* Append _EVT method */
> + aml_append(dev, evt);
> +
> + aml_append(table, dev);
> +}
> +
[...]
> +static void acpi_ged_device_realize(DeviceState *dev, Error **errp)
> +{
> + AcpiGedState *s = ACPI_GED(dev);
> +
> + assert(s->ged_base);
> + acpi_ged_init(get_system_memory(), dev, &s->ged_state);
calling get_system_memory() from device code used to be a reason for rejecting
patch,
I'm not sure what suggest though.
Maybe Paolo could suggest something.
> +
> + if (s->memhp_state.is_enabled) {
> + assert(s->memhp_base);
> + acpi_memory_hotplug_init(get_system_memory(), OBJECT(dev),
^^^^
ditto
> + &s->memhp_state,
> + s->memhp_base);
> + }
> +}
[...]
> +
> +#endif
- [Qemu-devel] [PATCH-for-4.2 v8 0/9] ARM virt: ACPI memory hotplug support, Shameer Kolothum, 2019/07/26
- [Qemu-devel] [PATCH-for-4.2 v8 1/9] hw/acpi: Make ACPI IO address space configurable, Shameer Kolothum, 2019/07/26
- [Qemu-devel] [PATCH-for-4.2 v8 3/9] hw/acpi: Add ACPI Generic Event Device Support, Shameer Kolothum, 2019/07/26
- Re: [Qemu-devel] [PATCH-for-4.2 v8 3/9] hw/acpi: Add ACPI Generic Event Device Support,
Igor Mammedov <=
- [Qemu-devel] [PATCH-for-4.2 v8 2/9] hw/acpi: Do not create memory hotplug method when handler is not defined, Shameer Kolothum, 2019/07/26
- [Qemu-devel] [PATCH-for-4.2 v8 5/9] hw/arm/virt: Add 4.2 machine type, Shameer Kolothum, 2019/07/26
- [Qemu-devel] [PATCH-for-4.2 v8 4/9] hw/arm/virt: Add memory hotplug framework, Shameer Kolothum, 2019/07/26
- [Qemu-devel] [PATCH-for-4.2 v8 6/9] hw/arm/virt: Enable device memory cold/hot plug with ACPI boot, Shameer Kolothum, 2019/07/26
- [Qemu-devel] [PATCH-for-4.2 v8 7/9] hw/arm/virt-acpi-build: Add PC-DIMM in SRAT, Shameer Kolothum, 2019/07/26
- [Qemu-devel] [PATCH-for-4.2 v8 8/9] hw/acpi: Add system power down support to GED, Shameer Kolothum, 2019/07/26
- [Qemu-devel] [PATCH-for-4.2 v8 9/9] hw/arm: Use GED for system_powerdown event, Shameer Kolothum, 2019/07/26