From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrVVn-0003JQ-Tm for qemu-devel@nongnu.org; Fri, 13 Dec 2013 11:22:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrVVh-0000Q9-K3 for qemu-devel@nongnu.org; Fri, 13 Dec 2013 11:22:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrVVh-0000Ps-AD for qemu-devel@nongnu.org; Fri, 13 Dec 2013 11:22:41 -0500 From: Igor Mammedov Date: Fri, 13 Dec 2013 17:22:09 +0100 Message-Id: <1386951736-929-5-git-send-email-imammedo@redhat.com> In-Reply-To: <1386951736-929-1-git-send-email-imammedo@redhat.com> References: <1386951736-929-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 04/11] acpi/piix4: add readonly "cpu-hotplug-io-base" property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, mst@redhat.com, hutao@cn.fujitsu.com, jjherne@us.ibm.com, brogers@suse.com, kraxel@redhat.com, aliguori@amazon.com, kaneshige.kenji@jp.fujitsu.com, chen.fan.fnst@cn.fujitsu.com, pbonzini@redhat.com, lersek@redhat.com Signed-off-by: Igor Mammedov --- hw/acpi/piix4.c | 11 +++++++++++ include/hw/acpi/hotplug.h | 1 + 2 files changed, 12 insertions(+) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index 8ab85b2..8db0920 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -31,6 +31,7 @@ #include "exec/address-spaces.h" #include "hw/acpi/piix4.h" #include "hw/acpi/hotplug.h" +#include "qapi/visitor.h" //#define DEBUG @@ -384,6 +385,14 @@ static void piix4_pm_machine_ready(Notifier *n, void *opaque) (memory_region_present(io_as, 0x2f8) ? 0x90 : 0); } +static void piix4_get_cpu_io_base(Object *obj, Visitor *v, void *opaque, + const char *name, Error **errp) +{ + PIIX4PMState *s = PIIX4_PM(obj); + + visit_type_uint16(v, &s->gpe_cpu.io_base, name, errp); +} + static void piix4_pm_add_propeties(PIIX4PMState *s) { static const uint8_t acpi_enable_cmd = ACPI_ENABLE; @@ -404,6 +413,8 @@ static void piix4_pm_add_propeties(PIIX4PMState *s) &sci_int, NULL); object_property_add_uint32_ptr(OBJECT(s), ACPI_PM_PROP_PM_IO_BASE, &s->io_base, NULL); + object_property_add(OBJECT(s), ACPI_CPU_HOTPLUG_IO_BASE_PROP, "int", + piix4_get_cpu_io_base, NULL, NULL, NULL, NULL); } static int piix4_pm_initfn(PCIDevice *dev) diff --git a/include/hw/acpi/hotplug.h b/include/hw/acpi/hotplug.h index 8bc176b..c1d82b5 100644 --- a/include/hw/acpi/hotplug.h +++ b/include/hw/acpi/hotplug.h @@ -14,6 +14,7 @@ #include "hw/acpi/acpi.h" +#define ACPI_CPU_HOTPLUG_IO_BASE_PROP "cpu-hotplug-io-base" #define ACPI_CPU_HOTPLUG_STATUS 4 #define ACPI_GPE_PROC_LEN 32 -- 1.8.3.1