[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/27] acpi: piix4: add memory-hotplug-io-base prope
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 15/27] acpi: piix4: add memory-hotplug-io-base property to piix4_pm |
Date: |
Thu, 21 Nov 2013 03:38:36 +0100 |
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/acpi/piix4.c | 14 +++++++++++++-
include/hw/acpi/acpi.h | 2 ++
2 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index e0d9270..a835981 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -18,6 +18,7 @@
* Contributions after 2012-01-13 are licensed under the terms of the
* GNU GPL, version 2 or (at your option) any later version.
*/
+#include "qapi/visitor.h"
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/isa/apm.h"
@@ -757,6 +758,14 @@ int piix4_mem_hotplug(DeviceState *hotplug_dev,
DeviceState *dev,
static int piix4_device_hotplug(DeviceState *qdev, DeviceState *dev,
HotplugState state);
+static void piix4_get_mem_io_base(Object *obj, Visitor *v, void *opaque,
+ const char *name, Error **errp)
+{
+ PIIX4PMState *s = PIIX4_PM(obj);
+
+ visit_type_uint16(v, &s->gpe_mem.port, name, errp);
+}
+
static void piix4_acpi_system_hot_add_init(MemoryRegion *parent,
PCIBus *bus, PIIX4PMState *s)
{
@@ -789,8 +798,11 @@ static void piix4_acpi_system_hot_add_init(MemoryRegion
*parent,
s->cpu_added_notifier.notify = piix4_cpu_added_req;
qemu_register_cpu_added_notifier(&s->cpu_added_notifier);
+ s->gpe_mem.port = ACPI_MEMORY_HOTPLUG_BASE;
+ object_property_add(OBJECT(s), ACPI_MEMORY_HOTPLUG_IO_BASE_PROP, "int",
+ piix4_get_mem_io_base, NULL, NULL, NULL, NULL);
acpi_memory_hotplug_init(OBJECT(s), &s->io_mem, &s->gpe_mem);
- memory_region_add_subregion(parent, ACPI_MEMORY_HOTPLUG_BASE, &s->io_mem);
+ memory_region_add_subregion(parent, s->gpe_mem.port, &s->io_mem);
}
static void enable_device(PIIX4PMState *s, int slot)
diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h
index e5717df..95c608f 100644
--- a/include/hw/acpi/acpi.h
+++ b/include/hw/acpi/acpi.h
@@ -170,6 +170,7 @@ void acpi_update_sci(ACPIREGS *acpi_regs, qemu_irq irq,
uint32_t gpe0_sts_mask);
#define ACPI_MEMORY_HOTPLUG_IO_LEN 24
#define ACPI_MEMORY_HOTPLUG_BASE 0x0a00
+#define ACPI_MEMORY_HOTPLUG_IO_BASE_PROP "memory-hotplug-io-base"
#define ACPI_MEMORY_HOTPLUG_STATUS 8
@@ -182,6 +183,7 @@ typedef struct MemStatus {
} MemStatus;
typedef struct MemHotplugState {
+ uint16_t port;
uint32_t selector;
uint32_t dev_count;
MemStatus *devs;
--
1.7.1
- Re: [Qemu-devel] [PATCH 13/27] acpi: memory hotplug ACPI hardware implementation, (continued)
- Re: [Qemu-devel] [PATCH 13/27] acpi: memory hotplug ACPI hardware implementation, Markus Armbruster, 2013/11/25
- Re: [Qemu-devel] [PATCH 13/27] acpi: memory hotplug ACPI hardware implementation, Paolo Bonzini, 2013/11/25
- Re: [Qemu-devel] [PATCH 13/27] acpi: memory hotplug ACPI hardware implementation, Igor Mammedov, 2013/11/25
- Re: [Qemu-devel] [PATCH 13/27] acpi: memory hotplug ACPI hardware implementation, Paolo Bonzini, 2013/11/25
- Re: [Qemu-devel] [PATCH 13/27] acpi: memory hotplug ACPI hardware implementation, Igor Mammedov, 2013/11/25
- Re: [Qemu-devel] [PATCH 13/27] acpi: memory hotplug ACPI hardware implementation, Igor Mammedov, 2013/11/25
[Qemu-devel] [PATCH 12/27] dimm: add hotplug callback to DimmBus, Igor Mammedov, 2013/11/20
[Qemu-devel] [PATCH 14/27] acpi: initialize memory hotplug ACPI PIIX4 hardware, Igor Mammedov, 2013/11/20
[Qemu-devel] [PATCH 15/27] acpi: piix4: add memory-hotplug-io-base property to piix4_pm,
Igor Mammedov <=
[Qemu-devel] [PATCH 16/27] acpi: ich9: allow guest to clear SCI rised by GPE, Igor Mammedov, 2013/11/20
- Re: [Qemu-devel] [PATCH 16/27] acpi: ich9: allow guest to clear SCI rised by GPE, Michael S. Tsirkin, 2013/11/21
- Re: [Qemu-devel] [PATCH 16/27] acpi: ich9: allow guest to clear SCI rised by GPE, Hu Tao, 2013/11/21
- Re: [Qemu-devel] [PATCH 16/27] acpi: ich9: allow guest to clear SCI rised by GPE, Li Guang, 2013/11/21
- Re: [Qemu-devel] [PATCH 16/27] acpi: ich9: allow guest to clear SCI rised by GPE, Michael S. Tsirkin, 2013/11/21
- Re: [Qemu-devel] [PATCH 16/27] acpi: ich9: allow guest to clear SCI rised by GPE, Li Guang, 2013/11/21
- Re: [Qemu-devel] [PATCH 16/27] acpi: ich9: allow guest to clear SCI rised by GPE, Michael S. Tsirkin, 2013/11/21
- Re: [Qemu-devel] [PATCH 16/27] acpi: ich9: allow guest to clear SCI rised by GPE, Li Guang, 2013/11/21
- Re: [Qemu-devel] [PATCH 16/27] acpi: ich9: allow guest to clear SCI rised by GPE, Igor Mammedov, 2013/11/25
- Re: [Qemu-devel] [PATCH 16/27] acpi: ich9: allow guest to clear SCI rised by GPE, Li Guang, 2013/11/25