public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bios: Fix MADT corruption and RSDT size when using -acpitable
@ 2009-05-14  0:52 Vincent Minet
  2009-05-14  0:59 ` Anthony Liguori
  0 siblings, 1 reply; 5+ messages in thread
From: Vincent Minet @ 2009-05-14  0:52 UTC (permalink / raw)
  To: kvm

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 <vincent@vincent-minet.net>
---
 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);
-- 
1.6.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-15 18:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14  0:52 [PATCH] bios: Fix MADT corruption and RSDT size when using -acpitable Vincent Minet
2009-05-14  0:59 ` Anthony Liguori
2009-05-14 16:20   ` Beth Kon
2009-05-15 16:13     ` Marcelo Tosatti
2009-05-15 18:24       ` Beth Kon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox