acpi: piix4/ich9: add optional vmstate field for MemHotplugState migration

it should not be present for machine versions that do not support
memory hotplug.

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

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

Add DimmBus for memory hotplug below 4Gb or above 4Gb depending
on initial memory size and hotplug memory size.

* if ram_size is less than 32-bit PCI hole start, reserve
  hotplug memory region as [ram_size,32bit-PCIhole-start)
  if hotplug memory region fits there,
  otherwise reserve hotplug memory region after "0x100000000ULL
  + above_4g_mem_size"

* setup memory hotplug callback to pass event to ACPI hadware.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
pc: add memory hotplug Q35 machine

Add DimmBus to q35 machine, initialize memory hotplug window and plumb
in ACPI callback (ich9_pm) for communicating hotplug event to guest.

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

- provides static SSDT 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>
---
mst/pci tree specific change:
   acpi-build: s/build_append_notify/build_append_notify_method/
introduced by "acpi-build: enable hotplug for PCI bridges"
should be moved to separate patch since it's generic internal API rename.
pc: ACPI BIOS: add ssdt-mem.hex.generated and update ssdt-misc.hex.generated

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: make GPE.3 handle memory hotplug event on PIIX and Q35 machines

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