From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vse8t-0001j4-2V for qemu-devel@nongnu.org; Mon, 16 Dec 2013 14:47:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vse8o-0001Sv-BI for qemu-devel@nongnu.org; Mon, 16 Dec 2013 14:47:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vse8o-0001Sq-33 for qemu-devel@nongnu.org; Mon, 16 Dec 2013 14:47:46 -0500 Date: Mon, 16 Dec 2013 21:50:53 +0200 From: "Michael S. Tsirkin" Message-ID: <20131216195053.GA23900@redhat.com> References: <1385001528-12003-1-git-send-email-imammedo@redhat.com> <1385001528-12003-24-git-send-email-imammedo@redhat.com> <20131121093701.GA3140@redhat.com> <20131125153913.1af63baa@nial.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131125153913.1af63baa@nial.usersys.redhat.com> Subject: Re: [Qemu-devel] [PATCH 23/27] pc: ACPI BIOS: implement memory hotplug interface List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: peter.maydell@linaro.org, mdroth@linux.vnet.ibm.com, stefanb@linux.vnet.ibm.com, hutao@cn.fujitsu.com, marcel.a@redhat.com, mjt@tls.msk.ru, armbru@redhat.com, qemu-devel@nongnu.org, vasilis.liaskovitis@profitbricks.com, quintela@redhat.com, chegu_vinod@hp.com, kraxel@redhat.com, aliguori@amazon.com, pbonzini@redhat.com, lcapitulino@redhat.com, stefanha@redhat.com, afaerber@suse.de On Mon, Nov 25, 2013 at 03:39:13PM +0100, Igor Mammedov wrote: > On Thu, 21 Nov 2013 11:37:01 +0200 > "Michael S. Tsirkin" wrote: > > > On Thu, Nov 21, 2013 at 03:38:44AM +0100, Igor Mammedov wrote: > > > - 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 > > > Signed-off-by: Igor Mammedov > > > --- > [...] > > > > diff --git a/hw/i386/ssdt-misc.dsl b/hw/i386/ssdt-misc.dsl > > > index a4484b8..b0c581e 100644 > > > --- a/hw/i386/ssdt-misc.dsl > > > +++ b/hw/i386/ssdt-misc.dsl > > > @@ -116,4 +116,183 @@ DefinitionBlock ("ssdt-misc.aml", "SSDT", 0x01, "BXPC", "BXSSDTSUSP", 0x1) > > > } > > > } > > > } > > > + > > > + External(MTFY, MethodObj) > > > + > > > + Scope(\_SB) { > > > + Device(MHPD) { > > > + Name(_HID, EISAID("PNP0C08")) > > > + > > > + ACPI_EXTRACT_NAME_WORD_CONST ssdt_mctrl_port > > > + Name(MHPP, 0xFFFF) > > > + > > > + ACPI_EXTRACT_NAME_DWORD_CONST ssdt_mctrl_nr_slots > > > + Name(MDNR, 0x12345678) > > > + > > > + /* Memory hotplug IO registers */ > > > + OperationRegion(HPMR, SystemIO, MHPP, 24) > > > + > > > + Method(_CRS, 0, Serialized) { > > > + Name(CRS, ResourceTemplate() { > > > + IO(Decode16, 0x00, 0x00, 0x01, 24, IO) > > > + }) > > > > > > Declaring name makes us serialize it. > > Can't we use a local variable? > If that works, I'll change it. > > But I have a question of my own perhaps to Paolo or Gerd, > Do we really need this _CRS, because if you look at next hunk > _STA should report not present but functioning to avoid windows BSOD. > So there is not guaranties that OSPM would care or even query it > and honor _CRS provided range. > Yes this worries me too. Making _STA non present looks wrong. I suspect we need to look for some other way to make windows not crash that will make it respect the _CRS. Also which windows? All of them? > [...] > > > + > > > + Method(_STA, 0) { > > > + If (LEqual(MDNR, Zero)) { > > > + Return(0x0) > > > + } > > > + /* Leave bit 0 cleared to avoid Windows BSOD */ > > > + Return(0xA) > > > + } > [...]