From patchwork Tue Jul 7 15:50:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beth Kon X-Patchwork-Id: 34473 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n67Fm77F004352 for ; Tue, 7 Jul 2009 15:48:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756960AbZGGPrt (ORCPT ); Tue, 7 Jul 2009 11:47:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756863AbZGGPrs (ORCPT ); Tue, 7 Jul 2009 11:47:48 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:47952 "EHLO e8.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756022AbZGGPrr (ORCPT ); Tue, 7 Jul 2009 11:47:47 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e8.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n67FasHl029086 for ; Tue, 7 Jul 2009 11:36:54 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n67FlkiZ234898 for ; Tue, 7 Jul 2009 11:47:46 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n67FjGSN029942 for ; Tue, 7 Jul 2009 11:45:17 -0400 Received: from localhost.localdomain (sig-9-65-127-31.mts.ibm.com [9.65.127.31]) by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n67FjFXQ029816; Tue, 7 Jul 2009 11:45:16 -0400 From: Beth Kon To: avi@redhat.com Cc: kvm@vger.kernel.org, Beth Kon Subject: [PATCH 3/5] BIOS changes for qemu-kvm hpet support (v9) Date: Tue, 7 Jul 2009 11:50:36 -0400 Message-Id: <1246981838-20465-3-git-send-email-eak@us.ibm.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1246981838-20465-1-git-send-email-eak@us.ibm.com> References: <1246981838-20465-1-git-send-email-eak@us.ibm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Advertise HPET in ACPI HPET table Signed-off-by: Beth Kon Signed-off-by: Avi Kivity --- kvm/bios/acpi-dsdt.dsl | 2 -- kvm/bios/rombios32.c | 11 +++-------- 2 files changed, 3 insertions(+), 10 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/kvm/bios/acpi-dsdt.dsl b/kvm/bios/acpi-dsdt.dsl index 3560baa..26fc7ad 100755 --- a/kvm/bios/acpi-dsdt.dsl +++ b/kvm/bios/acpi-dsdt.dsl @@ -194,7 +194,6 @@ DefinitionBlock ( }) } #ifdef BX_QEMU -#ifdef HPET_WORKS_IN_KVM Device(HPET) { Name(_HID, EISAID("PNP0103")) Name(_UID, 0) @@ -214,7 +213,6 @@ DefinitionBlock ( }) } #endif -#endif } Scope(\_SB.PCI0) { diff --git a/kvm/bios/rombios32.c b/kvm/bios/rombios32.c index f9e0452..28f2b21 100755 --- a/kvm/bios/rombios32.c +++ b/kvm/bios/rombios32.c @@ -1526,8 +1526,8 @@ struct acpi_20_generic_address { } __attribute__((__packed__)); /* - * * HPET Description Table - * */ + * HPET Description Table + */ struct acpi_20_hpet { ACPI_TABLE_HEADER_DEF /* ACPI common table header */ uint32_t timer_block_id; @@ -1716,13 +1716,11 @@ void acpi_bios_init(void) addr += madt_size; #ifdef BX_QEMU -#ifdef HPET_WORKS_IN_KVM addr = (addr + 7) & ~7; hpet_addr = addr; hpet = (void *)(addr); addr += sizeof(*hpet); #endif -#endif /* RSDP */ memset(rsdp, 0, sizeof(*rsdp)); @@ -1900,7 +1898,6 @@ void acpi_bios_init(void) } /* HPET */ -#ifdef HPET_WORKS_IN_KVM memset(hpet, 0, sizeof(*hpet)); /* Note timer_block_id value must be kept in sync with value advertised by * emulated hpet @@ -1909,7 +1906,6 @@ void acpi_bios_init(void) hpet->addr.address = cpu_to_le32(ACPI_HPET_ADDRESS); acpi_build_table_header((struct acpi_table_header *)hpet, "HPET", sizeof(*hpet), 1); -#endif #endif @@ -1919,8 +1915,7 @@ void acpi_bios_init(void) rsdt->table_offset_entry[nb_rsdt_entries++] = cpu_to_le32(ssdt_addr); rsdt->table_offset_entry[nb_rsdt_entries++] = cpu_to_le32(madt_addr); #ifdef BX_QEMU - /* No HPET (yet) */ -// rsdt->table_offset_entry[nb_rsdt_entries++] = cpu_to_le32(hpet_addr); + rsdt->table_offset_entry[nb_rsdt_entries++] = cpu_to_le32(hpet_addr); if (nb_numa_nodes > 0) rsdt->table_offset_entry[nb_rsdt_entries++] = cpu_to_le32(srat_addr); acpi_additional_tables(); /* resets cfg to required entry */