From patchwork Sun Jan 10 08:37:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryota Ozaki X-Patchwork-Id: 71977 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0A8bNwT023462 for ; Sun, 10 Jan 2010 08:37:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752358Ab0AJIhW (ORCPT ); Sun, 10 Jan 2010 03:37:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752364Ab0AJIhW (ORCPT ); Sun, 10 Jan 2010 03:37:22 -0500 Received: from mail-pz0-f188.google.com ([209.85.222.188]:51012 "EHLO mail-pz0-f188.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752344Ab0AJIhU (ORCPT ); Sun, 10 Jan 2010 03:37:20 -0500 Received: by pzk26 with SMTP id 26so11624368pzk.4 for ; Sun, 10 Jan 2010 00:37:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=oROyq/HrwLFsnGhPXzXx1ACsScpPNMkI1tILXOYAPN0=; b=CogEBTGuIFRR6KiyW3ZeLH2CrDbNwly2CTlWtNSJekvM2Xzr4TytPaW6Wc0e9X3/D8 cRJe4HAl0vYLcCR8/2oVq6G35Kp3gk5p3wp9QB9XRWXBMBsp7Cfvz4xcucy9vzb4IMu8 It+6B4gmuReUlsy7esQ0OVR0bL5qrDlIHG5k8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=pOwMLZ5jqmX/ePluaMablOBrbeyxVa1W7uzexL+OqgYqokEbL8uuseUl9cC+9Af5mY yHSBskNd4gyVzfZ4HYlOzN4OpwedTDerG6cjXYl3zrCPAmK6wp3nlaifiqJdQrCdJ0N+ loPEae61DmByfoVjK5QriA09XHRC/7Hd5mT08= MIME-Version: 1.0 Received: by 10.143.25.29 with SMTP id c29mr4661099wfj.255.1263112639246; Sun, 10 Jan 2010 00:37:19 -0800 (PST) In-Reply-To: <5e93dcec1001060624y529025ees54d4ccc7da69b9e9@mail.gmail.com> References: <5e93dcec1001060507l3ca26d51o83edf1c683322aa3@mail.gmail.com> <20100106135935.GB28640@amt.cnet> <5e93dcec1001060624y529025ees54d4ccc7da69b9e9@mail.gmail.com> Date: Sun, 10 Jan 2010 17:37:19 +0900 Message-ID: <5e93dcec1001100037r72669215k1c6fb38e54e8d3e5@mail.gmail.com> Subject: Re: Memory hotplug From: Ryota Ozaki To: Marcelo Tosatti Cc: kvm@vger.kernel.org, Ryota OZAKI Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index cc31112..5211408 100644 --- a/src/acpi-dsdt.dsl +++ b/src/acpi-dsdt.dsl @@ -704,6 +704,7 @@ DefinitionBlock ( Return(0x01) } Method(_L03) { + Notify(\_SB.MEM0, 1) Return(0x01) } Method(_L04) { @@ -744,4 +745,51 @@ DefinitionBlock ( } } + Scope( \_SB){ + + // FIXME: currently support just one fixed Memory Device + Device(MEM0) { + Name(_HID, EISAID("PNP0C80")) + Name(_UID, 0) + + // FIXME: must change the state dynamically + Method (_STA, 0) { + //Store (\_SB.PCI0.PX13.DRSA, Local0) + //And (Local0, 0x80000000, Local0) + //If (LEqual (Local0, 0)) + //{ + // Return (0x00) // not present + //} + //ElseIf (LEqual (Local0, 0)) + //{ + // Return (0x0D) // disabled + //} + //Else + //{ + Return (0x0F) // enabled + //} + } + + Name(_CRS, ResourceTemplate() { + QwordMemory( + ResourceConsumer, + , + MinFixed, // _MINF + MaxFixed, // _MAXF + Cacheable, // _MEM + ReadWrite, // _RW + 0x0FFFFFFF, // _GRA + 0x20000000, // _MIN // from 512M + 0x3FFFFFFF, // _MAX // upto 1024M + 0x00000000, // _TRA + 0x20000000, // _LEN + ) + }) + + // Are these fields needed? + //Method (_SRS, 1) { } + //Method (_DIS, 0) { } + } + } + }