From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcbyL-0005OC-TI for qemu-devel@nongnu.org; Wed, 15 May 2013 09:42:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcbyH-0007xU-PT for qemu-devel@nongnu.org; Wed, 15 May 2013 09:42:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcbyH-0007xD-HW for qemu-devel@nongnu.org; Wed, 15 May 2013 09:42:21 -0400 Message-ID: <5193913A.8070701@redhat.com> Date: Wed, 15 May 2013 15:44:26 +0200 From: Laszlo Ersek MIME-Version: 1.0 References: <1368590499-11707-1-git-send-email-lig.fnst@cn.fujitsu.com> <1368590499-11707-2-git-send-email-lig.fnst@cn.fujitsu.com> <51934995.4010000@redhat.com> <1368608071.5142.55.camel@liguang.fnst.cn.fujitsu.com> In-Reply-To: <1368608071.5142.55.camel@liguang.fnst.cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] pc: reject do pc_acpi_init if acpi_enabled is false List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: li guang Cc: Anthony Liguori , mst@redhat.com, qemu-devel@nongnu.org, Bruce Rogers , Gerd Hoffmann , Paolo Bonzini On 05/15/13 10:54, li guang wrote: > =E5=9C=A8 2013-05-15=E4=B8=89=E7=9A=84 10:38 +0200=EF=BC=8CPaolo Bonzin= i=E5=86=99=E9=81=93=EF=BC=9A >> Il 15/05/2013 06:01, liguang ha scritto: >>> Signed-off-by: liguang >> >> --verbose, please. >> >> What problem does this patch fix? >=20 > Oh, sorry to be lazy ... > QEMU's option '-no-acpi' seems does not play > a correct role, even started with this,=20 > ACPI tables will also be embedded into BIOS,=20 > and there's no different between with or without it > for q35, as i can see. >=20 > here, I'm assuming '-no-acpi' is to disable ACPI. -no-acpi disables a block of code in pc_init1() [hw/i386/pc_piix.c], namely piix4_pm_init() and smbus_eeprom_init(). pc_acpi_init() loads / exports a default DSDT for the boot firmware. If the -acpitable switch is passed, then that code doesn't run. I think disabling PM but keeping the default DSDT from SeaBIOS is a valid use case; the DSDT seems to contain a bunch of non-PM functionality (see src/acpi-dsdt*.dsl in SeaBIOS). The "-no-acpi" switch is likely a misnomer (it should say "-no-acpi-pm" or some such), but in any case I believe it should not prevent exporting the DSDT. Currently you can prevent exporting the default DSDT for example with: -acpitable sig=3DNONE,data=3D/dev/null This will export a table with signature NONE, otherwise qemu-default ACPI table headers, and no table contents. It will also prevent pc_acpi_init() from running. See "AcpiTableOptions" in "qapi-schema.json" and "hw/acpi/core.c". Thanks, Laszlo