dimm: add hotplug callback to DimmBus

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
acpi: factor out common pm_update_sci() into acpi core

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
acpi/piix4: introduce memory hot-plug interface QEMU<->ACPI BIOS

- implements QEMU part of memory hotplug protocol described at
  docs/specs/acpi_mem_hotplug.txt
- handles memory add notification event.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
pc: piix: make PCII440FXState type public

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
pc: piix: add memory hotplug to 440fx machine

Add 2 DimmBus-es, one for memory hotplug below 4Gb and
second above 4Gb.

* if ram_size is less tha 32-bit PCI hole start, reserve
  hotplug memory region as [ram_size,32bit-PCIhole-start)
  and for the rest of hotplug memory reserve hotplug
  memory region above "0x100000000ULL + above_4g_mem_size"

* setup memory hotplug callback to use PIIX4_PM as hotplug
  notification device

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 v2:
    * disable memory hotplug for old machine types
ich9/acpi: allow guest to clear SCI rised by GPE

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
acpi/ich9 mem hp add

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
pc: q35: mem hp add

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
pc: ACPI BIOS: implement memory hotplug interface

- provides static DSDT object for memory hotplug
- SSDT template for memory devices and runtime generator
  of them in SSDT table.

Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
pc: ACPI BIOS: use enum for defining memory affinity flags

replace magic numbers with enum describing Flags field of
memory affinity in SRAT table.

MemoryAffinityFlags enum will define flags decribed by:
 ACPI spec 5.0, "5.2.16.2 Memory Affinity Structure",
 "Table 5-69 Flags - Memory Affinity Structure"

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
pc: ACPI BIOS: reserve SRAT entry for hotplug mem hole

Needed for Windows to use hotplugged memory device, otherwise
it complains that server is not configured for memory hotplug.
Tests shows that aftewards it uses dynamically provided
proximity value from _PXM() method if available.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
pc: ACPI BIOS: add ssdt-mem.hex.generated

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
pc: ACPI BIOS: make GPE.3 handle memory hotplug event on PIIX and Q35 machines

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
pc: ACPI BIOS: update acpi-dsdt.hex.generated & q35-acpi-dsdt.hex.generated

Signed-off-by: Igor Mammedov <imammedo@redhat.com>