From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIcCE-00068i-HG for qemu-devel@nongnu.org; Thu, 21 Mar 2013 05:54:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIcCA-0004Wt-Hh for qemu-devel@nongnu.org; Thu, 21 Mar 2013 05:54:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIcCA-0004Wp-A7 for qemu-devel@nongnu.org; Thu, 21 Mar 2013 05:54:02 -0400 Date: Thu, 21 Mar 2013 11:54:25 +0200 From: "Michael S. Tsirkin" Message-ID: <20130321095425.GA30456@redhat.com> References: <1363856914-23399-2-git-send-email-hutao@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1363856914-23399-2-git-send-email-hutao@cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH v15 2/2] patch dsdt to use passed-in pvpanic ioport List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao Cc: Peter Maydell , Gleb Natapov , Jan Kiszka , seabios@seabios.org, qemu-devel , Markus Armbruster , Blue Swirl , Orit Wasserman , Juan Quintela , Alexander Graf , Christian Borntraeger , Andrew Jones , Alex Williamson , Sasha Levin , Stefan Hajnoczi , Luiz Capitulino , KAMEZAWA Hiroyuki , Anthony Liguori , Marcelo Tosatti , Paolo Bonzini On Thu, Mar 21, 2013 at 05:08:34PM +0800, Hu Tao wrote: > Signed-off-by: Hu Tao OK now you need to ACK GPLv2+ relicensing too :) Could you please review that message "make acpi bits GPLv2 compatible" and respond? > --- > src/acpi-dsdt-isa.dsl | 14 ++++++++++++-- > src/acpi.c | 9 +++++++++ > 2 files changed, 21 insertions(+), 2 deletions(-) > > diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl > index 87a31b9..43fe719 100644 > --- a/src/acpi-dsdt-isa.dsl > +++ b/src/acpi-dsdt-isa.dsl > @@ -102,7 +102,9 @@ Scope(\_SB.PCI0.ISA) { > > Device(PEVT) { > Name(_HID, "QEMU0001") > - OperationRegion(PEOR, SystemIO, 0x0505, 0x01) > + ACPI_EXTRACT_NAME_WORD_CONST dsdt_isa_pest > + Name(PEST, 0x505) > + OperationRegion(PEOR, SystemIO, PEST, 0x01) > Field(PEOR, ByteAcc, NoLock, Preserve) { > PEPT, 8, > } > @@ -126,7 +128,15 @@ Scope(\_SB.PCI0.ISA) { > } > > Name(_CRS, ResourceTemplate() { > - IO(Decode16, 0x0505, 0x0505, 0x01, 0x01) > + IO(Decode16, 0x0505, 0x0505, 0x01, 0x01, IO) > }) > + > + CreateWordField(_CRS, IO._MIN, IOMN) > + CreateWordField(_CRS, IO._MAX, IOMX) > + > + Method(_INI, 0, NotSerialized) { > + Store(PEST, IOMN) > + Store(PEST, IOMX) > + } > } > } > diff --git a/src/acpi.c b/src/acpi.c > index 119d1c1..42fa06e 100644 > --- a/src/acpi.c > +++ b/src/acpi.c > @@ -286,11 +286,20 @@ static const struct pci_device_id fadt_init_tbl[] = { > PCI_DEVICE_END > }; > > +static void patch_dsdt(void *dsdt) > +{ > + u8 *dsdt_ptr = dsdt; > + int pvpanic_port = romfile_loadint("etc/pvpanic-port", 0x505); > + > + *(u16 *)(dsdt_ptr + *dsdt_isa_pest) = pvpanic_port; > +} > + > static void fill_dsdt(struct fadt_descriptor_rev1 *fadt, void *dsdt) > { > if (fadt->dsdt) { > free((void *)le32_to_cpu(fadt->dsdt)); > } > + patch_dsdt(dsdt); > fadt->dsdt = cpu_to_le32((u32)dsdt); > fadt->checksum -= checksum(fadt, sizeof(*fadt)); > dprintf(1, "ACPI DSDT=%p\n", dsdt); > -- > 1.8.1.4