From: Beth Kon <eak@us.ibm.com>
To: avi@redhat.com
Cc: kvm@vger.kernel.org, Beth Kon <eak@us.ibm.com>
Subject: [PATCH 3/4] BIOS changes for KVM HPET (v2)
Date: Thu, 7 May 2009 10:57:01 -0400 [thread overview]
Message-ID: <1241708222-11101-3-git-send-email-eak@us.ibm.com> (raw)
In-Reply-To: <1241708222-11101-1-git-send-email-eak@us.ibm.com>
Just a note here...
The number of table_offset_entry entries for the non BX_QEMU case doesn't make
sense here. There are only 2 entries. I left it as is, since it does not
impact HPET's interraction with it. Actually it seems like dead code since
this is in kvm code but with BX_QEMU undefined. It doesn't seem to be a
problem.
Signed-off-by: Beth Kon <eak@us.ibm.com>
diff --git a/kvm/bios/acpi-dsdt.dsl b/kvm/bios/acpi-dsdt.dsl
index c756fed..0e142be 100755
--- a/kvm/bios/acpi-dsdt.dsl
+++ b/kvm/bios/acpi-dsdt.dsl
@@ -308,7 +308,6 @@ DefinitionBlock (
})
}
#ifdef BX_QEMU
-#ifdef HPET_WORKS_IN_KVM
Device(HPET) {
Name(_HID, EISAID("PNP0103"))
Name(_UID, 0)
@@ -328,7 +327,6 @@ DefinitionBlock (
})
}
#endif
-#endif
}
Scope(\_SB.PCI0) {
diff --git a/kvm/bios/rombios32.c b/kvm/bios/rombios32.c
index ddfa828..7441cd7 100755
--- a/kvm/bios/rombios32.c
+++ b/kvm/bios/rombios32.c
@@ -1293,7 +1293,7 @@ struct rsdt_descriptor_rev1
{
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
#ifdef BX_QEMU
- uint32_t table_offset_entry [2]; /* Array of pointers to other */
+ uint32_t table_offset_entry [3]; /* Array of pointers to other */
// uint32_t table_offset_entry [4]; /* Array of pointers to other */
#else
uint32_t table_offset_entry [3]; /* Array of pointers to other */
@@ -1450,8 +1450,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;
@@ -1591,13 +1591,11 @@ void acpi_bios_init(void)
#endif
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
acpi_tables_size = addr - base_addr;
@@ -1620,10 +1618,10 @@ void acpi_bios_init(void)
memset(rsdt, 0, sizeof(*rsdt));
rsdt->table_offset_entry[0] = cpu_to_le32(fadt_addr);
rsdt->table_offset_entry[1] = cpu_to_le32(madt_addr);
- //rsdt->table_offset_entry[2] = cpu_to_le32(ssdt_addr);
#ifdef BX_QEMU
- //rsdt->table_offset_entry[3] = cpu_to_le32(hpet_addr);
+ rsdt->table_offset_entry[2] = cpu_to_le32(hpet_addr);
#endif
+ //rsdt->table_offset_entry[3] = cpu_to_le32(ssdt_addr);
acpi_build_table_header((struct acpi_table_header *)rsdt,
"RSDT", sizeof(*rsdt), 1);
@@ -1723,7 +1721,6 @@ void acpi_bios_init(void)
#ifdef BX_QEMU
/* 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
@@ -1733,7 +1730,6 @@ void acpi_bios_init(void)
acpi_build_table_header((struct acpi_table_header *)hpet,
"HPET", sizeof(*hpet), 1);
#endif
-#endif
}
next prev parent reply other threads:[~2009-05-07 14:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-07 14:56 [PATCH 1/4] BIOS changes for configuring irq0->inti2 override (v2) Beth Kon
2009-05-07 14:57 ` [PATCH 2/4] Userspace " Beth Kon
2009-05-07 14:57 ` Beth Kon [this message]
2009-05-07 14:57 ` [PATCH 4/4] Userspace changes for KVM HPET (v2) Beth Kon
2009-05-07 15:56 ` [PATCH 1/4] BIOS changes for configuring irq0->inti2 override (v2) Avi Kivity
2009-05-07 16:30 ` [PATCH 1/4] BIOS changes for configuring irq0->inti2 override(v2) Beth Kon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1241708222-11101-3-git-send-email-eak@us.ibm.com \
--to=eak@us.ibm.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox