From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SW533-0007FV-WA for qemu-devel@nongnu.org; Sun, 20 May 2012 08:15:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SW532-0000MC-C6 for qemu-devel@nongnu.org; Sun, 20 May 2012 08:15:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SW532-0000Lw-4I for qemu-devel@nongnu.org; Sun, 20 May 2012 08:15:44 -0400 Date: Sun, 20 May 2012 15:15:39 +0300 From: Gleb Natapov Message-ID: <20120520121539.GJ10209@redhat.com> References: <1337504620-20378-1-git-send-email-gleb@redhat.com> <1337504620-20378-3-git-send-email-gleb@redhat.com> <4FB8D933.5070800@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FB8D933.5070800@redhat.com> Subject: Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: seabios@seabios.org, qemu-devel@nongnu.org On Sun, May 20, 2012 at 02:44:51PM +0300, Avi Kivity wrote: > On 05/20/2012 12:03 PM, Gleb Natapov wrote: > > QEMU may want to disable guest's S3/S4 support and it wants to distinguish > > between regular powerdown and S4 powerdown. To support that new fw_cfg > > option was added that passes supported system states and what value should > > guest use to enter each state. States are passed in 6 byte array. Each > > byte represents one system state. If byte at offset X has its MSB set > > it means that system state X is supported and to enter it guest should > > use the value from lowest 7 bits. Patch also detects old QEMU and uses > > values that work in backwards compatible way there. > > > > > Do we actually have to patch the DSDT? Or can _S3 etc be made into > functions instead? (and talk to the bios, or even to fwcfg directly?) > We better not talk to fwcfg after OSPM is started since this is firmware confing interface. Regardless, presence of _S3 name or method is all that needed for OS enabling S3 option. If _S3 is defined as a method it has to return Package() otherwise iasl refuses to compile it. -- Gleb.