* [Qemu-devel] [PATCH] acpi: strip compiler info in built-in DSDT
@ 2013-11-14 12:01 Michael S. Tsirkin
2013-11-14 13:45 ` Marcel Apfelbaum
0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2013-11-14 12:01 UTC (permalink / raw)
To: qemu-devel
Cc: Dave Frodin, Magnus Christensson, Gerd Hoffmann, Anthony Liguori,
Kenji Kaneshige
IASL stores it's revision in each table header it generates.
That's not nice since guests will see a change each time
they move between hypervisors.
We generally fill our own info for tables,
but we (and seabios) forgot to do this for the built-in DSDT.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
Probably not important enough for 1.7. Queued for 1.8.
hw/i386/acpi-build.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 486e705..8ae4f26 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -921,10 +921,16 @@ build_mcfg_q35(GArray *table_data, GArray *linker, AcpiMcfgInfo *info)
static void
build_dsdt(GArray *table_data, GArray *linker, AcpiMiscInfo *misc)
{
- void *dsdt;
+ AcpiTableHeader *dsdt;
+
assert(misc->dsdt_code && misc->dsdt_size);
+
dsdt = acpi_data_push(table_data, misc->dsdt_size);
memcpy(dsdt, misc->dsdt_code, misc->dsdt_size);
+
+ memset(dsdt, 0, sizeof *dsdt);
+ build_header(linker, table_data, dsdt, ACPI_DSDT_SIGNATURE,
+ misc->dsdt_size, 1);
}
/* Build final rsdt table */
--
MST
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] acpi: strip compiler info in built-in DSDT
2013-11-14 12:01 [Qemu-devel] [PATCH] acpi: strip compiler info in built-in DSDT Michael S. Tsirkin
@ 2013-11-14 13:45 ` Marcel Apfelbaum
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Apfelbaum @ 2013-11-14 13:45 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Dave Frodin, qemu-devel, Gerd Hoffmann, Anthony Liguori,
Kenji Kaneshige, Magnus Christensson
On Thu, 2013-11-14 at 14:01 +0200, Michael S. Tsirkin wrote:
> IASL stores it's revision in each table header it generates.
> That's not nice since guests will see a change each time
> they move between hypervisors.
> We generally fill our own info for tables,
> but we (and seabios) forgot to do this for the built-in DSDT.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Modifications in DSDT table:
OEM ID: "BXPC" -> "BOCHS "
OEM Table ID: "BXDSDT" -> "BXPCDSDT"
Compiler ID: "INTL" -> "BXPC"
Compiler Version: 0x20130823 -> 0x00000001
Tested-by: Marcel Apfelbaum <marcel.a@redhat.com>
> ---
>
> Probably not important enough for 1.7. Queued for 1.8.
>
> hw/i386/acpi-build.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 486e705..8ae4f26 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -921,10 +921,16 @@ build_mcfg_q35(GArray *table_data, GArray *linker, AcpiMcfgInfo *info)
> static void
> build_dsdt(GArray *table_data, GArray *linker, AcpiMiscInfo *misc)
> {
> - void *dsdt;
> + AcpiTableHeader *dsdt;
> +
> assert(misc->dsdt_code && misc->dsdt_size);
> +
> dsdt = acpi_data_push(table_data, misc->dsdt_size);
> memcpy(dsdt, misc->dsdt_code, misc->dsdt_size);
> +
> + memset(dsdt, 0, sizeof *dsdt);
> + build_header(linker, table_data, dsdt, ACPI_DSDT_SIGNATURE,
> + misc->dsdt_size, 1);
> }
>
> /* Build final rsdt table */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-14 13:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 12:01 [Qemu-devel] [PATCH] acpi: strip compiler info in built-in DSDT Michael S. Tsirkin
2013-11-14 13:45 ` Marcel Apfelbaum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).