From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WF3k8-00067p-T2 for qemu-devel@nongnu.org; Sun, 16 Feb 2014 10:35:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WF3k2-000655-Sd for qemu-devel@nongnu.org; Sun, 16 Feb 2014 10:34:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WF3k2-00064s-Kn for qemu-devel@nongnu.org; Sun, 16 Feb 2014 10:34:50 -0500 Date: Sun, 16 Feb 2014 17:39:44 +0200 From: "Michael S. Tsirkin" Message-ID: <20140216153944.GF30056@redhat.com> References: <1391777496-3882-1-git-send-email-imammedo@redhat.com> <1391777496-3882-8-git-send-email-imammedo@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1391777496-3882-8-git-send-email-imammedo@redhat.com> Subject: Re: [Qemu-devel] [RFC 7/9] acpi: consume CPU hotplug IO resource in PNP0C02 device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, anthony@codemonkey.ws, kraxel@redhat.com On Fri, Feb 07, 2014 at 01:51:34PM +0100, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > hw/i386/acpi-build.c | 10 ++++++++++ > 1 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c > index ce5f715..5cd0c80 100644 > --- a/hw/i386/acpi-build.c > +++ b/hw/i386/acpi-build.c > @@ -70,6 +70,8 @@ typedef struct AcpiPmInfo { > uint32_t gpe0_blk; > uint32_t gpe0_blk_len; > uint32_t io_base; > + uint16_t cpuhp_io_base; > + uint16_t cpuhp_io_len; > } AcpiPmInfo; > > typedef struct AcpiMiscInfo { > @@ -141,11 +143,14 @@ static void acpi_get_pm_info(AcpiPmInfo *pm) > Object *obj = NULL; > QObject *o; > > + pm->cpuhp_io_len = ACPI_GPE_PROC_LEN; > if (piix) { > obj = piix; > + pm->cpuhp_io_base = PIIX4_CPU_HOTPLUG_IO_BASE; > } > if (lpc) { > obj = lpc; > + pm->cpuhp_io_base = ICH9_CPU_HOTPLUG_IO_BASE; > } > assert(obj); > Not a must but would be nicer to get these as device properties. If we change this, cpuhp_io_len can be used directly ... > @@ -1145,6 +1150,11 @@ build_ssdt(GArray *table_data, GArray *linker, > pm->gpe0_blk, /* _MAX */ > 0x0, /* _ALN */ > pm->gpe0_blk_len); /* _LEN */ > + ACPI_IO(RESBUF, Decode16, > + pm->cpuhp_io_base, /* _MIN */ > + pm->cpuhp_io_base, /* _MAX */ > + 0x0, /* _ALN */ > + pm->cpuhp_io_len); /* _LEN */ > ); > ); > ); > -- > 1.7.1