From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] bios: Fix MADT corruption and RSDT size when using -acpitable Date: Wed, 13 May 2009 19:59:34 -0500 Message-ID: <4A0B6CF6.60609@codemonkey.ws> References: <1242262325-18444-1-git-send-email-vincent@vincent-minet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, beth kon To: Vincent Minet Return-path: Received: from yx-out-2324.google.com ([74.125.44.29]:48973 "EHLO yx-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752455AbZENA7f (ORCPT ); Wed, 13 May 2009 20:59:35 -0400 Received: by yx-out-2324.google.com with SMTP id 3so559165yxj.1 for ; Wed, 13 May 2009 17:59:36 -0700 (PDT) In-Reply-To: <1242262325-18444-1-git-send-email-vincent@vincent-minet.net> Sender: kvm-owner@vger.kernel.org List-ID: Vincent Minet wrote: > External ACPI tables are counted twice for the RSDT size and the load > address for the first external table is in the MADT (interrupt override > entries are overwritten). > > Signed-off-by: Vincent Minet > Beth, I think you had a patch attempting to address the same issue. It was a bit more involved though. Which is the proper fix and are they both to the same problem? Regards, Anthony Liguori > --- > kvm/bios/rombios32.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/kvm/bios/rombios32.c b/kvm/bios/rombios32.c > index cbd5f15..289361b 100755 > --- a/kvm/bios/rombios32.c > +++ b/kvm/bios/rombios32.c > @@ -1626,7 +1626,7 @@ void acpi_bios_init(void) > addr = base_addr = ram_size - ACPI_DATA_SIZE; > rsdt_addr = addr; > rsdt = (void *)(addr); > - rsdt_size = sizeof(*rsdt) + external_tables * 4; > + rsdt_size = sizeof(*rsdt); > addr += rsdt_size; > > fadt_addr = addr; > @@ -1787,6 +1787,7 @@ void acpi_bios_init(void) > } > int_override++; > madt_size += sizeof(struct madt_int_override); > + addr += sizeof(struct madt_int_override); > } > acpi_build_table_header((struct acpi_table_header *)madt, > "APIC", madt_size, 1); >